3 Replies Latest reply on Apr 20, 2017 6:43 PM by RJ Nunes

    Tips on adding additional shipping time to the order

    V.S.

      Hi there experts,

       

      I have a demand on which I have to add to the current shipping group (hardgood) an additional shipping time based on a property read from the SKUs in the current shopping cart.

       

       

      I was thinking about adding a property called something like "additionalShippingTime" to the hardgoodShippingGroup item-descriptor and then populate it when the cart changes since I need it based on the user's interaction, some SKUs have additional time, some don't,

       

      From here, I ask you, what is the best way to work on this new property, monitoring any changes on the cart and then populating this property? Or, do I might have a best way to implement this demand?

       

       

       

      Thanks in advance,

       

      VS.

        • 1. Re: Tips on adding additional shipping time to the order
          RJ Nunes

          Hi V.S.

          Should this information be displayed on the shopping cart page or in summary order panel on the checkout page?

          Or is it just to persist the information?

          • 2. Re: Tips on adding additional shipping time to the order
            V.S.

            Hey RJ,

             

            I should persist and display the information on the frontend.

             

             

            We're thinking about putting the checkups and validations in the ShippingMethodCalculator chain.

             

            I've done some tests and it hadn't any blindspots yet.

             

            I think there are other pipelines that would fit better in this demand, like overriding addItemTocart(), removeItemFromCart() or simply updateCart() and updateOrder(), but, since we have strong customization in the application, those tries didn't worked for us.

            • 3. Re: Tips on adding additional shipping time to the order
              RJ Nunes

              Really V.S, there are several ways for this solution.

              The idea of changing the updateOrder seems to cover most if not all situations, since the methods I've seen call an updateOrder, like addItemFromOrder and removeItemFromOrder, AddItemToCartServlet.

               

              The updateOrder call a pipeline named SaveOrderObject.

              Then extends the /atg/commerce/order/processor/SaveOrderObject and implment your logic for the property additionalShippingTime and save in the order.

               

              Does it make sense to you?

               

              Regards

              RJ.

              1 person found this helpful