Alien(PL) Posted December 8, 2020 Share Posted December 8, 2020 (edited) How to add feature to sort by unit price to the listing page. I've tried to add $sortUnitPriceAsc = new SortOrder('product', 'unit_price_full', 'asc'); $sortUnitPriceDesc = new SortOrder('product', 'unit_price_full', 'desc'); to /modules/ps_facetedsearch/src/Product/SearchProvider.php Edited December 9, 2020 by Alien(PL) (see edit history) Link to comment Share on other sites More sharing options...
Alien(PL) Posted December 10, 2020 Author Share Posted December 10, 2020 Anyone? Link to comment Share on other sites More sharing options...
Santietsit Posted April 6 Share Posted April 6 this feature will be great (anyone solved it?) - I guess the issue is that not necesarily we will be talking about the same units... (unless forced by the developer) so I can see why it is not by default... Link to comment Share on other sites More sharing options...
AddWeb Solution Posted April 29 Share Posted April 29 On 12/9/2020 at 5:10 AM, Alien(PL) said: How to add feature to sort by unit price to the listing page. I've tried to add $sortUnitPriceAsc = new SortOrder('product', 'unit_price_full', 'asc'); $sortUnitPriceDesc = new SortOrder('product', 'unit_price_full', 'desc'); to /modules/ps_facetedsearch/src/Product/SearchProvider.php Hi, You need to override the SearchProvider class in your custom module and write the sorting customization. Also modify the template file responsible for rendering the listing page to include the sorting options. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now