Jump to content

Sort by price does not work


zomex

Recommended Posts

Hello all,

For some reason sort by price does not work on my installation. I wondered if this was due to using combinations and setting the main product to $0. But it efforts all products with or without combinations. As you can see there are products listed and the pagination but no products displayed.

See attached for some screenshots.

Has anyone faced this same issue?

Thanks,

Jack

Screen Shot 2019-11-09 at 19.22.35.png

Screen Shot 2019-11-09 at 19.22.23.png

Screen Shot 2019-11-09 at 19.22.12.png

Link to comment
Share on other sites

1 hour ago, zomex said:

For some reason sort by price does not work on my installation. I wondered if this was due to using combinations and setting the main product to $0. But it efforts all products with or without combinations. As you can see there are products listed and the pagination but no products displayed.

have you tried clearing the cache?

Best Regards

  • Like 1
Link to comment
Share on other sites

On 11/10/2019 at 12:27 AM, PCQUATRO said:

Try temporarely disable all extra modules you might have, do you have a theme installed!? try changing to classic...

Remember, ALLWAYS BACKUP FIRST

Best Regards

Thanks for your reply.

I have tried this using the classic theme and disabling all non-prestashop modules.

Unfortunately the issue remains. See the below screenshot.

 

Screen Shot 2019-11-11 at 01.05.10.png

Link to comment
Share on other sites

4 minutes ago, PCQUATRO said:

Try to put the store in Debug Mode and see if it throws you any error when you order products by price!?

Best Regards

For some reason just turning on debugging mode caused the below error (no admin page accessible now).

Thanks

 

frfrfr.png

Link to comment
Share on other sites

10 hours ago, PCQUATRO said:

have you seen this -> 

Best Regards

Thanks for sharing that with me.

I read all of the replies and there does not appear to be any fix. One was suggested but others said it did not work.

I have to say that I am not very impressed with Prestashop. It is quite disapointing that basic features and bugs such as this are not fixed, it makes me concered that there are more issues with the software and if future reported issues will ever be fixed.

Link to comment
Share on other sites

11 hours ago, PCQUATRO said:

Have you tried the suggested workarrounds?

Best Regards

Yes I have just tried it but no change.

10 hours ago, selectshop.at said:

I think a script is interfering in this. Which URL is your shop ? BTW the facetted search module had an update by today. Latest version is 3.4.0. You are using this module ?

I am using some custom JS in the custom.js file, i deleted this file to test and the same issue remains. I also tested with the classic theme earlier but the same issue.

It's looking more and more likely that this is a bug in prestashop.

Link to comment
Share on other sites

14 hours ago, zomex said:

I read all of the replies and there does not appear to be any fix. One was suggested but others said it did not work.

Found the solution for your problem...

Just go to modules manager faceted search -> rebuild price index...

priceindex.thumb.JPG.f2e776c9e23b196b9ce5df5462aeb2db.JPG

Best Regards

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

9 hours ago, PCQUATRO said:

Found the solution for your problem...

Just go to modules manager faceted search -> rebuild price index...

priceindex.thumb.JPG.f2e776c9e23b196b9ce5df5462aeb2db.JPG

Best Regards

I have tried this along with clearing the cache and attributes index but it does not fix the error.

I also have cache turned off for the whole store while in development.

Thanks.

Link to comment
Share on other sites

18 minutes ago, zomex said:

I have tried this along with clearing the cache and attributes index but it does not fix the error.

Strange!!! because i installed a new shop for testing purposes, and the problem you are having was there, and i solved it either by re-saving the products or just by indexing the prices!!!

maybe there is a problem in your database, if it´s still in development, i would advise you to start over, fullfiling all the system/server requirements for prestashop, because on my side i have no problem whatsoever.

https://devdocs.prestashop.com/1.7/basics/installation/system-requirements/

You can also try to create new products manualy (i don´t know if you imported the one that you have) and see what you get...

Remember ALLWAYS BACKUP FIRST...

Best Regards

Edited by PCQUATRO (see edit history)
  • Like 1
Link to comment
Share on other sites

36 minutes ago, PCQUATRO said:

Strange!!! because i installed a new shop for testing purposes, and the problem you are having was there, and i solved it either by re-saving the products or just by indexing the prices!!!

maybe there is a problem in your database, if it´s still in development, i would advise you to start over, fullfiling all the system/server requirements for prestashop, because on my side i have no problem whatsoever.

https://devdocs.prestashop.com/1.7/basics/installation/system-requirements/

You can also try to create new products manualy (i don´t know if you imported the one that you have) and see what you get...

Remember ALLWAYS BACKUP FIRST...

Best Regards

I appretiate your assistance with this.

The only thing I'm using that isn't stock is a module for importing products from aliexpress. But this module adds products as normal under the catelog page. I did test this with 3rd party modules turned off with no effect.

At this stage I'm not willing to start over, I've put too much time into everything and have been extra carful with the site and development.

I will test creating manual products now to ensure it's not something with the import module.

Link to comment
Share on other sites

36 minutes ago, PCQUATRO said:

Check to see if you have a table in your database named xx_layered_price_index and if it exists check it´s contentes...

Best Regards

Yes I do have it, seems to contain every product. See below.

Thanks

Screen Shot 2019-11-12 at 17.57.13.png

Link to comment
Share on other sites

12 minutes ago, zomex said:

Yes I do have it, seems to contain every product. See below.

Than your issue is not the same as the one i´ve been able to reproduce, anyway it could be related to the module you used for importing products, it could have messed up something, so the best thing to do is start over...

Best Regards

Link to comment
Share on other sites

9 minutes ago, PCQUATRO said:

Than your issue is not the same as the one i´ve been able to reproduce, anyway it could be related to the module you used for importing products, it could have messed up something, so the best thing to do is start over...

Best Regards

I have asked the developer to take a look. I still have my doubts that the module is the cause.

Aside from that one module everything within the install is stock.

I'm not willing to start over at this stage.

Link to comment
Share on other sites

Update: A very strange situation.

Currently all of my products do not have a tax enabled.

I have now found out that if I enable tax for a product it then will show for the price filter. See attached. I tested editing and saving a product but it had no effect, the only way it works is with a tax selected.

I wonder what is causing this.

Thanks.

Screen Shot 2019-11-12 at 19.26.31.png

Edited by zomex (see edit history)
Link to comment
Share on other sites

17 minutes ago, zomex said:

Update: A very strange situation.

Currently all of my products do not have a tax enabled.

I have now found out that if I enable tax for a product it then will show for the price filter. See attached. I tested editing and saving a product but it had no effect, the only way it works is with a tax selected.

I wonder what is causing this.

Thanks.

Nice, you figured it out :) you mean you had a null value on the tax?? or it was "without vat"?? I tested puting it without vat and it is still sorted...

Maybe the module you used did messed up something..

I´m glad it solved..

Best Regards

  • Like 1
Link to comment
Share on other sites

1 hour ago, PCQUATRO said:

Nice, you figured it out :) you mean you had a null value on the tax?? or it was "without vat"?? I tested puting it without vat and it is still sorted...

Maybe the module you used did messed up something..

I´m glad it solved..

Best Regards

Thanks.

That's without VAT. So it is still concerning though because I'm worried that there is a underlining issue that will cause future problems. But at the same time I am not willing to re-install and loose all the time invested.

But with that said I am glad that this does fix the sort feature.

Link to comment
Share on other sites

1 hour ago, zomex said:

That's without VAT. So it is still concerning though because I'm worried that there is a underlining issue that will cause future problems. But at the same time I am not willing to re-install and loose all the time invested.

And what if you set some VAT that put it again Without VAT, what happens??? if it continues showing in the sorting by price, than we can conclude that the import module did not write something it should have to the database...

There is no such thing as perfection, all softwares have flaws, some more than others, we just have to figure out how to solve things, and that should motivate us to learn more, witch will certainly increase our knowledge...

Best Regards

Edited by PCQUATRO (see edit history)
  • Like 1
Link to comment
Share on other sites

1 hour ago, PCQUATRO said:

And what if you set some VAT that put it again Without VAT, what happens??? if it continues showing in the sorting by price, than we can conclude that the import module did not write something it should have to the database...

There is no such thing as perfection, all softwares have flaws, some more than others, we just have to figure out how to solve things, and that should motivate us to learn more, witch will certainly increase our knowledge...

Best Regards

If I set it back to no tax then the original error remains.

Yes that is true, I am not so much worried about the feature as I am of there being an issue with the DB that will cause bigger problems in the future. I just don't see what is causing it not to work without tax set.

Link to comment
Share on other sites

Some more investigation.

Checking ps_layered_price_index it's full of data.

On my dev install where the feature is working the ps_layered_price_index table is empty.

When I enable tax for a product on the live site it adds 3 rows to ps_layered_price_index. I'm wondering if perhaps some of the data is invalid or glitched in that table? Also note that I have 3 currencies so it appears to be adding 3 rows per category. I'm wondering if by selecting the tax it's focing this table to update with the 3 rows correcting the issue (which may be rows missing from that table?).

Edited by zomex (see edit history)
Link to comment
Share on other sites

1 hour ago, zomex said:

When I enable tax for a product on the live site it adds 3 rows to ps_layered_price_index. I'm wondering if perhaps some of the data is invalid or glitched in that table? Also note that I have 3 currencies so it appears to be adding 3 rows per category. I'm wondering if by selecting the tax it's focing this table to update with the 3 rows correcting the issue (which may be rows missing from that table?).

What i´ve learned is that table keeps the price index used for sorting by price, so the products must be there. That table is populated by rebuilding the index on the faceted search as i posted earlier. The table also receive rows as you save products... It can have something to do with the fact that you have 3 currencies, i only have one... I might try to add some currencies and see how it goes...

Best Regards

Link to comment
Share on other sites

34 minutes ago, PCQUATRO said:

What i´ve learned is that table keeps the price index used for sorting by price, so the products must be there. That table is populated by rebuilding the index on the faceted search as i posted earlier. The table also receive rows as you save products... It can have something to do with the fact that you have 3 currencies, i only have one... I might try to add some currencies and see how it goes...

Best Regards

Thanks,

Looks like the data is correct in the DB at least with that table.

Another strange situation, it is working in Google Chrome and Safari but not Firefox. I cleared my browser cache and the error remains in Firefox. Perhaps it's a browser issue.

But then I have tested my dev domain (all stock) and the issue shows for me in all browsers:

https://zomex.net/prestashop/index.php?id_category=8&controller=category&id_lang=2

It just seems to be so tempermental.

As it's working in Chrome and Safari I am hoping that my install itself is fine and this is more of a glitch/bug with the browser but then it not working at all on my dev install contradicts that.

Link to comment
Share on other sites

6 hours ago, zomex said:

Another strange situation, it is working in Google Chrome and Safari but not Firefox. I cleared my browser cache and the error remains in Firefox. Perhaps it's a browser issue.

I have no issue whatsoever in any browser in 3 shops! all browsers sort the products by price as they should...

6 hours ago, zomex said:

But then I have tested my dev domain (all stock) and the issue shows for me in all browsers:

https://zomex.net/prestashop/index.php?id_category=8&controller=category&id_lang=2

That´s because you need to index prices in the faceted search module, or resave them...

Best Regards

Link to comment
Share on other sites

From what I see you are not using friendly URL's. Tried to set friendly URL's as well ? Same problem then ? BTW with Opera prices are not sorted as well.

Editted:

OK I see the problem. On my latest installation on own server I'm having same problem. Seems that this is a bug. Which PS-Version are you using ? Which php-version ? Which SQL ?

Link to comment
Share on other sites

As I was having same problem I did the following to manage it:

Reindexed the products: Shop parameters -> Search -> indexing

and also rebuildt the module like PCQuattro told before: module manager -> facetted search module -> configure (used all possible features there - index all missing prices, rebuild entire price index and clear cache):

search.PNG.b273265f0d3ebe999a0a0f43bae9878f.PNG

Now it's working for me as well:

search1.PNG.bc11a5bb0480acf5f706550e556ac723.PNG

 

Link to comment
Share on other sites

17 hours ago, zomex said:

Currently all of my products do not have a tax enabled.

I have now found out that if I enable tax for a product it then will show for the price filter. See attached. I tested editing and saving a product but it had no effect, the only way it works is with a tax selected.

How do you have this option???

vat.thumb.JPG.04deb8e44a12045eec4121114fb6d8be.JPG

Best Regards

Link to comment
Share on other sites

Thanks for the replies everyone,

The zomex.net domain was just a test of a stock install.

My main install is in maintenance mode but I have now turned this off and added a directory login:

URL: https://decorativegold.com/
 

---------------

Here's my stats

PrestaShop version: 1.7.6.1
Server software version: LiteSpeed
PHP version: 7.2.24
Memory limit: 512M
MySQL version: 10.3.18-MariaDB-log-cll-lve
MySQL server: 127.0.0.1

The browser I'm using:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:70.0) Gecko/20100101 Firefox/70.0

---------------

@selectshop.at

I have made all of the suggested changes, the issue remains in Firefox, that also includes after clearing my browser cache.

After completing these steps the the tax enabled products that were showing with the filter on are no longer showing. This is with or without the tax setting enabled in the search module.

@PCQUATRO

Yes I do have that option, it looked promising as it works with tax enabled but changing that setting on or off the issue remains.


---

Google Chrome is working perfectly. So it appears to be specific to my Firefox.

Edited by selectshop.at
Login details to your BO deleted by mod. (see edit history)
Link to comment
Share on other sites

5 minutes ago, selectshop.at said:

I think your problem is a cache problem. As I told before with Opera your "demo" shop is as well not working. Why Chrome only, I cannot say. Perhaps you are using something special on your server or shop. Overrides are disabled ? CCC options are enabled/disabled ?

Is it working for you in any browsers?

overrides enabled, all caching is disabled until I push it live.

Screen Shot 2019-11-13 at 14.44.42.png

Screen Shot 2019-11-13 at 14.44.50.png

Screen Shot 2019-11-13 at 14.44.55.png

Link to comment
Share on other sites

 

15 minutes ago, selectshop.at said:

Smarty correct setting is:

grafik.thumb.png.bfc9d1bd6183068fba911bc66f140d8c.png

Disable all overrides = Yes.

On my "demo shop" is now working with all browsers. Opera, FF, Chrome and MS Edge.

This is the correct settings for a live site.

The site is in development. I have tested your settings and it does not fix the issue.

I do appretiate the time you've given to checking this for me. But I have to say that Prestashop itself is not giving me much confidence I am really close to scrapping it and going with Magento.

Not just this issue but no ability to set a tax as exclusive is very concering as it's basic functionality for any ecommerce platform:

Prestashop seems to be all about selling 3rd party modules, which i understand and support as a business model until I find out that even to enable Google re-capcha requires a paid module.

Edited by zomex (see edit history)
Link to comment
Share on other sites

42 minutes ago, PCQUATRO said:

It asks for a password!

Best Regards

I added the login but someone removed it from my reply.

The login was just to load the website not to access anything.

I have disabled the login so you can take a look. I am still looking for a solution mostly to the tax situation:

https://www.prestashop.com/forums/topic/1008217-best-way-to-setup-vat-for-uk-business/

I would like to get to the bottom of this bug but it is not vital to launch where as the tax is.

Here is my website: https://decorativegold.com/

Link to comment
Share on other sites

Thanks for testing that for me, it must be an issue on my end or a glitch of some kind.

I will forget about this now and move on knowing that it will work for some.

---

Strangely I have Portugal enabled as a country so I will have to test why it shows the note that you can't order from Portugal.

Link to comment
Share on other sites

  • 6 months later...
On 11/13/2019 at 11:21 AM, selectshop.at said:

As I was having same problem I did the following to manage it:

Reindexed the products: Shop parameters -> Search -> indexing

and also rebuildt the module like PCQuattro told before: module manager -> facetted search module -> configure (used all possible features there - index all missing prices, rebuild entire price index and clear cache):

 

Had the same issue, the Cron wasn't firing properly, i had rebuilt the index and everything started to work properly. thanks !!! 

Link to comment
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...