Author: mbrohl
Date: Sat Sep 19 12:31:08 2015
New Revision: 1704000
URL: http://svn.apache.org/viewvc?rev=1704000&view=rev
Log:
Applied patch for OFBIZ-6631: Optimize ShoppingCart.removeCartItem (skip price
calc and inventory check).
Thanks Martin Becker for spotting this and providing the patch.
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=1704000&r1=1703999&r2=1704000&view=diff
==============================================================================
---
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
(original)
+++
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
Sat Sep 19 12:31:08 2015
@@ -932,8 +932,8 @@ public class ShoppingCart implements Ite
if (cartLines.size() <= index) return;
ShoppingCartItem item = cartLines.remove(index);
- // set quantity to 0 to trigger necessary events
- item.setQuantity(BigDecimal.ZERO, dispatcher, this);
+ // set quantity to 0 to trigger necessary events, but skip price calc
and inventory checks
+ item.setQuantity(BigDecimal.ZERO, dispatcher, this, true, true, false,
true);
}
/** Moves a line item to a different index. */