You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mo...@apache.org on 2012/01/16 11:48:30 UTC
svn commit: r1231913 - in /ofbiz/branches/release10.04/applications:
order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
product/webapp/catalog/promo/EditProductPromoRules.ftl
Author: mor
Date: Mon Jan 16 10:48:29 2012
New Revision: 1231913
URL: http://svn.apache.org/viewvc?rev=1231913&view=rev
Log:
Merged partially from trunk r1231907, 10.04 required a slightly different fix. 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/release10.04/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
ofbiz/branches/release10.04/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl
Modified: ofbiz/branches/release10.04/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java?rev=1231913&r1=1231912&r2=1231913&view=diff
==============================================================================
--- ofbiz/branches/release10.04/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java (original)
+++ ofbiz/branches/release10.04/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java Mon Jan 16 10:48:29 2012
@@ -825,8 +825,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 = "";
}
@@ -1217,7 +1218,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); }
Modified: ofbiz/branches/release10.04/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl?rev=1231913&r1=1231912&r2=1231913&view=diff
==============================================================================
--- ofbiz/branches/release10.04/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl (original)
+++ ofbiz/branches/release10.04/applications/product/webapp/catalog/promo/EditProductPromoRules.ftl Mon Jan 16 10:48:29 2012
@@ -113,7 +113,7 @@ under the License.
</#if>
<label>${uiLabelMap.OrderSelectShippingMethod}:</label>
<select name = "carrierShipmentMethod">
- <option value = "${productPromoCond.carrierShippingMethod?if_exists}">${carrierParty?if_exists} ${description}</option>
+ <option value = "${carrierShippingMethod?if_exists}">${carrierParty?if_exists} ${description}</option>
<option value = ""> </option>
<#list carrierShipmentMethods as carrierShipmentMethod>
<#assign shipmentMethodType = carrierShipmentMethod.getRelatedOneCache("ShipmentMethodType")>