You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First > Create a "magnific" folder under "catalog\view\javascript\jquery".
Second > Place "magnific.css", magnific.js" and "magnific.min.js" inside it.
Third > Edit controller "product.php" with :
$this->document->addScript('catalog/view/javascript/jquery/magnific/magnific.min.js');
$this->document->addStyle('catalog/view/javascript/jquery/magnific/magnific.css');
(Note: "magnific.min.js" is required, as "magnific.js" doesn't seem to be working)
Fourth > Edit template "product.tpl" with this script at the bottom :
First > Create a "magnific" folder under "catalog\view\javascript\jquery".
Second > Place "magnific.css", magnific.js" and "magnific.min.js" inside it.
Third > Edit controller "product.php" with :
$this->document->addScript('catalog/view/javascript/jquery/magnific/magnific.min.js');
$this->document->addStyle('catalog/view/javascript/jquery/magnific/magnific.css');
(Note: "magnific.min.js" is required, as "magnific.js" doesn't seem to be working)
Fourth > Edit template "product.tpl" with this script at the bottom :
$(document).ready(function() {
$('.thumbnail').magnificPopup({
type: 'image',
gallery: { enabled:true },
retina: {
ratio: 2,
replaceSrc: function(item, ratio) {
return item.src.replace(/.\w+$/, function(m) { return '@2x' + m; });
}
}
});
});
(Note: this code includes support for Retina images but only works if a second image at High Definition (@2x) is present, as per Retina setup rules.)
That's it !
The text was updated successfully, but these errors were encountered: