In Magento 1.9 CE, if we browse the product reviews page, it displays an error
TypeError: image.elevateZoom is not a function
This is because, magento is zooming image in product page using this plugin
the JavaScript interpreter, because of a failure shuts down on this page, JavaScript is not executed. This leads to decreased functionality of the page.
Can anyone help me on how to remove this error so that I can use js on this page?
These guys say they have solved the problem, but I can't get the solution.
I have asked the same question on Magento Stack.
I've got the same issue - not that it's a complete solution but it certainly stops the error for now, by stopping the function being called on the review page.
in the file /skin/frontend/rwd/default/js/app.js
line 649 change
image.elevateZoom();
to
if ($('.review-product-list').length == 0) {
image.elevateZoom();
}
We just ran across this for a client. This was resolved by changing the script being referenced from the min version to the full version. So replace this:
<action method="addItem"><type>skin_js</type>
<script>js/lib/elevatezoom/jquery.elevateZoom-3.0.8.min.js</script>
</action>
With this:
<action method="addItem"><type>skin_js</type>
<script>js/lib/elevatezoom/jquery.elevateZoom-3.js</script>
</action>
The error resolved and zoom is working.
Open app/design/frontend/your-package/your-theme/template/catalog/product/view/media.html
Comment below section of code
<!-- <script type="text/javascript">
// <![CDATA[
Event.observe(window, 'load', function() {
product_zoom = new Product.Zoom('image', 'track', 'handle', 'zoom_in', 'zoom_out', 'track_hint');
});
//]]>
</script> -->
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With