ATG Order Reprice and How it works?

When Order reprice is typically called?
The Order is typically repriced after the following actions: 
  • Item is added to the cart 
  • Item is removed from the cart 
  • Quantity is changed on items in the cart 
  • User specifies a shipping address or shipping method and pushes "Checkout" button
How to do repricing on Order?
Use /atg/commerce/order/purchase/RepriceOrderDroplet to invoke repricing on order:



How it works behind the scenes?
Each time the code reprices the order, the ATG Promotions associated with the user's Profile are considered.
  • Fetch all of the Promotions/Discounts that the user is eligible for:
    • (Global + Individual Promotions) minus Promotions they don't qualify for
  • Calculate the price of each individual item on the order
    • Apply Item Level Discounts
  • Calculate the order total price(discounted item prices + shipping price)
    • Apply Order Level discounts
  • Calculate the shipping price
    • Apply Shipping Discounts
  • Generate a total price
Few scenarios when Order reprice is not working:
If you don't see your order getting repriced as you expected (the discount isn't being related), these are some things to check on:
  • Was the repricing code called yet?
  • Was the Promotion successfully added to the Profile?
  • Was the Promotion represented correctly in the repository?  
 

2 comments:

  1. Share great information about your blog , Blog really helpful for us . We read your blog , share most useful information in blog . Thanks for share your blog here .
    dhl

    ReplyDelete
  2. It become an attractive part of a blog when author uses indirect speech while writing a blog. It shows your creative mind as well as make your written essay different from others.
    บริการ ส่ง พัสดุ

    ReplyDelete