From 375eec00c2d5fe9cc72b28fc8910031888bf4971 Mon Sep 17 00:00:00 2001 From: Scott Gray Date: Mon, 21 Jun 2010 08:05:07 +0000 Subject: [PATCH] Update catalog urls to use the new OfbizCatalogUrl directive git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@956485 13f79535-47bb-0310-9956-ffa450edef68 --- .../order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl | 6 ++---- .../order/webapp/ordermgr/entry/catalog/compareproducts.ftl | 2 +- .../order/webapp/ordermgr/entry/catalog/productsummary.ftl | 2 +- .../ecommerce/webapp/ecommerce/catalog/sidedeepcategory.ftl | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl b/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl index f84457d8c6..6198607384 100644 --- a/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl +++ b/applications/order/webapp/ordermgr/entry/catalog/breadcrumbs.ftl @@ -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 (Static["org.ofbiz.product.category.CategoryWorker"].checkTrailItem(request, category.getString("productCategoryId"))) || (curCategoryId?exists && curCategoryId == category.productCategoryId)>
  • <#if catContentWrappers?exists && catContentWrappers[category.productCategoryId]?exists> - + " class="<#if curCategoryId?exists && curCategoryId == category.productCategoryId>buttontextdisabled<#else>linktext"> <#if catContentWrappers[category.productCategoryId].get("CATEGORY_NAME")?exists> ${catContentWrappers[category.productCategoryId].get("CATEGORY_NAME")} <#elseif catContentWrappers[category.productCategoryId].get("DESCRIPTION")?exists> diff --git a/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl b/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl index 68fe2f05df..b3f1a8d99f 100644 --- a/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl +++ b/applications/order/webapp/ordermgr/entry/catalog/compareproducts.ftl @@ -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 smallImageUrl = productContentWrapper.get("SMALL_IMAGE_URL")/> <#if smallImageUrl!?length == 0> <#assign smallImageUrl = "/images/defaultImage.jpg"/> diff --git a/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl b/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl index 2073b555ab..cfc474ba8d 100644 --- a/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl +++ b/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl @@ -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/> <#if requestAttributes.productCategoryMember?exists> <#assign prodCatMem = requestAttributes.productCategoryMember> diff --git a/specialpurpose/ecommerce/webapp/ecommerce/catalog/sidedeepcategory.ftl b/specialpurpose/ecommerce/webapp/ecommerce/catalog/sidedeepcategory.ftl index 8dd36ef492..ea03157337 100644 --- a/specialpurpose/ecommerce/webapp/ecommerce/catalog/sidedeepcategory.ftl +++ b/specialpurpose/ecommerce/webapp/ecommerce/catalog/sidedeepcategory.ftl @@ -49,7 +49,7 @@ under the License. <#else> <#assign parentCategoryId = ""/> - <#if categoryName?has_content>${categoryName}<#else>${categoryDescription?default("")} + <#if categoryName?has_content>${categoryName}<#else>${categoryDescription?default("")} <#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)>