Standard custom options are either selected or not. This module adds a quantity to options: shoppers can order, for example, three extra batteries with a device or two years of extra service. You decide per option whether shoppers type a number freely or choose from fixed quantity steps. The price of the option is multiplied by the chosen quantity, and the selected quantity is saved with the order.
Features
- New “Qty” checkbox per custom option to enable a quantity field for it.
- “Qty Steps”: offer a list of fixed quantities (for example 1, 2, 5, 10) instead of a free number field; “None Text” sets the label of the zero entry for optional options (default “None”).
- “Qty Sync”: the option quantity follows the main product quantity until the shopper changes it.
- “Qty Select2”: show the quantity steps as a styled Select2 drop-down.
- “Qty Unit Price”: show the price per piece next to the quantity and the total of the selection (“Your selection”).
- The option price on the product page and in the cart is multiplied by the option quantity; in the cart and order the value is shown as, for example, “3 x Battery pack”.
- The option quantity is saved with the order item and returned by the order API.
- Works with add-on products from Catalog Product Option Product.
Configuration
Open a product in the admin, go to Customizable Options and use the fields “Qty”, “Qty Steps”, “None Text”, “Qty Sync”, “Qty Select2” and “Qty Unit Price” on the options that should get a quantity. There are no global settings.
Good to know
The module includes German translations (Germany, Austria, Switzerland) for its storefront labels. It installs Catalog Product Option, Catalog Product Option Wrapper and Select2 automatically.
Installation
Install the module with Composer in your Magento root directory:
composer require infrangible/m2-catalog-product-option-qtyThen enable it and update the store as described in the installation guide. Composer installs the required modules listed on this page automatically.