Follow the below steps to override default.phtml in your theme.
Create an default.phtml in : app/design/frontend/Vendor/Themename/Magento_Catalog/templates/product/view
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
<?php if ($detailedInfoGroup = $block->getGroupSortedChildNames('detailed_info', 'getChildHtml')):?> <div class="product info detailed"> <?php $layout = $block->getLayout(); ?> <div class="product data items" id="accordion" data-mage-init='{"accordion":{"openedState": "opened", "collapsible": true, "multipleCollapsible": true}}'> <?php foreach ($detailedInfoGroup as $name):?> <?php $html = $layout->renderElement($name); if (!trim($html)) { continue; } $alias = $layout->getElementAlias($name); $label = $block->getChildData($alias, 'title'); ?> <div class="data item title" aria-labeledby="tab-label-<?= /* @escapeNotVerified */ $alias ?>-title" data-role="collapsible" id="tab-label-<?= /* @escapeNotVerified */ $alias ?>"> <a class="data switch" tabindex="-1" data-toggle="switch" href="#<?= /* @escapeNotVerified */ $alias ?>" id="tab-label-<?= /* @escapeNotVerified */ $alias ?>-title"> <?= /* @escapeNotVerified */ $label ?> </a> </div> <div class="data item content" id="<?= /* @escapeNotVerified */ $alias ?>" data-role="content"> <?= /* @escapeNotVerified */ $html ?> </div> <?php endforeach;?> </div> </div> <?php endif; ?> <script type="text/javascript"> require(['jquery', 'matchMedia', 'accordion'], function($, mediaCheck) { var detailsTabs = $('.product.data.items'); mediaCheck({ media: '(min-width: 768px)', // Switch to Desktop Version entry: function () { detailsTabs.accordion({ openedState: "opened", collapsible: false }); }, // Switch to Mobile Version exit: function () { detailsTabs.accordion({ openedState: "opened", collapsible: true, active: [0,1,2,3,4], multipleCollapsible: true }); } }); }) </script> |
[crayon-63d6a6470c05c191744361/] 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.