Setting “In-stock first” as default option on products pages – Prestashop 1.4

There is no option like that in Back Office  -> Preferences -> Products. The relevant admin tabs code shows ( AdminPPreferences.php) :

array(‘id’ => ‘0’, ‘name’ => $this->l(‘Product name’)),
array(‘id’ => ‘1’, ‘name’ => $this->l(‘Product price’)),
array(‘id’ => ‘2’, ‘name’ => $this->l(‘Product added date’)),
array(‘id’ => ‘4’, ‘name’ => $this->l(‘Position inside category’)),
array(‘id’ => ‘5’, ‘name’ => $this->l(‘Manufacturer’)),
array(‘id’ => ‘3’, ‘name’ => $this->l(‘Product modified date’))

which is missing option “6” that stands for the “In-stock first” option.

Simply modify the following two database configuration options:

Change the PS_CONFIGURATION table PS_PRODUCTS_ORDER_BY option to “6”

Change the PS_CONFIGURATION table PS_PRODUCTS_ORDER_WAY option to “1”

That’s it

3 thoughts on “Setting “In-stock first” as default option on products pages – Prestashop 1.4

  1. Od

    PS_PRODUCTS_ORDER_BY or PS_PRODUCTS_ORDER_WAY doesn’t exist under the PS_CONFIGURATION table. This must’ve been changed in a new version, do you know where these values are located in 1.4.6.2? Thanks

  2. admin Post author

    Hi I am running 1.4.6.2 on one of my shops and it is still there. I am not sure why you do not have it.

  3. bannedillo

    Hello!, i have a question:

    this fix works perfect, but only one problem, when somebody uses the search box, the results are not showing like categories, with the stock first.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.