How Magento Send Customer Welcome email after registration in Magento 2?

Every eCommerce platform contains native functionality for sending a welcome email after creating an account and Magento is also doing the same for sending Welcome email.

When you click on Create an Account button from frontend or create an account from Admin panel.

Both the events send mail to a customer after successfully create an account.
Magento 2 send Welcome email from the Magento/Customer/Model/EmailNotification file.

public function newAccount(), a function is responsible for sending Welcome email after a successful registration. Continue reading “How Magento Send Customer Welcome email after registration in Magento 2?”

Create customer address attribute Programmatically using Patch data in Magento 2.3

Create a customer address attribute programmatically in Magento 2 using the simple module by Best Coding Standard Approach using Setup patch data.

In our demo, I have created a simple text field attribute for a customer address called Nickname.

You can see a customer attribute in backend using Customer -> All Customer -> Click on Edit Customer Link.
Go to Addresses Tab and edit or add new Address. Continue reading “Create customer address attribute Programmatically using Patch data in Magento 2.3”

How to encrypt and decrypt string in Magento 2?

You can Encrypt or Decrypt any string using Magento 2 with native interface functionality.

You can encrypt or decrypt password or credit card data or any value you need to encrypt using Magento\Framework\Encryption\EncryptorInterface interface.

Example, You can encrypt the password with below way, Continue reading “How to encrypt and decrypt string in Magento 2?”