chops07876 Posted June 10, 2013 Share Posted June 10, 2013 Hi Everyone, I'm trying to to set the default sort for products by Product ID. But none of the back office options seem to allow this functionality. I'm sure this must've cropped up before, but I can't find any information that relates to the latest version of PS. I was wondering if anyone knew of a way to add this? Cheers, Rob. Link to comment Share on other sites More sharing options...
vekia Posted June 10, 2013 Share Posted June 10, 2013 you're talking about product listing pagination? for example, when you're browsing categories in front office? Link to comment Share on other sites More sharing options...
chops07876 Posted June 10, 2013 Author Share Posted June 10, 2013 In all views if possible. Link to comment Share on other sites More sharing options...
benjamin utterback Posted June 10, 2013 Share Posted June 10, 2013 Hello, I thought that by default the products are sorted by Product ID. Have you tried changing the "Position" of the products. You can view this option as you edit a category in the catalog in the backoffice. Link to comment Share on other sites More sharing options...
chops07876 Posted June 11, 2013 Author Share Posted June 11, 2013 Apologies. This does appear to be functioning correctly when viewed by "Category" and selecting "Position Inside Category" from back office. However, this order does not function on products are view under "Manufacturer". The list is ordered by product name. How can this view be changed to sort by product ID? Link to comment Share on other sites More sharing options...
vekia Posted June 11, 2013 Share Posted June 11, 2013 in backoffice under the preferences > products tab you've got: Product add date works the same as Product ID Link to comment Share on other sites More sharing options...
chops07876 Posted June 11, 2013 Author Share Posted June 11, 2013 Thanks but unfortunately, this does not work. Some products were added after others, so they have a sequential ID, but appear later in the list. Changing date_add in SQL is a work around I guess, but I'd like to nail this one. I was hoping there would be a bit of code that could be swapped out. PS is getting the default order from somewhere. Any ideas where $orderbydefault is set? Link to comment Share on other sites More sharing options...
vekia Posted June 11, 2013 Share Posted June 11, 2013 exactly there in backoffice preferences > products if you want to change order by for manufacturers, open manufactureres class: /classes/manufacturers.php there is a function: public static function getProducts($id_manufacturer, $id_lang, $p, $n, $order_by = null, $order_way = null, $get_total = false, $active = true, $active_category = true, Context $context = null) { you can set up own order method there manually Link to comment Share on other sites More sharing options...
chops07876 Posted June 14, 2013 Author Share Posted June 14, 2013 Thanks, vekia. I tried swapping out several variables and adding id_product, but clearly my lack of SQL understanding is hampering my efforts. (SQL is on my to learn list). I realise this is perhaps asking a bit too much in the way of good natured support, but would you be able give me a bit of assistance? Link to comment Share on other sites More sharing options...
iansari13 Posted June 1, 2014 Share Posted June 1, 2014 exactly there in backoffice preferences > products if you want to change order by for manufacturers, open manufactureres class: /classes/manufacturers.php there is a function: public static function getProducts($id_manufacturer, $id_lang, $p, $n, $order_by = null, $order_way = null, $get_total = false, $active = true, $active_category = true, Context $context = null) { you can set up own order method there manually Link to comment Share on other sites More sharing options...
iansari13 Posted June 1, 2014 Share Posted June 1, 2014 Dear Vekia and all the users, Could you please explain how to set default sorting of In Stock items fist in search result of Tag and Search section. I am using prestashop 1.5.6.0. Best Regards Admin fashionstore18.com Link to comment Share on other sites More sharing options...
vekia Posted June 1, 2014 Share Posted June 1, 2014 replied in your topic: http://www.prestashop.com/forums/topic/334522-default-sorting-of-in-stock-item/ 1 Link to comment Share on other sites More sharing options...
vishalsingh119 Posted July 8, 2016 Share Posted July 8, 2016 replied in your topic: http://www.prestashop.com/forums/topic/334522-default-sorting-of-in-stock-item/ hi sir, i want to add the pagination in my prestashop page,so guide me by using admin pannel,how i use pagination. thanks in advance Link to comment Share on other sites More sharing options...
vekia Posted July 10, 2016 Share Posted July 10, 2016 hi sir, i want to add the pagination in my prestashop page,so guide me by using admin pannel,how i use pagination. thanks in advance prestashop by default has pagination if you dont have it, it is probably a matter of: 1) you've got not enough product to make pagination 2) your theme does not have this feature Link to comment Share on other sites More sharing options...
Recommended Posts