Variants can also have required products (e.g. a notebook product requires a battery and power adapter). Required products are automatically added to the customer’s shopping cart when this variant is chosen. For example, you sell magazine subscriptions that has a one-time setup fee. Create your subscription product and your setup product as two separate products like you normally would. Then use the required products feature to associate both products. When the customer adds the magazine subscription, the Storefront will automatically attach the setup fee.
You must first enable the Required products feature under Configuration > Product. Once enabled, you'll be able to associated the products under the Required tab.
Unlike bundled products, the use of required products is more suitable for ensuring certain products that require each other are present both in the shopping cart as opposed to products that merely complement each other for a better price deal. From the customer point of view, a required product appears as a separate high-level order detail line item when added to the cart whereas parts from a bundled product are subdued and do not appear.
Therefore, conditions configured for a required product is validated against all the products currently present in the cart. As such, if the required product has a precise required quantity, it will validate against all the products currently in the cart. For example, you can use a required product to charge a one-time setup fee regardless of the number of products A or B added to the cart. Please see Bundled products for more information.