Magento 2: Override/Rewrite Block, Model, Controller, Helper using Plugin & Preference

This article shows how you can override / rewrite Block, Controller, Model, and Helper in Magento 2. This can be done by two ways: 1) using Preference 2) using Plugin Preference is similar to class rewrite in Magento 1. There is always possibility of conflict when two or more custom modules try to rewrite/override same … Read more

Magento: Helper Data not found error

I created a module, let’s say, ‘MyModule’. When I go to the Admin -> System -> Configuration section of this module, I get this weird error. Fatal error: Class ‘Mage_MyModule_Helper_Data’ not found – My Module is enabled. – I have helper class in ‘Helper’ folder of my module. – I have deleted/refreshed all cache and … Read more

Magento: Rewrite/Override Block Controller Model Helper

This article will show how you can override/rewrite Magento Block, Controller, Model and Helper files. We will be dealing with the config XML files and the class files to override. We override Magento core classes to update/modify the core functionalities according to our need. We can directly makes changes in the core Magento classes but … Read more