The Magento 2 platform was written with flexibility and customization in mind. The Magento 2 development team knew that Magento, while a great ecommerce platform, is nothing without its ability to be catered to the individual needs of merchants. So, in order to create a flexible, yet robust system, the Magento 2 team created multiple ways to extend the Magento 2 platform. [Read more…]
Preferences in Magento 2 are much like rewrites in Magento 1. They basically let you substitute one instance of a class for another inside of Magento 2. This is very a very powerful feature, but also comes with the same responsibility of Magento 1. Basically, no two modules can rewrite the same class. If two modules attempt to do so, there will be a conflict.
So, how do you create a preference in Magento 2? Through XML, you can create a preference. [Read more…]
In Magento 1, in order to customize different classes and method, you would rewrite a class. This was a very powerful and flexible way to customize the platform. This also created a lot of headaches, because no two modules could rewrite the same class. Rewrite conflicts created a lot of instability in the Magento 1 platform. Magento 2 created a new customization method to remedy this issue. It is called a plugin. [Read more…]
Observers are back! Magento 2 has provided users with the same event observer customization option as Magento 1.
The event observer mechanic is basically the ability to “hook” into an application at key points in its execution process. These “events” fire at a specific or notable time in the execution process, (such as checkout or when a product is saved). You can write a customization that can “observe” these events and execute code during these events as they fire. [Read more…]
Here are some resources for further reading and where to go from here. Best of luck on your Magento journey! [Read more…]