OFBiz
  1. OFBiz
  2. OFBIZ-2741

Information of shipping method and sales tax are remove from cart when we update shopping cart item quantity.

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: Release Branch 09.04, Trunk
    • Fix Version/s: None
    • Labels:
      None

      Description

      On update cart item quantity after selecting shipping method, Informations of shipping method and sales tax removes if there is only one item in cart.

      1. OFBIZ-2741.2.patch
        2 kB
        Joe Eckard
      2. OFBIZ-2741.patch
        0.9 kB
        Arun Patidar
      3. OFBIZ-2741.patch
        0.5 kB
        Arun Patidar
      4. sci-patch.txt
        0.8 kB
        Joe Eckard

        Activity

        Hide
        Arun Patidar added a comment -

        Here is patch for this.

        Show
        Arun Patidar added a comment - Here is patch for this.
        Hide
        Joe Eckard added a comment -

        I noticed this last week also... but I have a different fix (see patch). The question is: why were we always resetting the ship info each time an item was modified, and do we need to handle that conditionally now?

        Show
        Joe Eckard added a comment - I noticed this last week also... but I have a different fix (see patch). The question is: why were we always resetting the ship info each time an item was modified, and do we need to handle that conditionally now?
        Hide
        Arun Patidar added a comment -

        Thanks Joe for looking into it, I tested your patch but it does not work properly for me. I am attaching new patch which is working in both cases (update qty and remove item).

        Show
        Arun Patidar added a comment - Thanks Joe for looking into it, I tested your patch but it does not work properly for me. I am attaching new patch which is working in both cases (update qty and remove item).
        Hide
        Arun Patidar added a comment -

        Here is improved patch for this.

        Show
        Arun Patidar added a comment - Here is improved patch for this.
        Hide
        Vikas Mayur added a comment -

        Thanks Arun, Joe.

        Arun your patch is in trunk rev. 796992 as well as in release09.04 (I did not tested in release though but it should be fine) rev. 796993

        Vikas

        Show
        Vikas Mayur added a comment - Thanks Arun, Joe. Arun your patch is in trunk rev. 796992 as well as in release09.04 (I did not tested in release though but it should be fine) rev. 796993 Vikas
        Hide
        Joe Eckard added a comment -

        This bug is still present - the line:

        cart.setItemShipGroupQty(item, quantity, 0);

        in the applied patch can be reverted - it is unnecessary because setItemShipGroupQty() is already called within item.setQuantity(), and it doesn't address the problem.

        The code that is clearing the shipping contact mech when an item is added (or the quantity is changed) is ShoppingCart.clearItemShipInfo() followed directly by ShoppingCart.cleanUpShipGroups(). This happens when resetShipGroups is set to true, which is the default value when calling setQuantity() on a ShoppingCartItem.

        Also, it only seems to do this when there is only 1 line item in the cart - when there are multiple line items, it doesn't clear the shipping contact mech.

        I was working on a patch but ran out of time, adding notes here so I can come back to it or someone else can take a quick look.

        Show
        Joe Eckard added a comment - This bug is still present - the line: cart.setItemShipGroupQty(item, quantity, 0); in the applied patch can be reverted - it is unnecessary because setItemShipGroupQty() is already called within item.setQuantity(), and it doesn't address the problem. The code that is clearing the shipping contact mech when an item is added (or the quantity is changed) is ShoppingCart.clearItemShipInfo() followed directly by ShoppingCart.cleanUpShipGroups(). This happens when resetShipGroups is set to true, which is the default value when calling setQuantity() on a ShoppingCartItem. Also, it only seems to do this when there is only 1 line item in the cart - when there are multiple line items, it doesn't clear the shipping contact mech. I was working on a patch but ran out of time, adding notes here so I can come back to it or someone else can take a quick look.
        Hide
        Vikas Mayur added a comment -

        Could you please add steps to reproduce this issue?

        Show
        Vikas Mayur added a comment - Could you please add steps to reproduce this issue?
        Hide
        Joe Eckard added a comment -

        Create a PO for DemoSupplier consisting of 1 item. Finalize order, continue through selecting the shipping address, then go back to order items and change quantity and finalize again.

        I am working on a custom codebase that sets order info before items are added, so I can't easily provide examples for those scenarios. The applied patch only addresses the scenario where item quantities are modified for sales orders.

        Show
        Joe Eckard added a comment - Create a PO for DemoSupplier consisting of 1 item. Finalize order, continue through selecting the shipping address, then go back to order items and change quantity and finalize again. I am working on a custom codebase that sets order info before items are added, so I can't easily provide examples for those scenarios. The applied patch only addresses the scenario where item quantities are modified for sales orders.
        Hide
        Joe Eckard added a comment -

        Updated patch. A side effect will be that empty ship groups are not auto-cleared when empty, you have to explicitly request this with finalizeMode=removeEmptyShipGroups during checkout. Not committing right away in case there are objections to this behavior.

        Show
        Joe Eckard added a comment - Updated patch. A side effect will be that empty ship groups are not auto-cleared when empty, you have to explicitly request this with finalizeMode=removeEmptyShipGroups during checkout. Not committing right away in case there are objections to this behavior.
        Hide
        Jacques Le Roux added a comment -

        Should we not take care of this?

        Show
        Jacques Le Roux added a comment - Should we not take care of this?
        Hide
        Jacques Le Roux added a comment -

        Vikas, Joe,

        Should I take over?

        Show
        Jacques Le Roux added a comment - Vikas, Joe, Should I take over?

          People

          • Assignee:
            Jacques Le Roux
            Reporter:
            Arun Patidar
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development