I'm new to Magento, I have this module which adds progress bar in cart summary
https://github.com/christophermallory/magento2-freeshipping-progress-bar,
I want to add it to minicart
-
You just need to enable the module that's it. Read that documentation where placed in your given link.– HarunCommented Mar 29, 2023 at 10:48
-
The module add the progress in cart summary, i want it in minicart– Khaled YahyaCommented Mar 29, 2023 at 11:01
-
To show this progressbar in the mini-cart, you can create a custom block that uses the ProgressBar and adds it to the mini-cart template.– HarunCommented Mar 29, 2023 at 11:13
-
And how i do this?!– Khaled YahyaCommented Mar 30, 2023 at 9:12
-
Check my answer try it– HarunCommented Mar 30, 2023 at 12:09
Add a comment
|
1 Answer
||create a new module.
||Create a new template file that includes the progress bar (view/frontend/templates/cart/minicart.phtml)
||create a file named default.xml in the directory view/frontend/layout/
||save this code in default.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="header.panel.wrapper">
<block class="Magento\Framework\View\Element\Template" name="custom.minicart" template="Vendor_Module::cart/minicart.phtml" />
</referenceContainer>
</body>
</page>
Run after flush.