Prints the ID of the product category in which the product bundle is set to display.

Syntaksi

{BundleCategoryID}

Näkyvyys

Toimii näkyvyydessä: tuotepaketti

Templates
Product bundle

Displaying product bundle prices based on product categories

See this example to learn how to hide purchase tools for a product bundle if the product bundle belongs to a certain product category. You may want to do it, for instance, if the product bundle belongs to a product category limited to resellers, and you don't want consumer customers to order the product bundle.

  1. Set the product bundle to be displayed in the product category.

    In this example, we use a product category whose id is 1.

    When necessary, see our user guide to learn more about managing product bundles.

  2. Create a helper file that includes the markup to be displayed if the product bundle belongs to a specified product category.
    <p>This product bundle cannot be purchased.</p>
    The example helper is saved in the theme file helpers/price-note-1.html. The product category id is included in the file name.
  3. Add markup for displaying prices to the product bundle template.
    {Helper( file: 'helpers/price-note-{BundleCategoryID}', or: {{ {BundleBuy} }} )}

If the product bundle belongs to a product category whose id is 1, the contents of the helper file will be displayed. Otherwise, purchase tools are going to be displayed for the product bundle.

Attribuutit

before/after:

With the before and after attributes, you can define content that is output before or after the content produced by the tag.

Allowed values: text that may contain HTML and Interface markup.

E.g.

  • before: '<p>This markup appears before the tag's own content.</p>'.
  • after: '<p>This appears after the tag's own content.</p>'

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

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: text that may contain HTML and Interface markup.

E.g. or:'Content not found.'