Front-End
If the bundle type has a URI format and template, bundles get their own front-end page. The bundle is passed into the template as bundle:
<h1>{{ bundle.title }}</h1>
<p>{{ bundle.priceAsCurrency }}</p>
{% for component in bundle.getProducts() %}
{{ component.product.title }} × {{ component.qty }}
{% endfor %}See Cart & Variant Selection for the add-to-cart form.
craft.bundleBuilder
The plugin adds a craft.bundleBuilder Twig variable.
bundles(criteria)
Returns a bundle element query:
{% set featured = craft.bundleBuilder.bundles({
type: 'bundles',
limit: 4,
}).all() %}getBundlesForProduct(product, criteria)
Returns the (enabled) bundles a given product belongs to: handy for an "Also available in these bundles" block on a product page:
{% set bundles = craft.bundleBuilder.getBundlesForProduct(product) %}
{% for bundle in bundles %}
<a href="{{ bundle.url }}">{{ bundle.title }}: {{ bundle.priceAsCurrency }}</a>
{% endfor %}Element query
Bundles can be queried like any element via craft.bundleBuilder.bundles(), supporting type, typeId, postDate, expiryDate, status, and the standard purchasable/element params.