svn commit: r956485 - in /ofbiz/trunk: applications/order/webapp/ordermgr/entry/catalog/ specialpurpose/ecommerce/webapp/ecommerce/catalog/

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

svn commit: r956485 - in /ofbiz/trunk: applications/order/webapp/ordermgr/entry/catalog/ specialpurpose/ecommerce/webapp/ecommerce/catalog/

lektran
Author: lektran
Date: Mon Jun 21 08:05:07 2010
New Revision: 956485

URL: http://svn.apache.org/viewvc?rev=956485&view=rev
Log:
Update catalog urls to use the new OfbizCatalogUrl directive

Modified:
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/sidedeepcategory.ftl

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl?rev=956485&r1=956484&r2=956485&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl Mon Jun 21 08:05:07 2010
@@ -23,15 +23,13 @@ under the License.
 <#-- looping macro -->
 <#macro categoryList parentCategory category>
   <#if parentCategory.productCategoryId != category.productCategoryId>
-    <#assign categoryUrl = Static["org.ofbiz.product.category.CatalogUrlServlet"].makeCatalogUrl(request, "", category.productCategoryId, parentCategory.productCategoryId) />
-  <#else>
-    <#assign categoryUrl = Static["org.ofbiz.product.category.CatalogUrlServlet"].makeCatalogUrl(request, "", category.productCategoryId, "") />
+    <#local previousCategoryId = parentCategory.productCategoryId />
   </#if>
 
   <#if (Static["org.ofbiz.product.category.CategoryWorker"].checkTrailItem(request, category.getString("productCategoryId"))) || (curCategoryId?exists && curCategoryId == category.productCategoryId)>
     <li>
     <#if catContentWrappers?exists && catContentWrappers[category.productCategoryId]?exists>
-      <a href="${categoryUrl}" class="<#if curCategoryId?exists && curCategoryId == category.productCategoryId>buttontextdisabled<#else>linktext</#if>">
+      <a href="<@ofbizCatalogUrl currentCategoryId=category.productCategoryId previousCategoryId=previousCategoryId!""/>" class="<#if curCategoryId?exists && curCategoryId == category.productCategoryId>buttontextdisabled<#else>linktext</#if>">
         <#if catContentWrappers[category.productCategoryId].get("CATEGORY_NAME")?exists>
           ${catContentWrappers[category.productCategoryId].get("CATEGORY_NAME")}
         <#elseif catContentWrappers[category.productCategoryId].get("DESCRIPTION")?exists>

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl?rev=956485&r1=956484&r2=956485&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl Mon Jun 21 08:05:07 2010
@@ -24,7 +24,7 @@ under the License.
     <#assign productData = productDataMap[product.productId]/>
     <#assign productContentWrapper = productData.productContentWrapper/>
     <#assign price = productData.priceMap/>
-    <#assign productUrl = StringUtil.wrapString(Static["org.ofbiz.product.category.CatalogUrlServlet"].makeCatalogUrl(request, product.productId, categoryId, ""))/>
+    <#assign productUrl><@ofbizCatalogUrl productId=product.productId currentCategoryId=categoryId/></#assign>
     <#assign smallImageUrl = productContentWrapper.get("SMALL_IMAGE_URL")/>
     <#if smallImageUrl!?length == 0>
         <#assign smallImageUrl = "/images/defaultImage.jpg"/>

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl?rev=956485&r1=956484&r2=956485&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl Mon Jun 21 08:05:07 2010
@@ -18,7 +18,7 @@ under the License.
 -->
 <#if product?exists>
     <#-- variable setup -->
-    <#assign productUrl = Static["org.ofbiz.product.category.CatalogUrlServlet"].makeCatalogUrl(request, product.productId, categoryId, "")/>
+    <#assign productUrl><@ofbizCatalogUrl productId=product.productId currentCategoryId=categoryId/></#assign>
 
     <#if requestAttributes.productCategoryMember?exists>
         <#assign prodCatMem = requestAttributes.productCategoryMember>

Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/sidedeepcategory.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/sidedeepcategory.ftl?rev=956485&r1=956484&r2=956485&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/sidedeepcategory.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/catalog/sidedeepcategory.ftl Mon Jun 21 08:05:07 2010
@@ -49,7 +49,7 @@ under the License.
           <#else>
             <#assign parentCategoryId = ""/>
           </#if>
-          <a href="${Static["org.ofbiz.product.category.CatalogUrlServlet"].makeCatalogUrl(request, "", category.productCategoryId, parentCategoryId)}" class="${browseCategoryButtonClass}"><#if categoryName?has_content>${categoryName}<#else>${categoryDescription?default("")}</#if></a>
+          <a href="<@ofbizCatalogUrl currentCategoryId=category.productCategoryId previousCategoryId=parentCategoryId/>" class="${browseCategoryButtonClass}"><#if categoryName?has_content>${categoryName}<#else>${categoryDescription?default("")}</#if></a>
 
   <#if (Static["org.ofbiz.product.category.CategoryWorker"].checkTrailItem(request, category.getString("productCategoryId"))) || (curCategoryId?exists && curCategoryId == category.productCategoryId)>
     <#local subCatList = Static["org.ofbiz.product.category.CategoryWorker"].getRelatedCategoriesRet(request, "subCatList", category.getString("productCategoryId"), true)>