In this topic we will show you How to Remove Block Depending on a Config Setting through 2 steps:

  • Step 1: Create your events.xml
  • Step 2: Create RemoveBlock.php

Confirmation and Alert Jquery Widget

Step 1: Create your events.xml

Create your events.xml in events.xml file in app\code\[Name_Space]\[Your_Module]\etc

Step 2: Create RemoveBlock.php

Create RemoveBlock.php in app\code\[Name_Space]\[Your_Module]\Model\Observer

The steps I mention above is the shortest process for you to Remove Block Depending on a Config Setting. With this guide, you can manage the Config Setting in Magento 2 easily. Every store has a Config Setting in Magento 2 with many attributes.

Thank you for reading this post and see you in other posts from Magestore!


Ready to foster your knowledge

with MAGENTO 2 BASIC GUIDE

magento 2 basic guide series


How to Override Magento JS Core in Magento 2
How to Get all Translation Labels from PHP and JS Files of Magento 2 Extension

Leave a Reply

Your email address will not be published. Required fields are marked *