Loading categories by their IDs in Magento 2

To load categories by their IDs in Magento 2, Dmitry Fedyuk recommends the following: Continue Reading

To load categories by their IDs in Magento 2, Dmitry Fedyuk recommends the following: Continue Reading

In case you are looking for Magento 2 JavaScript validators, below we have them listed in a table. Continue Reading

If you don;t know how to load subcategories for a particular category in Magento 2, you’ve come to the right place. Below, we will explain this procedure. Continue Reading

To let a Magento 2 extension add a custom attribute to customers, use the following code: Continue Reading

In Magento 2, there is an app/code/Magento/Customer/view/base/ui_component/customer_form.xml file with array of buttons. Create Order Button is also there: Continue Reading

In Magento 2, do not modify CSS files within pub/* or vendor/* directories, because pub is for deployment and vendor is for default structure. Instead: Continue Reading

system.xml saved config validation in Magento 2 is possible via attaching a backend model to the field and validating the value server side. Continue Reading

To create customer groups programmatically in Magento 2, use $group->save() on the model returned by the GroupFactory: Continue Reading

Magento 2 @escapeNotVerified is a tag used by static tests for potentially unsafe output. Since some output is considered to be safe, you should not mark it with such annotations: Continue Reading

To add arbitrary HTML to <head> of every page in Magento 2 add code to the head as follows: Continue Reading