How to set firstname and lastname with minimum two character in Magento 2?

Magento 2 First name and Last name is default customer entity available in Native Magento. Once you install Magento 2, Customer first name and last name attribute available.

Firstname and Lastname attribute available with Customer and Customer_address entity type.

customer entity type contains attribute used for registration page and customer form related entity.

customer_address entity types used for billing and shipping form of customer. Continue reading “How to set firstname and lastname with minimum two character in Magento 2?”

Get Product Custom Option’s value programmatically in Magento 2.

Magento 2, Product with custom option used to allow customers to customize the product as per the need from a set of different Custom options.

The custom option is a native feature of Magento and you can add Custom option from Admin side in product Add/edit section.

If you want to get custom option’s value programmatically from Product, you need to use the below code in your module.

Continue reading “Get Product Custom Option’s value programmatically in Magento 2.”

Add Custom Option in Product Programmatically in Magento 2.

Magento 2, Product with custom option used to allow customers to customize the product as per the need from a set of different Custom options.

The custom option is a native feature of Magento and you can add the Custom option by Admin side in product Section.

You can add multiple types of custom option like Text field, Text area, Dropdown, Checkbox, Radio button, File(Image), Multiple Select, Date, Date & Time, Time. Continue reading “Add Custom Option in Product Programmatically in Magento 2.”