3

I've added this to default.xml, which partially works to remove the zoom feature

<head>
    <remove src="Magento_Catalog::js/jquery.zoom.min.js" />
</head>

However, a magnifying glass still appears above the product image on the product detail page.

I've noticed sections in view.xml, specifically vendor/magento/theme-frontend-blank/etc/view.xml which parameterize a magnifier, one of these seems to toggle it on or off -

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

This is set to false in my theme's view.xml file as well. Any idea what else I need to do to completely remove the magnification / zoom feature in Magento2?

2
  • Please look in to this file vendor\magento\module-catalog\view\frontend\templates\product\view\gallery.phtml Magnifier JS as well
    – Jackson
    Commented Oct 21, 2016 at 1:38
  • 1
    Add view.xml complete path for more information. Commented Oct 21, 2016 at 5:14

4 Answers 4

11

Having experimented with more settings in the view.xml file, it seems changing

<var name="allowfullscreen">true</var>

to

<var name="allowfullscreen">false</var>

solved the problem.

7
  • Unfortunately this did not work for me.
    – tread
    Commented Nov 17, 2016 at 15:00
  • Sorry to hear Stevie. Let us know your solution if you figure it out for your setup. Commented Nov 17, 2016 at 15:11
  • Your answer is incorrect as it does not actually remove the product zoom on hover. It removes the lightbox.
    – tread
    Commented Nov 23, 2016 at 10:12
  • Hi Stevie, perhaps the lightbox and magnifying glass are something different? When I made this change the magnifying glass went away... And as I said earlier, if you want to offer up a better solution, feel free to do so... Commented Nov 23, 2016 at 18:45
  • Your method is what I used to enable the magnifier in the first place. StevieG might have another extension for zooming. Commented Mar 2, 2018 at 10:29
1

One way we disabled this was to add following CSS ;

 .zoomImg {
    display: none !important;
    visibility: hidden;
}
1
  • its working but, how we can fix with gallery widget?
    – Sourav
    Commented Dec 11, 2020 at 12:26
0

Disable product magnification / zoom in Magento 2 set false enabled var magnifier in view.xml file of theme run static-content:deploy and cache:flush cmd

0

In your view.xml from theme, just replace hover with click like this

<var name="eventType">click</var>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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