PrepareOrderCmd task command

The PrepareOrderCmd task command prepares an order by determining prices, discounts, shipping charges, and taxes for an order.

Task command

com.ibm.commerce.order.commands.PrepareOrderCmd

Implementation class

com.ibm.commerce.order.commands.PrepareOrderCmdImpl

Commands called

DoInventoryActionCmd

Possible callers

OrderCopyCmdImpl

OrderPrepareCmdImpl

PreProcessCmdImpl

Behavior

Call DoInventoryActionCmd to get default ATP parameters

Call OrderProcessingHelper to do the following operations:
  • Remove generated order item
  • Ensure all order items are buyable. Throw an exception if one or more items are not buyable
  • Call UpdateShippingAddressCmd to find the appropriate shipping address for all the order items and update them for each order item. If the order item is a dynamic kit, call ValidateDynamicKitConfigurationCmd to do validation
  • Call ResolveOrderItemPriceCmd to calculate the best price and update order total
  • Call DoInventoryActionCmd to check and allocate inventory if necessary

Call CalculateOrderCmd to calculate all order charges and deal with free gift