Jump to content how make to add sort by reference in list of products?

Recommended Posts

  • 4 years later...

Hi, i write in this old topic my solution for prestashop 1.7.2:

in /modules/ps_facetedsearch/src/Ps_FacetedsearchProductSearchProvider.php

Search for:


    private function getAvailableSortOrders()
        return [

and after add:


(new SortOrder('product', 'reference', 'asc'))->setLabel(
                $this->module->getTranslator()->trans('Reference', array(), 'Modules.Facetedsearch.Shop')

Work for me! I hope is useful for someone..

Edited by Idroclic (see edit history)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More