Skip Navigation

[Resuelto] Sort by Price isn't working

This support ticket is created hace 4 años, 7 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Este tema contiene 17 respuestas, tiene 2 mensajes.

Última actualización por Ido Angel hace 4 años, 6 meses.

Asistido por: Waqar.

Autor
Mensajes
#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