I try to override the following template from my own module


but I don't find the file where I can override it, I searched the whole module-checkout folder for the place where the default.hmtl is added, but can't find it.

Is it possible to override the file?

3 Answers 3


You can override this by adding this folder to your theme:


In this folder you can create the default.html file. After a change made in this file make sure you flush your browser cache to see the changes.


After changes in default.html file, we have to deploy static file using command php bin/magento setup:static-content:deploy

Reference : Magento 2: How to override mini-cart default template html file?

  • I tried to figure out how to override it in my module though, not theme. And whats the content.html file? Do you mean default.phtml?
    – Black
    Aug 11, 2020 at 9:10
  • @Black, yes "default.html" Aug 11, 2020 at 9:18

cretae requirejs-config.js

Copy default.html vendor\magento\module-checkout\view\frontend\web\template\minicart\item\default.html

past app/code/Vendor/Module/view\frontend\web\template\minicart\item\default.html


var config = {
    map: {
        '*': {
  • Does not work for me
    – Black
    Aug 11, 2020 at 9:55
  • override checkout_cart_sidebar_item_renderers.xml
    – Himanshu
    Aug 11, 2020 at 10:40
  • Thats a duplicate of my answer now.
    – Black
    Aug 11, 2020 at 11:01

I searched for minicart/item and now I found:


I override it like this:

<?xml version="1.0"?>
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <referenceBlock name="minicart">
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="minicart_content" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="item.renderer" xsi:type="array">
                                    <item name="config" xsi:type="array">
                                        <item name="template" xsi:type="string">Vendor_Module/minicart/item/default</item>

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.