Author: mor
Date: Mon Jan 16 10:44:05 2012
New Revision: 1231910
URL:
http://svn.apache.org/viewvc?rev=1231910&view=revLog:
Merged from trunk r1231907. Log: Bug fix: Shipping promotion is valid when identified with a combination of shipping method and carrier party and not alone with shipping method. Contribution from Arun Patidar.
Modified:
ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
Modified: ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java?rev=1231910&r1=1231909&r2=1231910&view=diff==============================================================================
--- ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java (original)
+++ ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java Mon Jan 16 10:44:05 2012
@@ -824,8 +824,9 @@ public class ProductPromoWorker {
String inputParamEnumId = productPromoCond.getString("inputParamEnumId");
String operatorEnumId = productPromoCond.getString("operatorEnumId");
String shippingMethod = "";
-
+ String carrierPartyId = "";
if (otherValue != null && otherValue.contains("@")) {
+ carrierPartyId = otherValue.substring(0, otherValue.indexOf("@"));
shippingMethod = otherValue.substring(otherValue.indexOf("@")+1);
otherValue = "";
}
@@ -1219,7 +1220,7 @@ public class ProductPromoWorker {
}
}
}
- } else if ("PPIP_ORDER_SHIPTOTAL".equals(inputParamEnumId) && shippingMethod.equals(cart.getShipmentMethodTypeId())) {
+ } else if ("PPIP_ORDER_SHIPTOTAL".equals(inputParamEnumId) && shippingMethod.equals(cart.getShipmentMethodTypeId()) && carrierPartyId.equals(cart.getCarrierPartyId())) {
if (UtilValidate.isNotEmpty(condValue)) {
BigDecimal orderTotalShipping = cart.getTotalShipping();
if (Debug.verboseOn()) { Debug.logVerbose("Doing order total Shipping compare: ordertotalShipping=" + orderTotalShipping, module); }