prepares the order for the cart
fixed main