The product tag builds all of the details for a given product. he categories in the catalog. For an exmple of how the tag is used in practice view http://demo.brilliantretail.com/product/long-sleeve-shirt. All of the internal tags in the product tag are available to the BrilliantRetail fieldtype and can be called with the fieldtype name as a tagpair in a channel.
Parameters
-
url_title (optional | default = 'segment_2') - The url_title is assumed to be in the second segment by default. You can manually pass the parameter if your url_title is in a different segment.
-
product_id (optional | default = '') - You can also pass the product_id directly
Internal Tags
-
{no_results} - Returns TRUE if no products exist
-
{title} (single) - Product title
-
{detail} (single) - Product description
-
{type_id} (single) - Numerical value representing product type (1=basic, 2=bundle, 3=configurable, 4=download, 5=service)
-
{sku} (single)
-
{quantity} (single) - How many of these products are available in stock
-
{image_large} (single) - Selected as the 'large' image on the product edit form
-
{image_large_title} (single) - Image large title
-
{image_total} (single) - Count of images in the images tag
-
{images} (pair) - All images for the product
-
{filenm} (single) - src in the media directory for image
-
{image_count} (single) - Count variable inside images tag pair.
-
{image_switch="a|b|c"} - Allows for switching on each row.
-
{price} (single) - base price for the product. It does not accout for sale pricing
-
{sale_price} (single)
-
{sale_start} (single) - Start date of sale
-
{sale_end} (single) - End date of sale
-
{meta_title} (single)
-
{meta_descr} (single)
-
{meta_keyword} (single)
-
{featured} (single) - True/False (1/0) value as to whether the item is featured
-
{price_html} (single) - an html formatted version of the price. Will automatically include the price / sale price when applicable
-
{quantity} (single) - Displays the quantity available.
-
{attribute} (pair) - Custom attributes added to the product. Currently text, textarea and file attachement are available.
-
{label} (single) - Option label
-
{value} (single) - Out put from the custom attribute
-
{configurable} (pair) - Pair for the options and select options for a configurable product
-
{configurable_label} (single) - Option label
-
{configurable_select} (single) - Dynamic option select box
-
{configurable_js} (single) - Required for configurable products to automatically build the dynamic selectors.
-
{options} (pair) - Product options are automatically added to the item when added to the cart.
-
{option_label} (single) - Option label
-
{option_input} (single) - Option input field, Currently text, textarea, and select options are available.
Example from Blank template: (file: product/index)
Comments
By Brandon Carson on Monday February 28th, 2011 at 5:05am
If you’re using the url_title variable, make sure you format it like this:
{exp:brilliant_retail:product url_title=”{segment_3}”}
By Jeff Claeson on Monday May 23rd, 2011 at 5:08pm
To get the title of the images within the {images} loop use {image_title}
By MarkDrzycimski on Wednesday October 26th, 2011 at 12:29pm
It should be noted that {product_id} will return the product’s ID.
By MarkDrzycimski on Thursday November 10th, 2011 at 9:24am
The product tag also takes an optional “form” parameter. Setting “form” to “no” will suppress the output of the <form> and [removed] tags that normally accompany the product. Very useful when using the product tag to generate custom <meta> tags in the header.
Add Your Comments
You must be logged in to comment.