2

When I add new product to cart. It is adding that products to cart but mini cart doesn't shows anything. and my console has following error.

TypeError: this.itemRenderer is undefined

can anyone tell what is because of this.

1

I think you changed the block from 'minicart' to a another block.
Please make sure that the checkout_cart_sidebar_item_renderers.xml
(vendor/magento/module-checkout/view/frontend/layout/checkout_cart_sidebar_item_renderers.xml)
have the same block, in which the 'itemRenderer' was set.

  • I m not getting your answer.. can you please tell me in details?? – Asish Hira Mar 28 '16 at 6:00
  • @AsishHira , Did you get any solution for that ? – Camit1dk Dec 18 '17 at 13:26
0

Try to delete Magento_Checkout/layout folder from your theme.

0

I think you should add this.

<item name="config" xsi:type="array">
    <item name="itemRenderer" xsi:type="array">
        <item name="default" xsi:type="string">defaultRenderer</item>
        <item name="simple" xsi:type="string">defaultRenderer</item>
        <item name="virtual" xsi:type="string">defaultRenderer</item>
    </item>
</item>

Inside your <item name="minicart_content" xsi:type="array"> tag it will remove this error.

There us another way you can add minicart to desired block by just moving minicart block using this.

<move element="minicart" destination="your.container.name" />

This way you don't need to add missing arguments, I hope this will help you somehow.

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.