Author: jacopoc
Date: Thu Apr  5 09:27:57 2012
New Revision: 1309716

URL: http://svn.apache.org/viewvc?rev=1309716&view=rev
Log:
Prevent NPE error if a bulk item is added to the cart.

Modified:
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl

Modified: 
ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl?rev=1309716&r1=1309715&r2=1309716&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl 
(original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/cart/showcartitems.ftl 
Thu Apr  5 09:27:57 2012
@@ -211,8 +211,10 @@ under the License.
             </tr>
 
             <#-- Show Associated Products (not for Variants) -->
-            <#assign itemProductAssocList = 
cartLine.getProduct().getRelated("MainProductAssoc",
-                
Static["org.ofbiz.base.util.UtilMisc"].toList("productAssocTypeId", 
"sequenceNum"))?if_exists/>
+            <#if cartLine.getProductId()?exists>
+              <#assign itemProductAssocList = 
cartLine.getProduct().getRelated("MainProductAssoc",
+                  
Static["org.ofbiz.base.util.UtilMisc"].toList("productAssocTypeId", 
"sequenceNum"))?if_exists/>
+            </#if>
             <#if itemProductAssocList?exists && 
itemProductAssocList?has_content>
               <tr><td colspan="8"><hr /></td></tr>
               <tr>


Reply via email to