top of page

Forum Posts

stechr
Jun 06, 2023
In Coding with Velo
Hi there, I'm trying to have my selection tags autopopulate depending on what product options (color, size, etc.) are available in the dataset. I have seen that others are able to assign selection tags their values by using the following code, but the example does not go deep enough into the results in order to demonstrate accessing the product options: $w.onReady(function () { wixData.query(productsDatabaseName) .find({appOptions: { // Include product variants in the query. Default is `false`. includeVariants: true } }) .then((results) => { console.log(results.items); let options = [] options = results.items.map(item => { return { label: item, value: item } }) coloursForTags = options; Any help on this would be very much appreciated. Many thanks!
0
2
19
stechr
Jun 06, 2023
In Coding with Velo
Hi there, I'm looking to sort my dataset, in code, by the discounted price field available in the products collection when using Wix Stores. I am only able to sort by the price field and specifying the discounted price field returns a validation error when I try to set the sort. Could anyone provide any info on wether or not I can sort by this field, please? Many thanks!
0
0
9

stechr

More actions
bottom of page