5

Is it possible to not have the images popping out of their frame and filling the whole page when I click on them? I would like nothing at all to happen when you click on the image in the product page.

  • The quick way is to do it by CSS. Add pointer-events:none to fotorama__stage class. – Prince Patel Aug 21 '17 at 5:07
  • Can I add this to my theme? – Kaki Sami Aug 21 '17 at 17:40
  • Yes, you can add a new class in your custom theme's css. like .fotorama__stage { pointer-events:none } – Prince Patel Aug 21 '17 at 17:56
  • 1
    Can you please type your comment as an answer Prince? So I can accept it? I think that would be useful for me and for the community. – Kaki Sami Aug 22 '17 at 17:22
  • 1
    Definitely, for future ones! – Kaki Sami Aug 22 '17 at 17:53
3

Method - 1 - Override view.xml from vendor/magento/theme-frontend-luma/etc/view.xml

To app/design/frontend/Vendor/theme/etc/view.xml

Now change

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

To

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

Now flush the cache and try.

Method - 2: The simple and quick way to disable opening default popup on product page by adding pointer-events: none in css of fotorama__stage class

Open css of custom theme and add new class fotorama__stage

.catalog-product-view .fotorama__stage 
{
  pointer-events:none;
}
| improve this answer | |
  • When I did this the images acted in the way you said they would but the spacing between the rows of products got messed up. The first row overlaps the second. Any ideas? – Kaki Sami Sep 2 '17 at 5:44
  • Also the css file disappeared when I cleared static files.... Im in developer mode. – Kaki Sami Sep 2 '17 at 5:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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