Order of Categories & Products
If I add a category later (it appears at bottom), how do I change the order of the listing of Categories (Alphabetical or otherwise)
and second if I add a product afterward, how do I change the order of products..
If I add a category later (it appears at bottom), how do I change the order of the listing of Categories (Alphabetical or otherwise)
and second if I add a product afterward, how do I change the order of products..
you can change the order the categories to products are displayed by adding an order by clause to the recordset.
the product results page is already set to order the products by the product name:
$query_WADAProducts = "SELECT * , coalesce((select ps3_productoptions.GroupingID from ps3_productoptions WHERE ps3_productoptions.ProductID = ps3_products.ProductID limit 1),ps3_products.ProductID) AS GroupingID FROM ps3_products WHERE ProductLive = 1 GROUP BY GroupingID ORDER BY ProductName";
but you could change this to order by another column if you like.
I am talking about the Drop Down Menu of the categories, not the one on the left, the one one the left seem to be in alphabetical order, but the drop down menu is not??
add the order by clause to the CSSMenuWriter/CSSMW_home/menu.php page.
change line 65:
$query_menuwriter_categories1 = sprintf("SELECT CategoryName, CategoryID, CategoryParent FROM ps3_categories WHERE CategoryParent=%s", GetSQLValueString($catID, "int"));
to:
$query_menuwriter_categories1 = sprintf("SELECT CategoryName, CategoryID, CategoryParent FROM ps3_categories WHERE CategoryParent=%s ORDER BY CategoryName DESC", GetSQLValueString($catID, "int"));
and change line 91:
$query_menuwriter_categories = "SELECT CategoryName, CategoryID FROM ps3_categories WHERE CategoryParent = 0";
to:
$query_menuwriter_categories = "SELECT CategoryName, CategoryID FROM ps3_categories WHERE CategoryParent = 0 ORDER BY CategoryName DESC";
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.