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

Magento 2 Get layered navigation filterable attributes list.

Magento 2 Get all the attribute list which are used in Layered Navigation in category page and search page.

You can get all the filterable attribute list by Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory class.

The result will be all those attributes that have,

  1. Use in Layered Navigation status are Filterable (with results)
  2. Filterable (no results)

Continue reading “Magento 2 Get layered navigation filterable attributes list.”