Let’s initiate a discussion!!
By default in Magento 2, we can’t set margin or space between more views thumbnail images using CSS on the product detail page.
If you want to give some space between more views thumbnail images on the product detail page then follow the below steps.
Step 1 : Override this file into your theme : vendor/magento/module-catalog/view/frontend/templates/product/view/gallery.phtml
Step 2: Paste the below code in the last of the file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<script type="text/x-magento-init"> { "[data-gallery-role=gallery-placeholder]": { "mage/gallery/gallery": { "mixins":["magnifier/magnify"], "magnifierOpts": <?= /* @escapeNotVerified */ $block->getMagnifier() ?>, "data": <?= /* @escapeNotVerified */ $block->getGalleryImagesJson() ?>, "options": <?= /* @noEscape */ $block->getGalleryOptions()->getOptionsJson() ?>, "thumbmargin":18, /* You can set your margin here */ "fullscreen": <?= /* @noEscape */ $block->getGalleryOptions()->getFSOptionsJson() ?>, "breakpoints": <?= /* @escapeNotVerified */ $block->getBreakpoints() ?> } } } </script> |
Step 3: Run below mentioned commands
1 2 |
- php bin/magento setup:upgrade - php bin/magento cache:clean |
That’s it.
Now, you can check your product detail page. You can see margin or space between more views thumbnail images.
[crayon-641f0fe1e3446695865325/] Using above fucntion Images can be imported directly from...
Override view block using di.xml and add the below code...
You can check a list of called layout XML for...
Follow the below steps to install and set up PWA...
If you want to remove all leading zero's from order,...
Let our Magento expert connect to discuss your requirement.
We offer Magento
certified developers.
Our Magento clientele
is 500+.
We sign NDA for the
security of your projects.
We’ve performed 100+
Magento migration projects.
Free quotation
on your project.
Three months warranty on
code developed by us.