Configurable Swatches Playing Up
-
13-12-2019 - |
Question
On this item: https://sssextreme.com/westbeach-twist-ski-snowboard-ladies-jacket-rasberry-sinatra-blue.html It works fine 100%
But some items like this one below https://sssextreme.com/twf-adults-xt3-full-wetsuits.html It does not swatch, but it does on the category pages like below https://sssextreme.com/catalogsearch/result/?q=TWF+ADULTS+XT3+FULL+WETSUITS
Solution
Try rename this XXL - 47- 50"
because in 1.9.1 configurable swatch images do not swap correctly if attribute label contains ' " ' (quotes)
See http://www.magentocommerce.com/bug-tracking/issue/index/id/559
or
Copy app/design/frontend/rwd/default/template/configurableswatches/catalog/media/js.phtml to your local theme
Then change Line # 35
From
ConfigurableMediaImages.setImageFallback(<?php echo $imageFallback['product']->getId(); ?>, $j.parseJSON('<?php echo $imageFallback['image_fallback']; ?>'));
To
ConfigurableMediaImages.setImageFallback(<?php echo $imageFallback['product']->getId(); ?>, $j.parseJSON(<?php echo json_encode($imageFallback['image_fallback']); ?>));
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange