Skip Navigation

[Resolved] Sort by Price isn't working

This support ticket is created 4 years, 6 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.

Our next available supporter will start replying to tickets in about 0.45 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 17 replies, has 2 voices.

Last updated by Ido Angel 4 years, 6 months ago.

Assisted by: Waqar.

Author
Posts
#1626263

Thx 🙂

I think it's from here:

https://toolset.com/forums/topic/load-more-button-3/

plus, I added this:

  jQuery(function(jQuery){
     WPViews.view_pagination.is_infinite_triggable = function(view_layout){return false; }
});

to remove auto load as suggested here:

https://toolset.com/forums/topic/load-more-button/

#1629013

Hi Ido,

Thank you for sharing these details.

As suspected, the instructions from those two threads have been shared for two different use cases or requirements, but they can't be used together, I'm afraid.

The script blocks the autoloading for infinite scroll but that also stops the reset function that triggers when the sorting order is changed from the front-end.

Based on what we have discussed, you can go with these workarounds:

1. If you need to show the list of products with front-end sorting controls, it would be better to use regular pagination where the results of other pages disappear, rather than the infinite scroll in which the previous results stay.

I recall that you're using this on the home page, as product slider, so this change shouldn't bring in any major visual or usability difference.

OR

2. If you'd like to keep the previous page results and front-end sorting, you can disable infinite scrolling and switch to regular pagination. Then using complex custom CSS and JS code, you can hide the actual list of view's results and maintain a shadow list on the page, in which new results are appended programmatically as they become available through pagination.

regards,
Waqar

#1629021

Thx Waqar 🙂
I'll just drop the price sorting for now.
cheers
Ido