Skip Navigation

[Résolu] Sort by Price isn't working

This support ticket is created Il y a 3 années et 10 mois. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. 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 réponses, has 2 voix.

Last updated by Ido Angel Il y a 3 années et 10 mois.

Assisted by: Waqar.

Auteur
Publications
#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

Waqar
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

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

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