This content has been marked as final. Show 7 replies
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.
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
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?
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.
shoppingcart form handler :
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.