Template Commands

Here are the complete StoreCreator template commands available for use in creating and customizing your stores.

#Display commands

These commands insert another html file (or part of an html file) to display either the categories or items. Make sure the html name referred in the template command is exactly the same as the actual html file name that it is referring.

#DisplaySpecialItemGroup

Syntax: #DisplaySpecialItemGroup <html file name>
Use: To print out items that are indicated as special offer items in your database. You can use them on any file.
Example:
#DisplaySpecialItemGroup ItemTableSpecial.html

In the ItemTableSpecial.html you can have these lines:
<table border=0 width=450 CELLSPACING=0 CELLPADDING=0>
<! -- we will place our special offer items here -->
<!-- Label for repeating items printing -->
#Label ItemStart
<! -- This function will display one item detail as stated in the ItemPern.html file, and then advance the item pointer to the next item -->
<tr> <td valign=top bgcolor=#aaaaaa>
#DisplaySingleItem ItemPaternListSpecial.html
</td><td valign=top bgcolor=#cccccc>
#DisplaySingleItem ItemPaternListSpecial.html
</td><td valign=top bgcolor=#aaaaaa>
#DisplaySingleItem ItemPaternListSpecial.html
</td>
</tr>
<! -- If we haven't finished printing out the items, go to ItemStart label and repeat the pattern -->
#IfNotLastItemGoLabel ItemStart
</table>

#DisplayCurCatalogGroup

Syntax: #DisplayCurCatalogGroup <html file name>
Use: To print out the current category. Use in category.html file.
Note we may use catalogs and categories interchangeably.
Example:
#DisplayCurCatalogGroup CatalogTable.html

In your CatalogTable.html you can have these html codes:
<table border=0 width=450>
<!-- we will place our catalogs here -->
<!-- Label for repeating catalog printing -->
#Label CatalogStart
<!-- This function will display one catalog detail as stated in the CatalogPern.html file, and then advance the catalog pointer to the next catalog -->
<tr valign=top><td>
#DisplaySingleCatalog CatalogPatern.html
</td><td>
#DisplaySingleCatalog CatalogPatern.html
</td><td>
#DisplaySingleCatalog CatalogPatern.html
</td></tr>
<!-- If we haven't finished printing out the catalogs, go to CatalogStart label and repeat the pattern -->
#IfNotLastCatalogGoLabel CatalogStart
</table>

#DisplaySingleCatalog

Syntax: #DisplaySingleCatalog <html file name>
Use: To print out the current category details. Use in category.html.
Example:
#DisplaySingleCatalog CatalogPatern.html

In your CatalogPatern.html file:
<!-- display a single catalog detail -->
<table border=0 width=120><tr><td>
<center><a href='
#PrintCatalogLink
' ><img width=100 height=100 src='
#PrintCatalogIcon
' border=0 alt='
#PrintCatalogName
'></a><br>
<a href='
#PrintCatalogLink
'><font size=2><strong>
#PrintCatalogName
</a>(
#PrintCatalogItemNumber
)</font></strong><br>
<font size=1 color=#0000ff>
#PrintCatalogDescription
</font></td></tr></table>

#DisplayCurItemGroup

Syntax: #DisplayCurItemGroup <html file name>
Use: To print out the items belonging to the current category. Use in category.html

#DisplaySingleItem

Syntax: #DisplaySingleItem <html file name>
Use: To print out details of the items in the category. Use in item.html.
Example:
#DisplaySingleItem ItemFullDetail.html

In your ItemFullDetail.html
<img border=0 src='
#PrintItemImage
'><br><font size=3 color=#ff0000><strong>
#PrintItemName
</strong></font><br><font size=2 color=#333333>
#PrintItemLongDesc
<br>
<! -- Please leave the following fields and form structure as it is unless you fully understand how this works -->
<p>
#PrintFormName
<!-- Hidden fields name and value-->
#PrintFormItemName
#PrintFormItemBasePrice
#PrintFormTotalSubField
#PrintFormItemID
<!-- latest, so that it will be compatible with the future upgrade -->
#PrintFormItemHiddenField
<font size=2><strong>Price : </strong>
#PrintItemPrice
<br>
<!-- Print the Item sub fields param1=font size, param 2==Color -->
#PrintFormItemSubFields 2 #0000ff 100
<br><font size=2> <Strong>Quantity: </strong>
#PrintFormItemQtyField
<br>
#PrintFormItemAddCard Add to cart
</form>

#DisplayNewItemsGroup

Syntax: #DisplayNewItemsGroup <html file name>
Use: To print out items that are indicated as new items in the database

#DisplayUpdateItemsGroup

Syntax: #DisplayUpdateItemsGroup <html file name>
Use: To print out items that are indicated as update items in the database.

The following three commands are for labeling html files.

#Label

Syntax: #Label <label name>
Use: Name a label for conditional use with item and category printing.
Example:
See above #DisplayCurCatalogCroup

#IfNotLastCatalogGoLabel

Syntax: #IfNotLastCatalogGoLabel <label name>
Use: If it is not the last category in the list, go back to the label, print the next category according to the pattern defined in the label and repeat this process till the last category is reached.

#IfNotLastItemGoLabel

Syntax: #IfNotLastItemGoLabel <label name>
Use: If it is not the last item in the list, go back to the label, print the next item according to the pattern defined in the label and repeat this process till the last item is reached.

The following #Insert and #Print commands insert information, texts, fields or images into an html file.

#InsertAllCatalogOptions

Use: To put all the categories in a drop down box, allowing your customers to select any category from the drop down box. See the template: fancy1.ini

#InsertNewIconIfAny

Use: Insert a ‘new’ icon if the item is indicated as ‘new’ item in the database.

#InsertUpdateIconIfAny

Use: Insert an ‘update’ icon is the item is indicated as ‘update’ item in the database.

#PrintCatalogItemNumber

Print category item number (the total item number that is under this category)

#PrintCatalogName

Print category name

#PrintCatalogDescription

Print category description

#PrintCatalogFullDescription

Print category full description

#PrintCatalogIcon

Print category icon file name

#PrintCatalogImage

Print category image file name

#PrintCatalogLink

Print category link

#PrintPreviousCatalogLink

Print link to the previous category

#PrintItemLink

Print link to the item.html page displaying this item

#PrintItemName

Print item name

#PrintItemShortDesc

Print item short description

#PrintItemExternalURL

Print the link of the external URL for the item

#PrintItemExternalURLIfAny

Syntax: #PrintItemExternalURLIfAny <any text>
Print the text following the command instead of the URL address
Example:
#PrintItemExternalURLIfAny Please click for additional info

the above command will print:
<a href="..." target=NEW_WINDOW> Please click for
Additional info</a>

the text will appear only if the external URL is not empty for this item

#PrintItemIcon

Print the item icon name

#PrintItemImage

Print the item image name

#PrintItemPrice

Print the item price with currency unit

#PrintItemPriceNoCurrencySign

Print the item price without currency unit

#PrintItemOldPrice

Print the old price

#PrintItemOldPriceIfAny

Syntax: #PrintItemOldPriceIfAny <text>
Print the text before the item old price
Example:
#PrintItemOldPriceIfAny Old Product Price

Above command will print:

Old Product Price US$ 456.45

#PrintItemCatagory

Print the name of item category

#PrintItemLongDesc

Print the item long description

#PrintItemID

Print the item ID

#PrintItemWeight

Print the weight of this item

#PrintFormName

Print the item name for the shopping cart
See the example in #DisplaySingleItem

#PrintFormTotalSubField

Print the number of subfields

#PrintFormItemSubFields

Print all the subfields of your items

#PrintFormItemQtyField

Print the Item Quantity field for your customers to fill in the quantity

#PrintFormItemAddCard

Syntax: #PrintFormItemAddCard <button text>
Print the button text to the Add Cart button
Example:
#PrintFormItemAddCard Add to My Cart

Above will print ‘Add to My Cart’ on the add to cart button

#PrintFormItemAddCardHTMLLink

This will display a graphic add button instead of the usual text add button
Example:
<a href=’
#PrintFormItemAddCardHTMLLink
‘ alt=’Add Card’><img src="MyAddButton.gif"></a>

Above command will turn all your item add button into an graphic button

#PrintFormItemName

Print the item name in the <input form format>
<input type=hidden name=ItemName value="..">

#PrintFormItemID

Print form type of item ID hidden field... must be used in the item fields. This command will print the following:
<input type=hidden name=itemID value="...">

#PrintFormItemBasePrice

Print the item base price. This is a compulsory field.

#PrintFormItemHiddenField

Print all the item hidden fields. (this command must be used if you use an item add button

#PrintStoreCompanyName

Print store company name

#PrintStoreStreetAddress

Print store street address

#PrintStoreCity

Print store city

#PrintStoreState

Print store state

#PrintStorePostcode

Print store postal code or zip code

#PrintStoreCountry

Print store country

#PrintStorePhone

Print store phone number

#PrintStoreFax

Print store fax number

#PrintStoreEmail

Print the store email address - the email address you entered in the store profile.

#PrintStoreHomePage

Print the store home page address

#PrintHTMLALink

Print the color of the Alink in html color code as specified in the config store section

#PrintHTMLBGColor

Print the bgcolor color in html color code as specified in the config store section

#PrintHTMLBGImage

Print the bgimage in html code as specified in the config store section.

#PrintHTMLColor

Syntax: #PrintHTMLColor < n>
n= 1 to 8
Print the color in html color code as you specified in the config store
You can specify up to a total of 8 colors in the config store screen.

Example:
#PrintHTMLColor 1

This will print the first color code as specifedto the html file

#PrintHTMLLink

Print the color of the link in html color code as specified in the config store.

#PrintHTMLText

Print the color of the text in html color code as specified in the config store

#PrintHTMLVLink

Print the color of the vlink in html color code as specified in the config store

 

We have retained version 2 template commands, which you can still use in customizing your stores.

Version 2 Template Commands

#CopyFile - copy a file from the template folder to the upload folder

Example: #CopyFile test.gif new.gif

This example copies test.gif in the template folder to new.gif in the upload folder.

#InsertTitle - insert the store name

#InsertFrontPage - insert the introduction or front page info html file

#InsertPreviousCatalog - insert the link to previous category

#InsertCartPage - insert the cart.html file name

#InsertKeywords - insert meta keywords into the html file

#InsertLogo - insert store logo image file, if there is no logo, it will print the store name

#InsertShopName - insert the store name

#InsertLogoFilename - insert the store logo file name only but not the html code

#InsertMenuLogo - insert the left menu logo or the store icon in html codes

#InsertSmallLogoFilename - insert the logo filename, no html code

#InsertTopMainPage - insert the top info

#InsertBottomMainPage - insert the footer info

#InsertCopyright - insert the copyright info

#InsertCategory - insert the entire category and category details

#InsertInfoPage - insert a link to the ordering info page

#InsertPaymentInfo - insert the payment info

#InsertShippingInfo - insert the shipping info

#InsertContactInfo - insert contact info of your company

#InsertCurCategoryTitle - insert the current category name, use in category.html

#InsertCurCategoryDesc - insert the current category descriptions

#InsertItems - syntax: #InsertItems <type> <color of text> <color of description>

type = 0,1,2 Insert items list, all items will be displayed.

#InsertItemsPageNumber - syntax: #InsertItemsPageNumber <type>

type = 0,1,2 Insert items page number if the category has more items than the maximum items (MaxItems) that you specified per page in the template *.ini file.

#InsertItemCategory - insert the name of the current item category

#InsertItemCategoryLink - insert the link of the current item category

#InsertItem - syntax: #InsertItem <type> <color of text> <color of description>

insert the item description, item order button and subfields

#SaveReturnPath - save the return path into memory, so that we can return to this page

#InsertViewCartLink - insert the link to the view cart

#InsertSearchFile - insert the link to the search file

<Step 4> <Template introduction> <Template Command List>