Trying to set the sort by value in Shop Archive created with Blocks.
Since Toolset does not offer any customisation for the Select with which we can define sorting direction (asc, desc), we need to create a hack using icons, and on click on those icons, fire JS, that changes the values of the sorting options so it trigger the sort direction
But it is not as easy as it seems
hidden link
There is a sort asc desc select
Next to it there are 2 icons arrow up and down
When you click arrow up or down it will change the value in the asc/desc select properly.
But nothing will happen. No change is induced, sorting is not changed, and the option values themselves stay unselected.
I tried by several approaches but got tired because each time I save the JS I need to save it twice for it to even save in the View, and even if I force a click on the option, somehow I cannot manage to fire the trigger that will update the page with the new sorting directions.
Probably because it uses a specific JS action fired only when the select is manually changed....
Can you help with this?
The goal is to display 2 arrows (up and down) that make the sorting happen.
If not, I understand. Custom code and contractor and such.
Thanks