svn commit: r462908 - in /incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce: WEB-INF/actions/order/checkoutoptions.bsh catalog/minilastviewedcategories.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r462908 - in /incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce: WEB-INF/actions/order/checkoutoptions.bsh catalog/minilastviewedcategories.ftl

sichen
Author: sichen
Date: Wed Oct 11 12:29:23 2006
New Revision: 462908

URL: http://svn.apache.org/viewvc?view=rev&rev=462908
Log:
fix potential bug with last viewed categories when some categories don't have content wrappers

Modified:
    incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutoptions.bsh
    incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/catalog/minilastviewedcategories.ftl

Modified: incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutoptions.bsh
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutoptions.bsh?view=diff&rev=462908&r1=462907&r2=462908
==============================================================================
--- incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutoptions.bsh (original)
+++ incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/checkoutoptions.bsh Wed Oct 11 12:29:23 2006
@@ -31,7 +31,11 @@
 
 shippingEstWpr = null;
 if (shoppingCart != null) {
-    shippingEstWpr = new ShippingEstimateWrapper(dispatcher, shoppingCart, 0);
+    try {
+       shippingEstWpr = new ShippingEstimateWrapper(dispatcher, shoppingCart, 0);
+    } catch (Exception ex) {
+        print("exception: " + ex.getMessage());
+    }
     context.put("shippingEstWpr", shippingEstWpr);
     context.put("carrierShipmentMethodList", shippingEstWpr.getShippingMethods());
 }

Modified: incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/catalog/minilastviewedcategories.ftl
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/catalog/minilastviewedcategories.ftl?view=diff&rev=462908&r1=462907&r2=462908
==============================================================================
--- incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/catalog/minilastviewedcategories.ftl (original)
+++ incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/catalog/minilastviewedcategories.ftl Wed Oct 11 12:29:23 2006
@@ -32,7 +32,7 @@
                 <#if category?has_content>
                     <div>
                         <span class="browsecategorytext">-&nbsp;</span>                      
-                        <#if catContentWrappers[category.productCategoryId]?exists && catContentWrappers[category.productCategoryId].get("DESCRIPTION")?exists>
+                        <#if catContentWrappers?exists && catContentWrappers[category.productCategoryId]?exists && catContentWrappers[category.productCategoryId].get("DESCRIPTION")?exists>
                             <a href="<@ofbizUrl>category/~category_id=${categoryId}</@ofbizUrl>" class="browsecategorybutton">${catContentWrappers[category.productCategoryId].get("DESCRIPTION")}</a>
                         <#else>          
                             <a href="<@ofbizUrl>category/~category_id=${categoryId}</@ofbizUrl>" class="browsecategorybutton">${category.description?if_exists}</a>