1. Renderings

Product Bundle structure

Version:

The Product Bundle rendering consists of the Bundle Header component and the Bundle Groups Container component. It is based on the SXA rendering variant and extended with the ModelReference component.

BundleComponentVariantsTree.png

The following diagram shows a high-level view of the HTML structure of the product bundle component.

BundleHTMLStructure.png

To work with the Product Bundle component in the Content Editor, go to sitecore/Content/<tenant>/<site>/Presentation/Rendering Variants/Product Bundles.

BundleContentTree.png

You can add new field renderer items to the Product Bundle rendering variant hierarchy as long as you do not reuse existing CSS classes and you can move items in the hierarchy as long as you are not breaking a parent/child relationship.

Note

The NVelocity template is not used in the Product Bundle definition.

The Bundle Header component

The Bundle Header component contains the label for the product bundle and information related to the product bundle. During the initialization of the JavaScript component, the associated data attributes are stored and used when needed.

ItemDescriptionTypeCSS Class
Bundle HeaderThis section contains the label for the product bundle as well as the following data attributes:

  • data-catalog-name
  • data-bundle-id
  • data-bundle-list-price
  • data-bundle-adjusted price
  • data-bundle-is-on-sale
  • data-bundle-savings-percentage
  • data-bundle-error-message
VariantSectionbundle-header

The Bundle Groups Container component

The Bundle Groups Container component is the container for all bundle line items:

ItemDescriptionTypeCSS class
Bundle Groups ContainerContainer for bundle line items.VariantSectionbundle-groups-container
Bundle Group ReferenceThe model reference that iterates through the Pass Through Field field ( LineItems) to populate bundle line item details within the markup.ModelReference
Bundle GroupThis section contains a single bundle line item and the following data attributes:

  • data-bundle-line-item id
  • data-bundle-line-item-name
  • data-bundle-line-item-quantity
  • data-bind (A KnockoutJS binding to indicate if the bundle line item has a variant associated with it. If the line item does not have a variant, a class is added to this element.)
VariantSectionbundle-group
Bundle Group Header ContainerThis section is the container for the bundle line item detail such as its name and selected variants. It also contains a handler for hiding and showing the Bundle Group Body Container. It contains the following data attribute:

  • data-bind (A KnockoutJS binding that toggles the variant drop-down selection section.)
VariantSectionbundle-group-header-container
Bundle Group HeaderThis section contains the label for the bundle line item and the arrow handler to toggle the Bundle Group Body Container.VariantSectionbundle-group-header
Selected Variant PreviewThis section contains the labels for the variants selected and contains the following data attribute:

  • data-bind (A KnockoutJS binding that renders the selected variants.)
VariantSectionselected-variant-preview
Bundle Group Body ContainerThis section is the container for the variants drop-down selection and the navigation link to the bundle line item.VariantSectionbundle-group-body-container
Group Variant SectionThis section contains the drop-down selection list for the variant.VariantSectiongroup-variant-section
Product VariantsThe model reference that iterates through the Pass Through Field VariantSelections to populate variant combination information into the drop-down selection.ModelReference
Group Variant SelectionThis section contains the actual drop-down list of the available variants for the bundle line item.VariantSectiongroup-variant-selection
Product Link ContainerThis section contains the navigation link to the bundle line item.VariantSectionproduct-link-container
Bundle VariantsThis section contains the meta data of all valid variant combinations available for the bundle line item. The variant combination is populated only once during the JavaScript component initialization.

  • data-bind (A KnockoutJS binding to indicate if there are any variants associated with the parent bundle line item. If there are no variants available, a class is added to this element.)
VariantSection
  • hidden
  • d-none
  • bundle-variant-combination-list
Bundle Variant ReferenceThe model reference that iterates through the Pass Through Field (ValidProductVariants) to generate valid variant combinations.ModelReference
Bundle Variant DataThis section contains a single valid variant combination and has the following data attribute:

  • data-variant-id (Variant Combination identity)
VariantSectionbundle-variant-combination
Bundle Variant Value ReferenceThe model reference that iterates through the Pass Through Field (Variants) to generate valid variants.ModelReference
Bundle Variant ValueThis section contains the variant key and value of a valid variant and has the following data attributes:

  • data-variant-key
  • data-variant-value
VariantSectionbundle-variant-combination-value
Important

The items listed in the table are referenced by the JavaScript component through the class name; therefore, you must avoid changing existing class names. You can, however, add a new element or class name.

If you have suggestions for improving this article, let us know!