- ${data.eventName == 'mouseout' ? data.selectedOptions[0] : (data.targetOption || data.defaultValue || '')}
${function() {
var thumbSwitchName = '';
return (data.product.options || []).map((option, index) => {
const optionName = option.name || '';
const position = `option${index + 1}`;
var isThumbImage = false;
if (data.product.need_variant_image && thumbSwitchName === '') {
const variantNames = ["color"] || [];
for (let i = 0, len = variantNames.length; i < len; i++) {
const name = variantNames[i];
if (name === optionName) {
isThumbImage = true;
thumbSwitchName = name;
}
}
}
const variantType = "button";
const thumbStyle = "image_with_text";
const mouseEvent = isThumbImage ? ('single-product-variant-template-1664529798004-' + optionName + '.rerender(data=event);') : '';
return (variantType == 'dropdown' && !isThumbImage) ? `
` : `
`;
}).join('')
}()}
${optionName.toLowerCase()}