Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-4026

Shopping Cart Item issue with BigDecimal

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • jQuery, Release Branch 09.04, Release 09.04, Release Branch 10.04, Trunk
    • order
    • None
    • All

    Description

      In applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
      the setQuantity method should use this.quantity.compareTo(quantity) == 0 instead of this.quantity==quantity like depicted below

         protected void setQuantity(BigDecimal quantity, LocalDispatcher dispatcher, ShoppingCart cart, boolean triggerExternalOps, boolean resetShipGroup, boolean updateProductPrice, boolean skipInventoryChecks) throws CartItemModifyException {
             if (this.quantity == quantity)

      {            return;        }

      The issue is really visible when the cart is fully loaded (lot of products) as the return will never occur and the store is configurerd in an autosavecart mode.

      For example a cart with 48 products will take very long time to process for each additem or modifycart event.

      Attachments

        Activity

          People

            jleroux Jacques Le Roux
            patrick.antivackis Patrick Antivackis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: