Magento 2 Check Email id exist or not at website level.

Magento 2 handles the email address at the Global and Website level.

You can set global or website level for email id from Stores -> Configuration -> Customer -> Customer Configuration -> Account Sharing Options

Choose Share Customer Accounts Global or Website level. Continue reading “Magento 2 Check Email id exist or not at website level.”

Get Customer Id by email Magento 2.

Magento 2 We can get Customer data by customer email id.

You can get the customer id, first name, last name, and other customer specific data by customer email id.

You need to call Magento\Customer\Api\CustomerRepositoryInterface Interface to fetch customer-related data.

We need to call CustomerRepositoryInterface in our class __construct() method. Continue reading “Get Customer Id by email Magento 2.”

How to generate unique hash token in Magento 2?

In Magento 2, You can generate a unique hash token for your custom functionality where you need to pass id or variable as encrypted.

Magento uses this functionality, generate a unique hash token for reset password confirmation link.

If you want to do a generate unique token you need to use Core Magento\Framework\Math\Random class to accomplish your requirement. Continue reading “How to generate unique hash token in Magento 2?”