Skip Navigation

[Resolved] Ajax pagination order by product price not working

This support ticket is created 5 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 5 years, 5 months ago.

Assisted by: Christian Cox.

Author
Posts
#1124579

I am trying to: Load more products on the archive page and expect them to load sorted by cheapest price first

Link to a page where the issue can be seen: hidden link

I expected to see: Products to load sorted by cheapest price first

Instead, I got: Products are coming based on the latest ID

We want to display the products on the shop page to be display based on Cheapest price first basis.

#1124736
order.png
wcv-settings.png

Hi, I see 3 potential problems here:
1. The WordPress Archive assigned to the Shop page was not ordered by price, it was ordered by post date. See order.png. I set the Order By option to be the calculated price WooCommerce Views field, ascending, as a number. I set the Secondary Order (when more than one product has the same price) to be post date. You can adjust the secondary sort method however you would like, but please do not adjust the primary order.
2. In WooCommerce Views, default Frontend Sorting was checked. I unchecked this to allow custom sorting. See wcv-settings.png.
3. The Static Product fields for Parametric Searches had not been updated since May, so I triggered the process again. The option "Manually" is selected, which means the values do not update until someone manually runs this process. One of the other two options should probably be selected so these values are calculated automatically on some regular schedule. See wcv-settings.png.

Now the sorting order seems to be more accurate, though RTL is a bit confusing for me. If you go to Products > All Products and sort by Price, the order matches the archive, except when products have the same price. If Products have the same price, WooCommerce seems to use Product In Stock status for secondary sorting. Views does not include that option in the GUI. I have selected post date, but you can adjust this however you want.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.