Hello,
- I created a collection, import all my products to the collection via CSV,
- Add a gallery to a page
- Connected the dataset to my collection4. Connected the Gallery to dataset
But I am unable to add a “Sort” option above the Gallery.
All I need is to connect two buttons “Price Low | High” to the Gallery.
I would really like to add Sort button so my customers would be able to click on to sort the list.
I did receive the cod
e but when I added it to the end of the page it is not working for some reason. I clicked on the Gallery Clicked on onCurrentitemChanged on the properties panel Pasted the whole script after the the lat }
mport wixData from ‘wix-data’;
$w.onReady( function() {
$w(“#button227”).onClick( (event, $w) => {
$w(“#dresses1”).setSort( wixData.sort()
.descending("pric
e");
} );
$w(“#button228”).onClick( (event, $w) => {
$w(“#dresses1”).setSort( wixData.sort()
.ascending(“price”);
} );
} );
This is the page I am working on. https://deli236.wixsite.com/sweetsmilecopy/dresses
Can you please have have a look at this.
Many thanks

