Hi everyone
I work on a dynamic page to show my product informations.
I managed to get two dropdown buttons with the color and the size informations.
My Code, please dont throw stones at me
let tempArr1 = []
let sortArr = []
let itemObj = $w("#dynamicDataset").getCurrentItem();
let arrPath = itemObj.productOptions.Color.choices
for (var index = 0; index in arrPath; ++index) {
tempArr1.push(arrPath[index].value)
}
tempArr1.sort();
for (index = 0; index in arrPath; ++index) {
sortArr.push({"label": tempArr1[index], "value": tempArr1[index]})
}
$w("#dropdown1").options = sortArr
tempArr1 = []
arrPath = itemObj.productOptions.Size.choices
for (index = 0; index in arrPath; ++index) {
tempArr1.push({"label": arrPath[index].value, "value": arrPath[index].value})
}
$w("#dropdown2").options = tempArr1
Now i wanna change the images associated to the color value in the backend.
But i cant find the value. In this case there are two images connected per color value.
Can you tell me how i can get the images connected to a value?
Thanks for any help.
Cheers
Markus