Object: product
Variables
.id
Unique ID of the product. Product IDs are generated automatically at the time of creating the products and cannot be changed. Typical use of the ID is as a product SKU, for easy referencing by customers and internally.
Examples
CODE{{ product.id }}
OUTPUT10245
CODE{{ product.id | product_url }}
OUTPUT/product/hp-laserjet-cp1525n-laser-printer
NB: the exact URL depends on the Product URL configuration
CODE{{ product.id | product_link: 'buy now' }}
OUTPUT<a href="/product/hp-laserjet-cp1525n-laser-printer">buy now</a>
NB: the exact URL depends on the Product URL configuration
.ref
Unique reference name of the product, based on configuration under Product » Update » Reference name.
Examples
CODE{{ product.ref }}
OUTPUThp-laserjet-cp1525n-laser-printer
URLs
Do not use .ref
to construct a product URL manually. Use the product_url
filter instead, on either the .id, .ref or the product object itself.
.brand
Brand object for the product, based on the configuration under Product » Update » Brand.
.barcode
Barcode object for the product, based on the configuration under Product » Update » Barcode.
.manufacturer_code
Manufacturer code of the product as configured under Product » Update » Manufacturer code.
Examples
CODE{{ product.manufacturer_code }}
OUTPUTCX-110223
.manufacturer_url
Manufacturer URL of the product as configured under Product » Update » Manufacturer URL.
Examples
CODE{{ product.manufacturer_url }}
OUTPUThttp://www.intel.com/processors/core-i7-processor.html
.name
Display name of the product as configured under Product » Update » Name.
Examples
CODE{{ product.name }}
OUTPUTHP LaserJet CP1525n Colour Laser Printer
.highlights
Higlights of the product as configured under Product » Update » Highlights.
Examples
CODE{{ product.highlights }}
OUTPUTFast reliable laser printing. Up to 22ppm in black. USB and Ethernet interfaces.
CODE{{ product.highlights | newline_to_br }}
OUTPUTFast reliable laser printing.
Up to 22ppm in black.
USB and Ethernet interfaces.
CODE{{ product.highlights | newline_to_ul }}
OUTPUT• Fast reliable laser printing.
• Up to 22ppm in black.
• USB and Ethernet interfaces.
.overview
Overview of the product as configured under Product » Update » Overview.
Examples
CODE{{ product.overview }}
OUTPUTGreat printer with lots of features ...
.package_content
Package content of the product as configured under Product » Update » Package Content.
Examples
CODE{{ product.package_content }}
OUTPUTPrinter
Cables
4 x Toners
.tier_pricing
tier_pricing
.discount_pricing
discount_pricing
.price
Display price of the product. It is either configured under Product » Update » Price (display) or calculated automatically, based on supplier product pricing, depending on the product's pricing profile configuration. When using tiers, and the price is rendered in customer account context, the display price will reflect the tiered pricing applicable to the customer's account.
Examples
CODE{{ product.price }}
OUTPUT999.95
CODE{{ product.price | money }}
OUTPUTEUR 999.95
.price_exclusive
Product price exclluding tax. It is either configured under Product » Update » Price (excl) or calculated automatically, based on supplier product pricing, depending on the product's pricing profile configuration.
Examples
CODE{{ product.price_exclusive }}
OUTPUT799.96
CODE{{ product.price_exclusive | money }}
OUTPUTEUR 799.96
.price_inclusive
Product price including tax. It is either configured under Product » Update » Price (incl) or calculated automatically, based on supplier product pricing, depending on the product's pricing profile configuration.
Examples
CODE{{ product.price_exclusive }}
OUTPUT999.95
CODE{{ product.price_exclusive | money }}
OUTPUTEUR 999.95
.tax
tax
.price_rrp
RRP (Recommended Retail Price) as configured under Product » Update » Recommended price.
Examples
CODE{{ product.price_rrp }}
OUTPUT999.95
CODE{{ product.price_rrp | money }}
OUTPUTEUR 999.95
.price_compare
Compare price as configured under Product » Update » Compare price.
Examples
CODE{{ product.price_compare }}
OUTPUT999.95
CODE{{ product.price_compare | money }}
OUTPUTEUR 999.95
.collections
List of collections the product belongs to.
.variants
List of available variants of the product.
.specifications
specifications
.customizations
customizations
.tags
tags
.metadata
metadata
.featured_image
The primary product image, as selected in the Product Gallery. If none is selected, the first image is returned. If the product has no associated images, the field is set to null.
Examples
CODE{{ product.featured_image.src }}
OUTPUT/files/gallery/00/00/00/00000001_00000007.jpg
.images
List of all non-hidden images in the Product Gallery.
Examples
CODE{% for image in product.images %}
{{ image.src }}
{% endfor %}
OUTPUT/files/gallery/00/00/00/00000001_00000007.jpg
/files/gallery/00/00/00/00000001_00000005.jpg
/files/gallery/00/00/00/00000001_00000006.jpg
Variable Dump
Copy and paste the below HTML into a product type template page, to see all product data dumped to your product page. You can then simply remove the unnecessary fields and other elements, and format the remaining fields however necessary to achieve the desired look and feel.
<style> .thedump .name{ background-color:#3A5FCD; color:white; padding:0.5em; font-weight:bold; } .thedump .code{ background-color:#888888; color:white; padding:0.5em; } .thedump .out{ background-color:white; color:#555555; padding:0.5em; border-bottom:1px solid #CCCCCC; margin-bottom:1em; } .thedump .code pre{ padding:0; margin:0; font-size:1.1em; } </style> <div class="thedump"> <div class="name">Product ID (SKU)</div> <div class="code"><pre>{{ product.id }}</pre></div> <div class="out">{{ product.id }}</div> <div class="name">Product Brand</div> <div class="code"><pre>id: {{ product.brand.id }}<br/> reference: {{ product.brand.ref }}<br/> name: {{ product.brand.name }}</pre></div> <div class="out"> id: {{ product.brand.id }}<br/> reference: {{ product.brand.ref }}<br/> name: {{ product.brand.name }}<br/> </div> <div class="name">Product Collections</div> <div class="code"><pre>{% for collection in product.collections %} <p> id: {{ collection.id }}<br/> reference: {{ collection.ref }}<br/> name: {{ collection.name }} url: {{ collection | collection_url }} link: {{ collection | collection_link: collection.name }} </p> {% endfor %}</pre></div> <div class="out"> {% for collection in product.collections %} <p> id: {{ collection.id }}<br/> reference: {{ collection.ref }}<br/> name: {{ collection.name }}<br/> url: {{ collection | collection_url }}<br/> link: {{ collection | collection_link: collection.name }} </p> {% endfor %} </div> <div class="name">Product URL</div> <div class="code"><pre>{{ product | product_url }}</pre></div> <div class="out">{{ product | product_url }}</div> <div class="name">Product Reference</div> <div class="code"><pre>{{ product.ref }}</pre></div> <div class="out">{{ product.ref }}</div> <div class="name">Product Manufacturer Code</div> <div class="code"><pre>{{ product.manufacturer_code }}</pre></div> <div class="out">{{ product.manufacturer_code }}</div> <div class="name">Product Manufacturer URL</div> <div class="code"><pre>{{ product.manufacturer_url }}</pre></div> <div class="out">{{ product.manufacturer_url }}</div> <div class="name">Product Name</div> <div class="code"><pre>{{ product.name }}</pre></div> <div class="out">{{ product.name }}</div> <div class="name">Product Highlights</div> <div class="code"><pre>{{ product.highlights | newline_to_ul }}</pre></div> <div class="out">{{ product.highlights | newline_to_ul }}</div> <div class="name">Product Overview</div> <div class="code"><pre>{{ product.overview }}</pre></div> <div class="out">{{ product.overview }}</div> <div class="name">Product Package Content</div> <div class="code"><pre>{{ product.package_content }}</pre></div> <div class="out">{{ product.package_content }}</div> <div class="name">Product Featured Image</div> <div class="code"><pre>id: {{ product.featured_image.id }}<br/> alt: {{ product.featured_image.alt }}<br/> notes: {{ product.featured_image.notes }}<br/> {{ product.featured_image.src }}<br/> {{ product.featured_image.src | img_tag }}<br/> {% for variant in product.featured_image.variants %} {{ variant.ref }}<br/> {{ variant.src }}<br/> {{ variant.src | img_tag }}<br/> {% endfor %} {{ product.featured_image.variants.small.src }}<br/> {{ product.featured_image.variants.small.src | img_tag }}<br/></pre></div> <div class="out"> id: {{ product.featured_image.id }}<br/> alt: {{ product.featured_image.alt }}<br/> notes: {{ product.featured_image.notes }}<br/> {{ product.featured_image.src }}<br/> {{ product.featured_image.src | img_tag }}<br/> {% for variant in product.featured_image.variants %} {{ variant.ref }}<br/> {{ variant.src }}<br/> {{ variant.src | img_tag }}<br/> {% endfor %} {{ product.featured_image.variants.small.src }}<br/> {{ product.featured_image.variants.small.src | img_tag }}<br/> </div> <div class="name">Product Images</div> <div class="code"><pre>{% for image in product.images %} id: {{ image.id }}<br/> alt: {{ image.alt }}<br/> notes: {{ image.notes }}<br/> {{ image.src }}<br/> {{ image.src | img_tag: image.alt }}<br/> {% for variant in image.variants %} {{ variant.ref }}<br/> {{ variant.src }}<br/> {{ variant.src | img_tag: image.alt }}<br/> {% endfor %} {% endfor %}</pre></div> <div class="out"> {% for image in product.images %} id: {{ image.id }}<br/> alt: {{ image.alt }}<br/> notes: {{ image.notes }}<br/> {{ image.src }}<br/> {{ image.src | img_tag: image.alt }}<br/> {% for variant in image.variants %} {{ variant.ref }}<br/> {{ variant.src }}<br/> {{ variant.src | img_tag: image.alt }}<br/> {% endfor %} {% endfor %} </div> </div>