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 theupdateOrdermethod. (For more information on theupdateOrdermethod, 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 Platform Programming Guide.)If errors occur when a user logs in, set the
persistOrdersproperty of theShoppingCartcomponent 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().

