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

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

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

jonesde
Author: jonesde
Date: Fri Jan 19 12:48:37 2007
New Revision: 497952

URL: http://svn.apache.org/viewvc?view=rev&rev=497952
Log:
Added support for orderByFields in the context for the categorydetail page, for sorting the products in the category

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

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/categorydetail.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/categorydetail.bsh?view=diff&rev=497952&r1=497951&r2=497952
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/categorydetail.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/categorydetail.bsh Fri Jan 19 12:48:37 2007
@@ -48,7 +48,11 @@
         "defaultViewSize", defaultViewSize, "limitView", limitView);
 andMap.put("prodCatalogId", currentCatalogId);
 andMap.put("checkViewAllow", Boolean.TRUE);
-andMap.put("orderByFields", UtilMisc.toList("sequenceNum", "productId"));
+if (context.get("orderByFields") != null) {
+    andMap.put("orderByFields", context.get("orderByFields"));
+} else {
+    andMap.put("orderByFields", UtilMisc.toList("sequenceNum", "productId"));
+}
 catResult = dispatcher.runSync("getProductCategoryAndLimitedMembers", andMap);
 
 productCategory = catResult.get("productCategory");