If you're upgrading from PR8 here are the template changes necessary to use all of the new features in V9:
http://www.miva.com/version9-template-changes
http://www.miva.com/version9-template-changes
<script> AttributeMachine.prototype.Generate_Swatch = function (product_code, attribute, option) { var swatch = document.createElement('li'), img = document.createElement('img'); img.src = option.image; swatch.setAttribute('data-color', option.prompt); swatch.appendChild(img); return swatch; }; AttributeMachine.prototype.Swatch_Click = function(input, attribute, option) { var i, swatchNameElement = document.getElementById('js-swatch-name'); for (i = 0; i < input.select.options.length; i++) { if (input.select.options[i].value == option.code) { input.select.selectedIndex = i; }; }; if (attribute.inventory) { this.Attribute_Changed(input); }; swatchNameElement.innerHTML = option.prompt; }; </script>
Comment