Skip to content

Product displayers

All displayers below are registered via defineDisplayer(...) and share the same base

All displayers below are registered via defineDisplayer(...) and share the same base class (SfDisplayer) and therefore the same five attributes. Each maps to a fixed dot-path into the product (or selected variant) data.

Shared displayer attributes (every show-* displayer in this section):

  • query : string = "" - override the displayer’s dot-path (e.g. query="title"). For show-data this is required (its built-in path is empty - SSK-205).
  • money : boolean = false - force money-formatting of the resolved value.
  • html : boolean = false - set innerHTML instead of textContent.
  • variant : boolean = false - resolve the path from selectedVariant instead of the product root.
  • hide-when-zero : boolean (presence) - also treat a numeric/amount value of 0 as empty.

Shared behaviour / state: when the resolved value is empty/null/"" (or zero with hide-when-zero), the displayer sets hidden + [ss-empty] on itself and clears its text; otherwise it removes both and writes the value. Money paths use shop.moneyFormat (needs storeContext).

Required ancestor / context for all: storesynk-product (consumes productContext; also storeContext for money). Events: none.

Product-level (resolve from the product root):

TagPathFormat
show-titletitletext
show-descriptiondescriptionHtmlHTML (innerHTML)
show-vendorvendortext
show-product-typeproductTypetext
show-data(none - set via query)text (use money/html as needed)
show-min-pricepriceRange.minVariantPricemoney
show-max-pricepriceRange.maxVariantPricemoney
show-min-compare-pricecompareAtPriceRange.minVariantPricemoney
show-max-compare-pricecompareAtPriceRange.maxVariantPricemoney

Variant-level (resolve from selectedVariant; update on option change):

TagPathFormat
show-pricepricemoney
show-compare-pricecompareAtPricemoney
show-skuskutext
show-barcodebarcodetext
show-stockquantityAvailabletext (number)
show-weightweight (+ weightUnit suffix)text, e.g. 2 kg
show-unit-priceunitPricemoney

Runtime:

TagPathNotes
show-quantityquantityread-only current stepper/cart quantity on the product

Imported from the Storesynk skill v0.1.0 (references/component-reference.md). To change this page, change it there.