Add a CMS Block to Minicart

Would you like to add a CMS block to Mini Cart in Magento 2? It is much easier as you think. So let's check it together!

The first thing that comes to your mind when you have to add CMS block to Mini Cart, is that you have to customise the Mini Cart layout. But basically there is a much easier way to do that in Magento 2. You can achieve that easily by creating a widget and configuring it to be shown in Mini Cart. Let's say that you want to add a CMS block with just a banner for your Christmas sales.

Navigate in admin under Content → Blocks and create a block with an image like below.

Then navigate under Content → Widgets and create a widget. Configure the widget layout updates to be shown to all pages and choose the Mini-Cart promotion block.

On the widget's options tab just select the CMS you just created.

The result in frontend will be the follow.

 

Feel free to share this post and ask your questions in the comments below.

Till next time!

DigitalOcean Referral Badge