Post by x3mjsh » Tue Apr 17, 2018 8:02 pm

Hello,

In OpenCart version 3.0.2.0 I was trying to disable the product image popup, since the main image container is large enough so no zooming or enlarging is needed. I came across an advice to rename the folder "magnific" located in catalog/view/javascript/jquery/magnific, which does the trick on desktops but I still see the image popup on mobile devices (lightbox image preview or even image in new tab on some phones).
Can anyone please advice how to disable this feature for mobile devices? I don't need any function when user clicks on product image (except switching the additional product images in the main image container).
Thanks!

Newbie

Posts

Joined
Sun Sep 06, 2015 6:36 pm

Post by synapseindia » Fri May 18, 2018 9:19 pm

Hi,

You can set condition in product.twig file based on device. You can get width of screen using javascript and add if else in the below script on product.twig file.

Thanks

Code: Select all

$(document).ready(function() {
	$('.thumbnails').magnificPopup({
		type:'image',
		delegate: 'a',
		gallery: {
			enabled: true
		}
	});
});

User avatar
Active Member

Posts

Joined
Thu Apr 05, 2018 2:27 pm
Who is online

Users browsing this forum: AdsBot [Google], Shiftcom, SohBH and 422 guests