Jump to content
mohcineel

SORT BY price not working on ps 1.7

Recommended Posts

Hello, i've just installed prestashop 1.7 on my server and added some products but when i select a categorie and use sort by price it gives a blank page with just the number of products, but the sort by name works, i parmetred the number of product per page to 80 .

this is the link to website

tachri.com 

Share this post


Link to post
Share on other sites

Hi,

I am experiencing the same thing and I noticed that if you disable the Faceted Search module, the sorting by price will work again.

let me know if it is the same for you.

I am still looking for a good solution as having the faceted search disabled is not a good option.

Thanks,

Slim 

 

Share this post


Link to post
Share on other sites

Hello,

as of FacetedSearch 3.2.1 you need to comment lines 333-335 in ps_facetedsearch/src/Adapter/MySQL.php:
 

//        if ($orderField === 'price') {
//            $orderField = $this->getOrderDirection() === 'asc' ? 'price_min' : 'price_max';
//        }

 

this change fixed it for me.

Share this post


Link to post
Share on other sites

 

 

Hi @karus,

 

You code works perfect, but not for multistore. Do you have any idea how to fix this?

 

Share this post


Link to post
Share on other sites
On 9/5/2019 at 11:44 PM, karus said:

Hello,

as of FacetedSearch 3.2.1 you need to comment lines 333-335 in ps_facetedsearch/src/Adapter/MySQL.php:
 


//        if ($orderField === 'price') {
//            $orderField = $this->getOrderDirection() === 'asc' ? 'price_min' : 'price_max';
//        }

 

this change fixed it for me.

I did it @karus , but won't work.

 

Result before and after:

https://imgur.com/xVALpM2

but with sorting with name it's ok:

https://imgur.com/Ad6K438

Edited by InfantryDev (see edit history)

Share this post


Link to post
Share on other sites

Module has been updated, probably that's the case. For 3.2.1 it is working also with multistore. I don't want to update because it may be harder to fix so I can't help you at this moment.

Share this post


Link to post
Share on other sites

Isn't it pathetic that on clean install of latest stable prestashop we can't sort products by price? How it's possible to release version with that bug and what's worse devs didn't fix it yet.

Share this post


Link to post
Share on other sites

Hello,

do you know if this is fixed now? I also have this issue with 1.7.6.1 and multistore..

 

regards

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

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