Hi,
I developed this solution for one of my clients.
when I click on the choice button, it says there is an TypeError as stated in the image below. since show() is a function in Corvid this is a weird situation.
I have attached the code as well.
Any help on this issue is highly appreciated.
Thanks in Advance.
Esmond
import wixWindow from ‘wix-window’;
//====== Global Variables ====== //
const NUMBER_OF_CHOICES = 2;
const productId = “2b127c36-745b-e1c0-61b5-913becd1ce6c”;
let selectedOptions = {};
//===== selectChoiceForOption() ===== //
function selectChoiceForOption($w, option, choiceData){
//selectedOptions[capitalizeFirstLetter(option)] = choiceData.title;
$w(#${option}Img
).src = choiceData.displayImage;
$w(#${option}Img
).show();
}
// ====== Shade Repeater ===== //
export function shadeSelectionRepeater_itemReady($w, itemData, index) {
$w(‘#selectShadeButton’).onClick(() => {
selectChoiceForOption($w, ‘lampshade’, itemData);
})
}
export function cableSelectionRepeater_itemReady($w, itemData, index) {
$w(‘#selectCableButton’).onClick(() => {
selectChoiceForOption($w, ‘Cable’, itemData);
})
}
You are correct - show() is a function in Corvid. But only for valid components. What component IDs does $w(#${option}Img
) end up with. That is, what are the values of option that can be used? And are there components on the page that have those IDs?
HI Yisrael,
Thank you very much for the quick response, Values from #selectCableButton and #selectShadeButton goes with $w(#${option}Img
)
And FYI, I strictly followed
https://support.wix.com/en/article/corvid-adding-a-product-configurator-to-a-wix-stores-site
Do you have two image elements named “lampshadeImg” and “CableImg”? My guess is that the value ‘Cable’ you pass as an argument to selectChoiceForOptions should start with lowercase ‘c’ not ‘C’?
[@Esmond Gunasekara] You are calling the selectChoiceForOptions function with bad arguments. What the function does in line 12 is takes the option argument and concates it with “#” and the text “Img”. To get the element name.
You are calling this function with the text lampshade and Cable.
So when you use lampshade the element name “#lampshadeImg” is created. When you use Cable the element name “#CableImg” is created. If you have shadeImg and wireImg the. The arguments should be ‘shade’ NOT ‘lampshade’ and ‘wire’ NOT ‘Cable’.

Hi Steven,
That Explains! 
Thank you very much, Highly appreciate the support.
Best Regards
Esmond