Author: mbrohl
Date: Sat Sep 19 12:37:52 2015
New Revision: 1704003
URL:
http://svn.apache.org/viewvc?rev=1704003&view=revLog:
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/branches/release12.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
Modified: ofbiz/branches/release12.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=1704003&r1=1704002&r2=1704003&view=diff==============================================================================
--- ofbiz/branches/release12.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/branches/release12.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Sat Sep 19 12:37:52 2015
@@ -915,8 +915,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. */