문제

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