Custom product configurator - only shows last item in array

Hi all,

I was hoping someone could help me here; I’m at my wits end! I’m fairly new to wix, and especially new to Wix code, but I do have a good general understanding. I’m trying to add a custom configurator to my page so when the user selects an option, it loads an image.

I’ve been following this tutorial to the letter, and even copied the entire code from their dummy site, but for the life of me I can’t get it to work.

All of my buttons work, looking at the debug, it connects to the dataset, loads in the correct displayimages from my collection, and even adds the items to the basket from the product page - everything seems to be linking perfectly.

Except - no matter what option I select, it displays the last image and stores the last selection that was loaded into the array.

I’ve spent hours looking into this, re-reading the tutorial, and even started again, so was hoping someone could help. I’m sure it’s a simple setting somewhere but I’ve stared at it all for too long.

Many thanks in advance!

G