infrangible / m2-bundle-option-wrapper
Groundwork for other Infrangible modules: puts each option on bundle product pages into its own container, so options can be styled and extended individually.
Package info
github.com/infrangible-dev/m2-bundle-option-wrapper
Type:magento2-module
pkg:composer/infrangible/m2-bundle-option-wrapper
Requires
- php: >=8.1
- fewedev/base: ~2.4.1
- infrangible/m2-foundation: ~3.0.1
- magento/framework: ~103.0.6
- magento/module-bundle: ~101.0.0
Requires (Dev)
- infrangible/phpstan-magento: ~1.2.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-12-01 15:18:30 UTC
README
Adds an element around every option of a bundle product on the product page, so that themes and other modules can find
and style single options. The element has the ID bundle-option-<option ID>, the attribute data-option-id and these
CSS classes:
field-wrapperfield-wrapper-<type>, for examplefield-wrapper-selectorfield-wrapper-checkboxfield-wrapper-<title>: the title of the option in lower case, with spaces replaced by underscores and an underscore before upper case letters, for examplefield-wrapper-gift__wrapfor "Gift Wrap"
The options are separated by a line, like the custom options of Infrangible Catalog Product Option Wrapper.
Requirements
- Magento Open Source or Adobe Commerce 2.4.6 or newer
- PHP 8.1 or newer
Installation
composer require infrangible/m2-bundle-option-wrapper bin/magento module:enable Infrangible_BundleOptionWrapper bin/magento setup:upgrade
In production mode, also run bin/magento setup:di:compile and bin/magento setup:static-content:deploy.
Usage in other modules
Other lists of bundle options can use the same wrapper: add a block of the class
Infrangible\BundleOptionWrapper\Catalog\Product\View\Type\Bundle\Option with the template
Infrangible_BundleOptionWrapper::catalog/product/view/type/bundle/options/option.phtml as child bundle_option_wrapper
of the block that renders the options, and wrap the HTML of each option with
Infrangible\BundleOptionWrapper\Helper\Data::renderWrapper($block, $bundleOption, $bundleOptionHtml).
License
Infrangible Bundle Option Wrapper is licensed under the MIT License - see the LICENSE file for details.