If you modify the functionality of the OrderManager
or its related components, you should make sure to follow these guidelines:
When making changes to an
Order
, you must call theupdateOrder()
method. (For more information on theupdateOrder()
method, see Updating an Order with the OrderManager in the Saving Orders section of this chapter.)updateOrder()
must always be called within a transaction. (For more information on transactions, see the Transaction Management chapter in the ATG Platform Programming GuideATG Platform Programming Guide.)If errors occur when a user logs in, set the
persistOrders
property of theShoppingCart
component to true.
The handleMoveToPurchaseInfoByRelId
method and all other handle methods of atg.commerce.order.purchase.CartModifierFormHandler
provide good examples of how and when to call getOrderManager.updateOrder()
.