Author: jonesde
Date: Sat Dec 23 16:25:53 2006 New Revision: 489958 URL: http://svn.apache.org/viewvc?view=rev&rev=489958 Log: Changed so price conditions must succeed on the product itself and not on the product OR the virtual product if the main product is a variant; I don't know why that was put in there in the first place, so just commenting out for a while to see if it causes any problems; considering the virtual product does cause problems in certain circumstances with false positives on conditions Modified: incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java Modified: incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java?view=diff&rev=489958&r1=489957&r2=489958 ============================================================================== --- incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java (original) +++ incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java Sat Dec 23 16:25:53 2006 @@ -536,10 +536,13 @@ if (!checkPriceCondition(productPriceCond, productId, prodCatalogId, productStoreGroupId, webSiteId, partyId, new Double(quantity), listPriceDbl.doubleValue(), currencyUomId, delegator, nowTimestamp)) { // if there is a virtualProductId, try that given that this one has failed if (virtualProductId != null) { + /* DEJ20061223 I don't know why we were trying conditions with the virtualProductId as well; this breaks various things you might want to do with price rules, so unless a need comes up for this in the future, removing it for now... if (!checkPriceCondition(productPriceCond, virtualProductId, prodCatalogId, productStoreGroupId, webSiteId, partyId, new Double(quantity), listPriceDbl.doubleValue(), currencyUomId, delegator, nowTimestamp)) { allExceptQuantTrue = false; } // otherwise, okay, this one made it so carry on checking + */ + allExceptQuantTrue = false; } else { allExceptQuantTrue = false; } @@ -885,11 +888,15 @@ if (!checkPriceCondition(productPriceCond, productId, prodCatalogId, productStoreGroupId, webSiteId, partyId, quantity, listPrice, currencyUomId, delegator, nowTimestamp)) { // if there is a virtualProductId, try that given that this one has failed if (virtualProductId != null) { + /* DEJ20061223 I don't know why we were trying conditions with the virtualProductId as well; this breaks various things you might want to do with price rules, so unless a need comes up for this in the future, removing it for now... if (!checkPriceCondition(productPriceCond, virtualProductId, prodCatalogId, productStoreGroupId, webSiteId, partyId, quantity, listPrice, currencyUomId, delegator, nowTimestamp)) { allTrue = false; break; } // otherwise, okay, this one made it so carry on checking + */ + allTrue = false; + break; } else { allTrue = false; break; |
Free forum by Nabble | Edit this page |