svn commit: r645457 - /ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/product.bsh

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

svn commit: r645457 - /ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/product.bsh

jleroux@apache.org
Author: jleroux
Date: Mon Apr  7 03:58:43 2008
New Revision: 645457

URL: http://svn.apache.org/viewvc?rev=645457&view=rev
Log:
A patch from Raj Saini "Product detail page shows page title as "Product Page" instead of the actual product name" (https://issues.apache.org/jira/browse/OFBIZ-1740) - OFBIZ-1740

Modified:
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/product.bsh

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/product.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/product.bsh?rev=645457&r1=645456&r2=645457&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/product.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/product.bsh Mon Apr  7 03:58:43 2008
@@ -25,6 +25,7 @@
 import org.ofbiz.product.catalog.*;
 import org.ofbiz.product.category.*;
 import org.ofbiz.product.product.ProductWorker;
+import org.ofbiz.product.product.ProductContentWrapper;
 
 dispatcher = request.getAttribute("dispatcher");
 delegator = request.getAttribute("delegator");
@@ -78,8 +79,10 @@
     
     if (product != null) {
         context.put("product", product);  
-        context.put("title", product.getString("productName"));
-        context.put("metaDescription", product.getString("productName"));
+        ProductContentWrapper contentWrapper = new ProductContentWrapper(product, request);
+        context.put("title", contentWrapper.get("PRODUCT_NAME"));        
+        context.put("metaDescription", contentWrapper.get("DESCRIPTION"));
+
         keywords = new ArrayList();
         keywords.add(product.getString("productName"));
         keywords.add(catalogName);