ATG Shopping Cart Basics

User can use Product Page or Cart page to perform below actions:
  1. Add Item(s) to the cart
  2. Remove Item from the cart
  3. Change quantity of item(s)
  4. Delete item(s) from the cart
How to add item(s) to the cart?
  • OOTB ATG provides request scope CartModifierFormHandler component with pre-build methods for add, update, delete etc..
  • Component path : /atg/commerce/order/purchase/CartModifierFormHandler


What happens when user adds item(s) to the cart?
  • When SKUs are added to the order, they become CommerceItem objects
  • CommerceItem Object represent each line item in the order
  • Order may contain many commerce items object
How to check the order object and commerce Items?
  •    ShoppingCart is session scoped component  (/atg/commerce/ShoppingCart)
  •    ShoppingCart uses OrderHolder Class to hold multiple orders
  •    At any given point only one Order will be active
  •    ShoppingCart holds current, saved and last orders
  •    Current Order object can be accessed by using either ShoppingCart.current or CartModifierFormHandler.order

3 comments:

  1. nice
    https://shipexusa.com
    https://cronvideo.com
    https://videoud.com

    ReplyDelete
  2. I’m going to read this. I’ll be sure to come back. thanks for sharing. and also This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article... http://www.dedibox-news.com/how-to-discover-a-wonderful-car-mend-store/

    ReplyDelete
  3. Hi ,
    Is it possible to replace the current shopping cart order with an order from other user?

    Scenario is like:
    1.user logged in
    2.added items to cart.

    3. In a different browser, user(not logged in) tries to complete the payment, so we have the order id and we can load it. But the shopping carts current is not being replaced by calling setCurrent(order)

    ReplyDelete