I want to hide qty box and remove/delete icon from mini cart for few products. For this I overwrite checkout_cart_sidebar_item_renderers.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        <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="component" xsi:type="string">uiComponent</item>
                                    <item name="config" xsi:type="array">
                                        <item name="displayArea" xsi:type="string">defaultRenderer</item>
                                        <item name="template" xsi:type="string">Custom_Module/minicart/item/default</item>

Then create default.html file under Custom/Module/view/frontend/web/template/minicart/item/default.html

But after doing this I found minicart is blank. like below image. Can you please help me to understand my mistake?

Mini Cart

1 Answer 1


Try this,

Add requirejs-config.js in the following path


then add the below code in it

var config = {
map: {
    '*': {


then copy the file from




and run below comments in you magento root after made these changes

rm -rf pub/static/frontend/
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush

Hope this helps :)

  • means I need to add require-config.js with my existing code or I need to remove layout file? Commented Mar 6, 2019 at 7:14
  • Remove the checkout_cart_sidebar_item_renderers.xml from your custom module then do the above things and it will help you Commented Mar 6, 2019 at 7:16
  • after doing this mini cart not showing product correctly, I added two product in the cart but mini cart display only one product. The count is perfect but displays only one product. I need to overwrite some other file or not for this, Please help me. Commented Mar 6, 2019 at 7:33
  • In the cart page two product showing perfectly but not in minicart. Commented Mar 6, 2019 at 7:34
  • Right now all products are showing after running the command. I want to hide qty box and remove icon in cart page and I can see my code under pub/static folder in my module. But in mini cart section, it is not reflected. Below are my code <!-- ko if: is_visible_in_site_visibility --> <!-- /ko --> This I need to add before qty box and remove icon [This is used for edit button, I copied this condition and add before qty and remove icon section] Commented Mar 6, 2019 at 7:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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