Plain browser drop-downs look different in every browser and cannot be styled or extended much. This module adds a new custom option input type “Select2” in the Select group. It works like a normal drop-down option, but on the product page it is displayed with the Select2 library as a styled selection box whose list entries can be designed and enriched by the theme and by other modules.
Features
- New input type “Select2” for custom options, next to Drop-down, Radio Buttons, Checkbox and Multiple Select.
- On the product page the option is shown as a styled single-choice selection box with a ”— Please Select —” entry.
- Prices, cart and order handling work the same as for a normal drop-down option.
- Style information of the individual values is carried over into the opened list, so other modules can highlight or mark entries.
- Also available on the bundle edit page of Catalog Product Option Composite.
Configuration
Open a product in the admin, go to Customizable Options, add an option and choose “Select2” as option type. There are no global settings.
Good to know
Several Infrangible option modules support the Select2 type: Catalog Product Option Default and Catalog Product Option Preselect handle it like a drop-down, and Catalog Product Option Info can show info boxes for its individual entries. The Select2 library itself comes with the Select2 module, which is installed automatically.
Installation
Install the module with Composer in your Magento root directory:
composer require infrangible/m2-catalog-product-option-select2Then enable it and update the store as described in the installation guide. Composer installs the required modules listed on this page automatically.