Prints the details of the products included in the product bundle added to the shopping cart.

Description

The tag prints the following bundle product details as a <ul> list:

  • Product quantity
  • Product name
  • Selected variation's name
  • Product availability (will be displayed if the product is not immediately available)

If the product added to the shopping cart isn't a product bundle, the tag won't print anything.

For more information about product bundles, see also our user guide.

See also detailed instructions on how to implement product bundles in the online store's theme.

Syntax

{CartProductBundleDetails}

Scope

Required scope: ostoskorituote

You can use this tag in the helper attribute of the {CartProducts} tag.

An example of using product bundle tags in the cart

The simple example below illustrates how product bundles can be used in the helper attribute of the {CartProducts} tag:

{CartProducts(
  before: '<ul>',
  helper: {{
    <li
      {CartProductBundleID(
          before: 'class="CartProduct Bundle-',
          after:  '',
          or:     {{ {CartProductID(before: 'class="CartProduct Product-', after: '"')} }}
      )}>

      {CartProductName(before: '<h3>', after: '</h3>')}
      {CartProductBundleDetails(
          or: {{ {CartProductDetails} }}
      )}
      {CartProductPrice}

    </li>
  }}
  after: '</ul>'
)}
  • A list of shopping cart products is created using the {CartProducts} tag. In the tag's before/after attributes, the list is enclosed in <ul> tags, and the contents and markup of each list element are defined by the helper attribute.
  • Class names for each <li> element are defined with {CartProductBundleID} / {CartProductID} tags. The class name of an ordinary product is Product-ID. On the other hand, the class name of product bundles is Bundle-ID.
  • The name, details and price of a shopping cart product are defined as the contents of each row.

Attribuutit

after/before:

By using the after and before attributes you can define content that is output either after or before the tag's output.

Allowed values:The HTML and Interface markup

E.g.

  • before: '<p>Tämä merkkaus näkyy ennen tagin omaa sisältöä.</p>'
  • after: '<p>Tämä taas näkyy tagin oman sisällön jälkeen.</p>'

If the tag does not produce any content, neither the content of the after and before attributes will be output.

escape:

Adds an escape character before quotation marks in the output.

The attribute makes it easier to process the tag-produced content when using JavaScript.

Allowed values:true/false. The default value is false.

or:

Defines alternative content that is displayed if the tag itself does not produce any content.

Allowed values:The HTML and Interface markup

E.g. or:'Sisältöä ei löytynyt.'