Wednesday, 9 April 2014

How Promotion Engine is called during Order flow

  • Out of the box, OrderPrepareCmd calls PrepareOrderCmd which calls OrderCalculateCmd.
  • OrderCalculateCmd is the interface and the implementation class is PromotionEngineOrderCalculateCmdImpl.
  • PromotionEngineOrderCalculateCmdImpl is the command that invokes the promotion engine to apply the applicable promotions.
  • PromotionCodeAddRemoveControllerCmd - Command use to add promocode to an order.

Mode details
 

OrderPrepareCmdImpl
 For each order specified to prepare:
  •     check whether the order is locked by others or not.
  •     check the order status is in either of P,I,E,W,N.
  •     If the order is generated from quote, check the quote's expire date. if quote is expired, reset the price flag.
  •     Call ValidateShippingAdjustmentCmd command to validate shipping adjustment.
  •     Call PrepareOrderCmd command to prepare the order.

No comments:

Post a Comment