7 Replies Latest reply: Oct 15, 2012 6:46 AM by 967104 RSS

    difference between cartmodifierformhandler and shoppingcart form handler

    333
      hi all,

      can anyone explain clearly the difference and clear explanation about the cartmodifierformhandler and shoppingcart form handler

      and when we go for cartmodifierformhandler and shoppingcartformhandler

      regards
      shya

      Edited by: shya on Oct 11, 2012 10:40 AM
        • 1. Re: difference between cartmodifierformhandler and shoppingcart form handler
          Nitin Khare
          CartModifierFormHandler - used to modify the shopping cart by adding items, deleting items and modifying the quantities of items in cart and preparing for checkout. Typically when using this you would have to handle checkout flow yourself by using ExpressCheckoutFormHandler in case of express checkout and in case of full checkout by using ShippingGroup & PaymentGroup form handlers and finally CommitFormHandler to confirm and commit the order.

          ShoppingCartFormHandler - used for handling cart management (add/remove/adjust item quantity) and checkout process (shipping, billing, committing order). This provides an easier and simpler interface than using CartModifierFormHandler along other form handlers because in ShoppingCartFormHandler various functions for cart management to checkout are exposed via different handleXXX methods each having a preXXX and postXXX to extend the functionality if required. There is one FullShoppingCartFormHandler also which extends ShoppingCartFormHandler and adds the functionality like handling multiple payment groups, split shipping, express checkout.

          To summarize, ShoppingCartFormHandler provides simpler cart management and checkout implementation all in itself. Whereas CartModifierFormHandler doesn't provide you the checkout flow and therefore CartModifierFormHandler based implementation would not be that simple and require other form handlers. But CartModifierFormHandler would provide some benefits like better handling and security for concurrent updates of orders, a more flexible payment/shipping group management for use with multiple shipping or payment groups along with other things.
          • 2. Re: difference between cartmodifierformhandler and shoppingcart form handler
            333
            hi,
            still am not clear about that, can you explain in another way if possible


            regards
            shya
            • 3. Re: difference between cartmodifierformhandler and shoppingcart form handler
              Nooruddin Shaik
              ShoppingCartFormHandler is deprecated form handler from ATG2006.
              It was common formhandler right from adding items to cart to submitting the order including shipping and billing.

              From ATG2006, ATG introduced new formhandlers like CartModifierForHandler, ShippingGroupFormHandler, PaymentGroupFormHandler, CommitOrderFormHandler etc which has better control on transaction and module and handle complex checkout.

              CartModifierFormhandler is restricted until Checkout, after checkout you need to use other form handler as mentioned.

              ATG doesn't recommend using ShoppingCartFormHandler after ATG2006 and its there for back-ward compatibility

              Peace
              Shaik
              • 4. Re: difference between cartmodifierformhandler and shoppingcart form handler
                RMishra
                Hi Shaik,
                As documentation compnent ShoppingCartModifier(class SoftGoodFormHandler<--FullShoppingCartFormHandler<--ShoppingCartFormHandler) can have so many handle methods for adding item to cart to checkout. Am I right?
                So as you mentioned should we use CartModifierFormHandler, shippingGoroupFormHandler, PayementGroupFormHandler etc instead of above?
                -RMishra
                • 5. Re: difference between cartmodifierformhandler and shoppingcart form handler
                  Clarer-Oracle
                  The short answer is that new applications should use the family of form handlers in the atg.commerce.order.purchase package (CartModifierFormHandler, ShippingGroupFormHandler, PaymentGroupFormHandler, etc.). They replaced the form handlers in the atg.commerce.order package many years ago. Some of the differences between the old and new sets have been mentioned already in this thread. New features are added to the order.purchase form handlers but not to the order form handlers.

                  A little history may help explain how we got here. As ATG added more functionality to the older form handlers, they simply became too big to manage. The source files were huge and contained collections of largely unrelated methods. There was a project many years ago to add form handler support for multiple shipping groups and multiple payment groups. At that time, the monolithic form handlers in the order package were broken up into the set you see now in the order.purchase package. Almost everything that was supported by the old form handlers found a home in the new ones. The old form handlers were never removed from the product because lots of older applications still use them.
                  • 6. Re: difference between cartmodifierformhandler and shoppingcart form handler
                    RMishra
                    Thanks. :)
                    I think no doubt here now about difference.
                    • 7. Re: difference between cartmodifierformhandler and shoppingcart form handler
                      967104
                      shoppingcart form handler :

                      http://docs.oracle.com/cd/E23095_01/Platform.93/apidoc/atg/commerce/order/ShoppingCartFormHandler.html



                      cartmodifierformhandler :

                      This formhandler is used to modify a ShoppingCart by adding items to it, deleting items from it, modifying the quantities of items in it, and preparing it for the checkout process

                      can you see these i think so it helpfull for you.