Url Encode and Decode using Magento 2.

You can encode and decode the URL using Magento 2 with native functionality.

Using Url Encode, they encode the base64_encode() for URLs encoding using encode() function.

Using Url Decode, they decode the base64_decode() for URLs decoding. Continue reading “Url Encode and Decode using Magento 2.”

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?”

How to add new field in customer_entity table magento 2 using db_schema.xml?

You can add a new column/field in customer_entity table using db_schema.xml under your module etc folder from Magento 2.3 and Upper version.

You just need your table name to add a new field or column for that table.

I have added a new field called Nickname of the customer, For add nickname field in the customer table, you need to only add one row inside the db_schema.xml file. Continue reading “How to add new field in customer_entity table magento 2 using db_schema.xml?”