Author: sascharodekamp
Date: Thu Mar 29 07:50:33 2012
New Revision: 1306739
URL:
http://svn.apache.org/viewvc?rev=1306739&view=revLog:
ProductStoreCartAwareEvents: wrong check for website in setSessionProductStore (
https://issues.apache.org/jira/browse/OFBIZ-4744). A patch from Michael Brohl: There's a duplicate check if the productStore is null instead of checking productStore and website in ProductStoreCartAwareEvents.setSessionProductStore.
Modified:
ofbiz/branches/release10.04/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductStoreCartAwareEvents.java
Modified: ofbiz/branches/release10.04/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductStoreCartAwareEvents.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductStoreCartAwareEvents.java?rev=1306739&r1=1306738&r2=1306739&view=diff==============================================================================
--- ofbiz/branches/release10.04/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductStoreCartAwareEvents.java (original)
+++ ofbiz/branches/release10.04/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductStoreCartAwareEvents.java Thu Mar 29 07:50:33 2012
@@ -80,7 +80,7 @@ public class ProductStoreCartAwareEvents
// make sure ProductStore change is allowed for the WebSite
GenericValue webSite = WebSiteWorker.getWebSite(request);
- if (productStore == null) {
+ if (webSite == null) {
throw new IllegalArgumentException("Cannot set session ProductStore, could not find WebSite record based on web.xml setting.");
}
String allowProductStoreChange = webSite.getString("allowProductStoreChange");