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.
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.
Share Improve this question edited Apr 13, 2017 at 12:54 CommunityBot 11 silver badge asked Jul 9, 2014 at 6:16 HarisHaris 6051 gold badge10 silver badges23 bronze badges 1- file path is design/frontend/rwd/default/template/review/product/view/list.phtml – Haris Commented Jul 10, 2014 at 4:42
4 Answers
Reset to default 7I'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> -->
I had a same problem and after a long search I use this code and every thing works well . I use var $j = jQuery.noConflict();
before elevateZoom
function .
<script>
// Avoid PrototypeJS conflicts, assign jQuery to $j instead of $
var $j = jQuery.noConflict();
$("#zoom_07").elevateZoom({});
</script>