2

I want add some New Link in Mini Cart Popup,like below image,

enter image description here

How can I add this links?

Thank you.

2 Answers 2

3

Simply copy minicart.phtml from below path

vendor/magento/module-checkout/view/frontend/templates/minicart.phtml

and put in your theme as on below path and add your links in that file

app/design/frontend/Your/Theme/Magento_checkout/templates/minicart.phtml

1

You need to override minicart.phtml file using below code inside your custom module's default.xml file

<?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>
    <referenceBlock name="minicart" template="Vendor_Module::cart/minicart.phtml"  after="logo"/>   
    </body>
</page>

NOTE: Change Vendor_Module with your custom module name

Then create minicart.phtml inside view/frontend/templates/minicart.phtml

add your links inside this file using html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.