Adding custom attribute to customers for Magento 2 extensions

To let a Magento 2 extension add a custom attribute to customers, use the following code: 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

You can get customer_id, getName(), and getEmail() in the product view in Magento 2 directly from customer session. Utilize the following code: Continue Reading

To add custom block for shipping methods in onepage checkout in Magento 2, you should do the following actions: Continue Reading

Utilize CLI to reset lost admin password in Magento 2. You should create a new admin user able to change your forgotten password. Use the following command, to generate a new user: Continue Reading