3 Replies Latest reply: Oct 31, 2012 2:38 AM by Nitin Khare RSS

    Add Item to Cart

    333
      hi all,
      When a customer creates a shopping cart (adds an item to the cart) an ItemPricingEngine loads item-level promotions for that particular customer
      when ItemPricingEngine calls while adding item to cart(in which class)


      thanks and regards
      shya
        • 1. Re: Add Item to Cart
          Siva S
          HI Shya,

          ItemPrcingEngine will be called while doing the "repriceOrder" after adding an item to cart.Below is the OOTB flow for adding an item to cart
          CartModifierFormHanlder.handleAddItemToOrder--->addItemToOrder--->doAddItemsToOrder--->getPurchaseProcessHelper().addItemsToOrder

          From PurchaseProcessHelper's addItemsToOrder() method repriceOrder chain will be called from the method "runProcessRepriceOrder".
          In "repriceOrder" commercePipeline ItemPricingEngine will be called.


          Thanks
          Siva
          • 2. Re: Add Item to Cart
            333
            hi Siva S,

            as you said,In "repriceOrder" commercePipeline ItemPricingEngine will be called.

            is there any way to see the coding



            regards
            shya

            Edited by: shya on Oct 31, 2012 12:18 PM
            • 3. Re: Add Item to Cart
              Nitin Khare
              You may not be able to see what exactly you are looking for as ATG has proprietary code. But just like other modules like DAS, DPS etc. some of the commerce module code is also provided for reference. You can look into the <ATG>\DCS\src\Java to explore and refer the code that has been provided. E.g. repriceOrder commerce pipeline chain has its PipelineProcessor object specified as atg.commerce.pricing.processor.PriceOrderTotal whose source is available in <ATG>\DCS\src\Java.