Products with a drop-down option normally cannot be added to the cart without choosing a value, and if the option is optional it simply stays empty. With this module you can mark a value as “Default”. Whenever the product is added to the cart and no value was chosen for that option, for example from a category page or a product widget, the default value is filled in automatically.
Features
- New “Default” checkbox for each value of drop-down options in the product’s Customizable Options section.
- When a product is added to the cart without a selection for the option, the default value is added automatically.
- A value the shopper chose explicitly is never overwritten.
- Also works with the Select2 option type from Catalog Product Option Select2.
Configuration
Open a product in the admin, go to Customizable Options and tick “Default” on the value that should be used when nothing is selected. There are no global settings.
Good to know
This module only affects adding to the cart. To show a value as already selected when the product page opens, use Catalog Product Option Preselect.
Installation
Install the module with Composer in your Magento root directory:
composer require infrangible/m2-catalog-product-option-defaultThen enable it and update the store as described in the installation guide. Composer installs the required modules listed on this page automatically.