Screen: ShopSite > Merchandising > Custom Templates
Custom Template Tag Specification
Product Tags
These tags can only be used in product templates.
Special Product Tags
Defines
- [-- DEFINE PRODUCT --]
[-- END_DEFINE PRODUCT --]
- Marks the beginning and end of the HTML for the product template. Most of the template will be contained between the [-- DEFINE PRODUCT --] and [-- END_DEFINE PRODUCT --] tags.
- [-- DEFINE SUBPRODUCT --]
[-- END_DEFINE SUBPRODUCT --]
- Marks the beginning and end of the HTML that defines the presentation of a subproduct in this product template. The subproducts of a product with this template will be presented using this template, regardless of the template selected for the subproducts. These tags must come before the [-- DEFINE PRODUCT --] tag in a product template.
- You can use all global and product tags within a subproduct definition, but note that product tags will produce information about the subproduct, not about the parent product.
- [-- DEFINE MORE_INFO_PAGE --]
[-- END_DEFINE MORE_INFO_PAGE --]
- Marks the beginning and end of the HTML that defines a More Info page for this product.
Subproducts
- [-- LOOP SUBPRODUCTS {numcolumns} --]
[-- END_LOOP SUBPRODUCTS --]
- Marks the beginning and end of a loop to insert subproduct information on a page. Everything within the loop is repeated for each subproduct assigned to the current product.
The optional numcolumns parameter lets you present subproducts in rows in a table, which produces a multi-column layout. You can specify the number of columns in two ways:
- A number, to define a fixed number of columns
- VAR.xxx, to use a variable value set previously in the template
When used with the numcolumns parameter, the LOOP tag will be replaced with a <TR> tag and the END_LOOP tag will be replaced with a </TR> tag when the page is generated, so you should not include those tags in your template.
- [-- SUBPRODUCTS --]
- Inserts the fields for the next subproduct within a [-- LOOP SUBPRODUCTS --] loop. This tag must appear on a line by itself between a [-- LOOP SUBPRODUCTS --] and an [-- END_LOOP SUBPRODUCTS --] tag.
- [-- PRODUCT.NumSubproducts --]
- Number of subproducts assigned to this product.
- [-- PRODUCT.Subproduct --]
- A comma delimited list of product record IDs representing this product's subproducts.
- [-- PRODUCT.Parent --]
- Returns the product ID of the parent product. All subproducts must include this tag as a hidden form field with the name "super", like this:
<input type=hidden name="super" value="[-- PRODUCT.Parent --]">
Product Database Tags
Product database tags insert the contents of a field from the products database. For example, [-- PRODUCT.Name --] returns the contents of the product's Name field. Most product database tags can also be used in an IF tag to test for a value.
All product database tags that return merchant-defined text can be used with the Remove_HTML parameter, which removes any HTML from the field before displaying it.
Name
- [-- PRODUCT.Name --]
- The product name.
- [-- PRODUCT.DisplayName --]
- Returns checked if the product name is to be displayed.
- [-- PRODUCT.NameStyle {Begin, End} --]
- Returns Bold, Italic, Typewriter, or Plain to indicate the font style to use for the product name.
With the optional Begin and End parameters, this tag returns the beginning or ending HTML tags for the chosen style. For example, if the merchant has set the name style to Bold for a product named "Baseball Bat," this code:
[-- PRODUCT.NameStyle Begin --][-- PRODUCT.Name --][-- PRODUCT.NameStyle End --]
would return
<b>Baseball Bat</b>
- [-- PRODUCT.NameSize {Begin, End} --]
- Returns Normal, Big, or Small to indicate the font size to be used for the product name.
With the optional Begin and End parameters, this tag returns the beginning or ending HTML tags for the chosen size. For example, if the merchant has set the name size to Big for a product named "Baseball Bat," this code:
[-- PRODUCT.NameSize Begin --][-- PRODUCT.Name --][-- PRODUCT.NameSize End --]
would return
<big>Baseball Bat</big>
- [-- PRODUCT.VariableName? --]
- Returns checked if variable name is enabled for the product.
Price
- [-- PRODUCT.Price --]
- The price of the product. Note that this value is formatted according to the store currency setting and includes the currency symbol.
- [-- PRODUCT.SaleAmount --]
- The sale price of the product. This is either a numeric value without a currency symbol, or a percent to be deducted from the Price, such as 10%.
- [-- PRODUCT.DisplayPrice --]
- Returns checked if the product price is to be displayed.
- [-- PRODUCT.SaleOn --]
- Returns checked if the sale price is to be displayed and if the SaleAmount field is not null, that is, if the product is on sale.
- [-- PRODUCT.PriceStyle {Begin, End} --]
- Returns Bold, Italic, Typewriter, or Plain to indicate the font style to use for the product price.
See the NameStyle tag for an explanation of the Begin and End parameters.
- [-- PRODUCT.PriceSize {Begin, End} --]
- Returns Normal, Big, or Small to indicate the font size to be used for the product price.
See the NameSize tag for an explanation of the Begin and End parameters.
- [-- PRODUCT.AltPrice --]
- The price of the product in the store's alternate currency, if an alternate currency has been defined. Note that this value is formatted according to the store currency setting and includes the currency symbol. If an alternate currency has not been defined for the store, this field returns an empty string.
- [-- PRODUCT.AltSaleAmount --]
- The sale price of the product in the store's alternate currency, if an alternate currency has been defined. This is either a numeric value without a currency symbol, or a percent to be deducted from the Price, such as 10%. If an alternate currency has not been defined for the store, this field returns an empty string.
- [-- PRODUCT.QuantityPricing --]
- (ShopSite Pro only) A dual-purpose tag that can be used in an IF tag to test whether Quantity Pricing is enabled for this product, and by itself to insert the Quantity Pricing table for the product. The code generally looks like this:
[-- IF PRODUCT.QuantityPricing --]
[-- PRODUCT.QuantityPricing --]
[-- END_IF --]
This produces a complete HTML table containing the quantities and prices available for the product. The <TABLE> tag includes a style attribute (style class="qp_header") that you can add to a CSS style sheet to set some of the table formatting.
- [-- PRODUCT.DisplayOrderQuantity --]
- Returns checked if a product quantity box is to be displayed on the product page as well as on shopping cart. Use an IF statement to determine the value:
[--IF PRODUCT.DisplayOrderQuantity--]
some tags
[--END_IF--]
- [-- PRODUCT.VariablePrice? --]
- Returns checked if variable price is enabled for the product.
Tax
- [-- PRODUCT.Taxable --]
- Returns checked if the current product is taxable.
SKU
- [-- PRODUCT.SKU --]
- The SKU (stock code) of the current product.
- [-- PRODUCT.DisplaySKU --]
- Returns checked if the product SKU is to be displayed.
- [-- PRODUCT.SKUStyle {Begin, End} --]
- Returns Bold, Italic, Typewriter, or Plain to indicate the font style to use for the product SKU.
See the NameStyle tag for an explanation of the Begin and End parameters.
- [-- PRODUCT.SKUSize {Begin, End} --]
- Returns Normal, Big, or Small to indicate the font size to be used for the product SKU.
See the NameSize tag for an explanation of the Begin and End parameters.
- [-- PRODUCT.VariableSKU? --]
- Returns checked if variable SKU is enabled for the product.
Graphic
- [-- PRODUCT.Graphic --]
- Returns a full <img src> tag for the product graphic with all the formatting information, including size and alt values. Use the REMOVE_HTML attribute if you want to customize the <img> tag, as described for the PAGE.GRAPHIC tag.
- [-- IMAGE Product.Graphic --]
- Returns the path and file name of the product graphic, relative to the store’s media directory.
- [-- PRODUCT.DisplayGraphic --]
- Returns checked if the product graphic is to be displayed.
- [-- PRODUCT.ImageAlignment --]
- Returns left, right, or center to indicate if the product image is to be aligned to the left, right, or center.
- [-- PRODUCT.TextWrap --]
- Returns On if the product description is to wrap under the product graphic, and Off if the description is to maintain a column to the side of the graphic.
Description
- [-- PRODUCT.ProductDescription --]
- The text description of the current product. This field may contain HTML tags.
- [-- PRODUCT.DescriptionStyle {Begin, End} --]
- Returns Bold, Italic, Typewriter, or Plain to indicate the font style to use for the product description.
See the NameStyle tag for an explanation of the Begin and End parameters.
- [-- PRODUCT.DescriptionSize {Begin, End} --]
- Returns Normal, Big, or Small to indicate the font size to be used for the product description.
See the NameSize tag for an explanation of the Begin and End parameters.
Shipping Charges
- [-- PRODUCT.ShippingCharge --]
- The charge for shipping the current product. Used for flat-rate shipping.
- [-- PRODUCT.GroundShipping1 --]
- The charge to ship the current product by standard ground shipping.
- [-- PRODUCT.SecondDayShipping1 --]
- The charge to ship the current product by second-day air shipping.
- [-- PRODUCT.NextDayShipping1 --]
- The charge to ship the current product by next-day air shipping.
- [-- PRODUCT.Shipping3 --]1
[-- PRODUCT.Shipping4 --}
[-- PRODUCT.Shipping5 --}
[-- PRODUCT.Shipping6 --}
[-- PRODUCT.Shipping7 --}
[-- PRODUCT.Shipping8 --}
[-- PRODUCT.Shipping9 --]
- The charge to ship the current product via a merchant-defined method.
- [-- PRODUCT.NoShippingCharges2 --]
- Returns checked if the merchant marked this product for no shipping charges.
- [-- PRODUCT.Weight --]
- The shipping weight of the current product. Used for weight-based shipping.
- [-- PRODUCT.DimensionOptions --]
- Returns checked if the merchant defined shipping box dimensions for this product.
- [-- PRODUCT.DimensionText --]
- The shipping box dimensions for this product, in the form LxWxH, for example 20x20x24
- [-- PRODUCT.DimensionSelected --]
- The dimensions of one of the shipping boxes configured on the Shipping screen.
- [-- PRODUCT.ExtraHandlingCharge --]
- A handling charge to be applied when this product is ordered.
Ordering Options
- [-- PRODUCT.DisplayOrderingOptions --]
- Returns checked if the product's ordering options are to be displayed on the product page as well as on shopping cart. Use an IF statement to determine the value:
[--IF PRODUCT.DisplayOrderingOptions--]
some tags
[--END_IF--]
- [-- PRODUCT.OptionText --]
- The text instructions given to customers to select product options from drop-down lists on the order form.
- [-- ORDER_OPTION_MENU COLUMN {SKU} --]
[-- ORDER_OPTION_MENU LINE {SKU} --]
- Returns a complete HTML table to present the ordering options for a product, either all on one line or all in one column. This tag must be placed inside a <form> tag. The optional SKU parameter tells ShopSite to use the product SKU instead of the record number in a hidden form field.
- [-- PRODUCT.OptionFiniteText --]
- Product options to be presented in drop-down lists on the order form. The options are returned as a single space-separated string; you will probably need to write a small program and use the CALL tag to process it. For ShopSite Pro stores, the selected options can change the price of the product. If you don't want to customize the appearance of the drop-down lists, you may find it easier to use the [-- ORDER_OPTION_MENU --] tag.
- [-- PRODUCT.OptionsBox --]
- Returns checked if a customer text entry box for this product is to be displayed on the order form. You can also use this tag in an [-- IF --] tag to create a text area on a custom page to collect information from customers, and then pass the input to the order form. You must use an HTML form for the order options and [Add to Cart] button to do this, and you must use "freeopt" as the name of the text area, like this:
<form action="[-- SHOPPING_CART_URL BASE --]/order.cgi" method=post>
<input type=hidden name=storeid value=[-- STORE_ID --]>
<input type=hidden name=dbname value=products>
<input type=hidden name=function value=add>
<input type=hidden name=itemnum value=[-- PRODUCT.RecordNumber --]>
[-- IF PRODUCT.DisplayOrderingOptions --]
<br>[-- PRODUCT.OptionText --]
[-- ORDER_OPTION_MENU LINE --]
[-- END_IF --]
[-- IF PRODUCT.OptionsBox --]
<textarea name="[-- PRODUCT.Recordnumber --]:freeopt"> </textarea>
[-- END_IF --]
<input type=image src="[-- OUTPUT_DIRECTORY_URL --]/media/button_add.gif" border=0 name="Add to Cart" alt="Add to Cart">
</form>
Add/View Buttons
- [-- PRODUCT.AddToCartURL --]
- Inserts the URL needed to create a link to the shopping cart and add the current product. Note that the template must provide the HTML tags and the text or graphic for the link. For example, an AddtoCartURL tag that uses a graphic might look like this:
<a href="[-- PRODUCT.AddToCartURL --]"><img src="buynow.gif"></a>
- [-- SHOPPING_CART_URL --]
- Inserts the full URL to the shopping cart link.
- [-- STORE.AddToCart --]
- The text or image file name to be used for the Add To Cart button. The [-- STORE.DisplayAddToCartText --] tag can be used to test whether to make the button with an image or text. See [-- PRODUCT.AddToCartButton --], [-- AddImage --], and [-- AddText --] for more information on creating Add To Cart buttons using product-specific buttons (available in ShopSite Pro only).
- [-- STORE.DisplayAddToCartText --]
- returns checked if [-- STORE.AddToCart --] is text, unchecked indicates that [-- STORE.AddToCart --] contains the filename for the image to be used. The following example demonstrates one way to use the [-- STORE.DisplayAddToCartText --] tag.
[-- IF STORE.DisplayAddToCartText "checked" --]
<input type="submit" value="[-- STORE.AddToCart --]">
[-- ELSE --]
<input type="image" value="submit"
src="[-- Output_Directory_URL --]/media/[-- STORE.AddToCart --]">
[-- END_IF --]
- [-- STORE.ViewCart --]
- The text or image file name to be used for the View Cart button. The [-- STORE.DisplayViewCartText --] tag can be used to test whether to make the button with an image or text. See [-- PRODUCT.ViewButton --], [-- ViewImage --], and [-- ViewText --] for more information on creating View Cart buttons using product-specific buttons (available in ShopSite Pro only).
- [-- STORE.DisplayViewCartText --]
- returns checked if [-- STORE.ViewCart --] is text, unchecked indicates that [-- STORE.ViewCart --] contains the filename for the image to be used. See [-- STORE.DisplayAddToCartText --] for more information.
- [-- PRODUCT.AddToCartButton2 --]
- Returns the contents of the Text field for the [Add to Cart] button, even if the merchant selected to use the Image selection drop-down list. This may be just simple text, or text with HTML tags to format the text, or an <img> tag.
Note that custom templates do not support the image selection drop-down list introduced in version 5.0. You must either use text for the Add to Cart link (button), or specify the path to a graphic file.
- [-- PRODUCT.ViewCartButton2 --]
- Returns the text to use for the [View Cart] button. This may be just simple text, or text with HTML tags to format the text, or an <img> tag.
Note that custom templates do not support the image selection drop-down list introduced in version 5.0. You must either use a text button, or specify the path to a graphic file.
- [-- PRODUCT.OrderCheckout --]
- Returns a complete set of FORM tags to present the [Add to Cart] and [View Cart] buttons, as defined for the product. If the product has the display of ordering options and/or quantity enabled, they are included as parts of the form.
- [-- AddImage? --]
- True if using an image for Add to Cart button
- [-- AddImage --]
- The src and parameters for the Add to Cart image, or "none" if no image
- [-- AddImage Image_Name --]
- The media subdirectory and file name of the Add to Cart image
- [-- AddText --]
- Text for the Add to Cart link, or null if an image is used.
- [-- ViewImage? --]
- True if using an image for View Cart button
- [-- ViewImage --]
- The src and parameters for the View Cart image, or "none" if no image
- [-- ViewImage Image_Name --]
- The media subdirectory and file name of the View Cart image
- [-- ViewText --]
- Text for the View Cart link, or null if an image is used.
Inventory Tracking
- [-- PRODUCT.QuantityOnHand2 --]
- Returns a numeric value for the quantity of the product considered to be in stock. Once the merchant sets this number, ShopSite decrements it for each product ordered.
- [-- PRODUCT.LowStockThreshold2 --]
- Returns a numeric value for the number of units at which ShopSite is to send an e-mail "low stock" notice to the merchant.
- [-- PRODUCT.OutOfStockLimit2 --]
- Returns a numeric value for the number of units remaining (QuantityOnHand) at which ShopSite is to stop taking orders for this product.
Search
- [-- PRODUCT.SearchKeywords2 --]
- Returns the list of keywords that the merchant entered for search indexing.
Merchant-Definable Fields
- [-- PRODUCT.Field12 --]
[-- PRODUCT.Field22 --]
[-- PRODUCT.Field32 --]
[-- PRODUCT.Field42 --]
[-- PRODUCT.Field52 --]
- Generic string fields that the merchant can use to enter product information that does not fit in any of the predefined fields.
Miscellaneous
- [-- PRODUCT.RecordNumber --]
- Inserts the record number of the product. You can use this tag to create HTML anchor tags to link directly to a specific product, such as <a name="#[-- PRODUCT.RecordNumber --]">
Product More Info Page Tags
These tags can be used to create product More Info pages and can only be used in product templates. These tags must come outside the [-- DEFINE PRODUCT --] and [-- END_DEFINE PRODUCT --] tags within a product template.
Defines
- [-- DEFINE More_Info_Page --]
[-- END_DEFINE More_Info_Page --]
- Marks the beginning and end of the HTML that defines a More Info page for this product.
Product Information
- [-- PRODUCT.DisplayMoreInformationPage --]
- Returns checked if there is a More Information Page defined for this product.
- [-- PRODUCT.MoreInformationText --]
- The product description to display on the More Information Page for the current product.
- [-- PRODUCT.MoreInformationGraphic --]
- Returns a full <img src> tag for the graphic for the product More Information Page, with all the formatting information, including size and alt values. Use the REMOVE_HTML attribute if you want to customize the <img> tag, as described for the PAGE.GRAPHIC tag.
- [-- IMAGE Product.MoreInformationGraphic --]
- Returns the path and file name of the product More Information Page graphic, relative to the store’s media directory.
- [-- PRODUCT.MoreInformationFileName --]
- The file name of the More Information Page for the current product. If the merchant left this field blank, ShopSite assigns a file name and returns that value, such as Product1.html.
- [-- PRODUCT.MoreInfoURL --]
- Inserts the URL of the product's More Info page, assuming one is defined.
Header and Footer
- [-- MORE_INFO.DisplayPageHeader --]
- Returns checked if the store's page header is to be displayed. Use an IF statement to determine the value:
[-- IF MORE_INFO.DisplayPageHeader --]
<P>[-- HEADER --]</P>
[-- END_IF --]
- [-- MORE_INFO.DisplayPageFooter --]
- Returns checked if the store's page footer is to be displayed. Use an IF statement to determine the value:
[-- IF PAGE.DisplayPageFooter --]
<P>[-- FOOTER --]</P>
[-- END_IF --]
Search
- [-- Search_Form --]
- Insert the search form
Color and Background
- [-- MORE_INFO.BackgroundColor --]
- Inserts a pound sign (#) and the hex value of the background color of the More Info page.
- [-- MORE_INFO.BackgroundImage --]
- Inserts the file name of the background image for the More Info page. Note that the template must include the rest of the tag to use the image, such as:
<BODY BACKGROUND="[-- MORE_INFO.BackgroundImage --]">
- [-- MORE_INFO.TextColor --]
- Inserts a pound sign (#) and the hex value of the text color of the More Info page.
- [-- MORE_INFO.LinkColor --]
- Inserts a pound sign (#) and the hex value of the unvisited link color of the More Info page.
- [-- MORE_INFO.VisitedLinkColor --]
- Inserts a pound sign (#) and the hex value of the visited link color of the More Info page.
- [-- MORE_INFO.ActiveLinkColor --]
- Inserts a pound sign (#) and the hex value of the active link color of the More Info page.
1 Merchants can change the names and purposes of all shipping methods, but templates must use these default fields names. That means that, for example, a template might contain the [-- PRODUCT.SecondDayShipping --] tag, but the merchant may have redefined that shipping method to "Overnight, morning delivery."
2 This field's value can only be set in ShopSite Pro stores. You should use an IF tag to determine the product level of a store before using this tag.
[-- IF STORE.Type PROFESSIONAL --]