Order vs OrderItem
Posted: Sun Mar 18, 2012 12:28 pm
by sai
I am trying to understand what GiftWrapOrderItemImpl is for?
Also while I am working on Checkout page I am not able to understand the difference between OrderItem and Order.
Thank you for continuous support. I appreciate it very much.
Re: Order vs OrderItem
Posted: Sun Mar 18, 2012 1:12 pm
by jefffischer
OrderItems are instances of a particular product placed in a user's cart. Therefore, if someone adds a blue hat to his/her cart, then this action manifests itself as a new OrderItem instance associated with the blue hat product in that person's cart.
The Order class is the cart. The Order contains all the OrderItems being purchased.
GiftWrapOrderItem is a special type of OrderItem that would presumably be used to add a gift container to the cart (at some price) and associate the other items in the cart that will be physically placed into this gift wrap container. This is useful for a fulfillment process to determine what items in the order need to be gift wrapped.