3

How do I remove the zoom feature on hover on the image in product view page.

This is a standard magento function apparently.

2
  • Provide some more details! Commented Nov 23, 2016 at 11:46
  • It is a standard magento 2 function, magnifier.js and magnify.js come with magento 2
    – tread
    Commented Nov 23, 2016 at 11:49

2 Answers 2

3

In the module Magento_Catalog there is the jquery.zoom.min.js file. Just set the magnify property to 0.

(function ($) {
var defaults = {
    url: false,
    callback: false,
    target: false,
    duration: 120,
    on: 'grab', // other options: grab, click, toggle
    touch: true, // enables a touch fallback
    onZoomIn: false,
    onZoomOut: false,
    magnify: 0
};
1

You have to override etc/view.xml and change this code.

<var name="gallery">
    <var name="allowfullscreen">false</var> <!-- Turn on/off fullscreen (true/false) -->
    ...
</var>

or you can also use this.

<var name="magnifier">
   <var name="enabled">false</var> <!-- Turn on/off magnifier (true/false) -->
</var>

May be it will help you.

2
  • I have tried both of these. When you disable magnifier, the lightbox does not show when you click the image. But the product on hover zoom is still there.
    – tread
    Commented Nov 23, 2016 at 11:16
  • have you install third party extension for hover zoom? Commented Nov 23, 2016 at 11:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.