Theme Customization
Liquid Support for Bundles
Shopify has added liquid support to display bundled items within the cart; however, as this was a recent addition, many themes do not support it. If your theme does not support this out of the box, please refer to the solutions below.
Using Cart Attributes
This is the quickest and easiest way (code-free) to add support for bundle item display to your cart. The setting is available on the BundleM8 Theme Widget and will display the bundled items in the cart as line item properties.
Refer to the Theme Extension Settings for more information.
Using Line Item Components
The line_item Liquid object contains a property titled item_components, which is an array of nested line_items. Each item in this array represents a bundled product.
{%- for item in cart.items -%}
…
{%- for nested_item in item.item_components -%}
<span>{{ nested_item.product.title }} x {{ nested_item.quantity }}</span>
{%- endfor -%}
{%- endfor -%}
Liquid Resources: