سؤال

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?

هل كانت مفيدة؟

المحلول

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.

نصائح أخرى

One way we disabled this was to add following CSS ;

 .zoomImg {
    display: none !important;
    visibility: hidden;
}

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top