KeK0 Posted October 13, 2009 Share Posted October 13, 2009 Hi all.It's possible to sort the order of the products lists putting the without stock products the last in the list?sorry for my bad englsih and thx's Link to comment Share on other sites More sharing options...
rocky Posted October 13, 2009 Share Posted October 13, 2009 Do you mean in the Front Office or Back Office? In the Back Office, you can click the down arrow under the Quantity column of the product list to sort from highest to lowest quantity. In the Front Office, you can choose "in-stock first" in the "sort by" dropdown on the product listings. Link to comment Share on other sites More sharing options...
KeK0 Posted October 14, 2009 Author Share Posted October 14, 2009 Hello Rocky, thx's for your help First of all sorry for the little details in my post.I am referring about to put by default to show for my customers in front office. When any new visit enter in my web that he view this order by default "in-stock first".I see in preferences-products (in BO) that I can to sort this order by default, but I don't see here "in-stock first".Thx's again for your help. Link to comment Share on other sites More sharing options...
rocky Posted October 14, 2009 Share Posted October 14, 2009 Thanks for giving me more information. You are right that under Preferences > Products, there is no option to set the default sort order to 'in-stock first'. You could achieve this by changing lines 6 and 7 of product-sort.php from: $orderBy = Tools::strtolower(Tools::getValue('orderby', $orderByValues[intval(Configuration::get('PS_PRODUCTS_ORDER_BY'))])); $orderWay = Tools::strtoupper(Tools::getValue('orderway', $orderWayValues[intval(Configuration::get('PS_PRODUCTS_ORDER_WAY'))])); to: $orderBy = Tools::strtolower(Tools::getValue('orderby', 'quantity')); $orderWay = Tools::strtoupper(Tools::getValue('orderway', 'desc')); Link to comment Share on other sites More sharing options...
KeK0 Posted October 14, 2009 Author Share Posted October 14, 2009 Works perfectlly!! Many thx's rocky!! Link to comment Share on other sites More sharing options...
paradate Posted August 18, 2010 Share Posted August 18, 2010 Rocky - God bless you.By the way, I installed phpMyAdmin on my server and I update tons of items in few seconds with a simple SQL script.Highly recomended. Link to comment Share on other sites More sharing options...
Recommended Posts