If you want more control over how your products are displayed in shopdisplayproducts.asp, it is possible to replace the default formatting of products with your own unique HTML using templates. A template can be created using your favorite editor and is simply plain HTML with the addition of some special syntax that tells VPCART where it needs to fill in information from the database.
To use templates, you need to change the first Software Configuration value.
xproductwithHTML |
Settingthis to Yes switches to template mode |
xproductdisplaytemplate |
This is the folder
and name of the template to use. The default is
tmp_productformat.htm only |
Any field in the products table can be placed into your template. The field must be surrounded by square brackets, as shown in the following example.
Note: Adding a $ symbol at the very start of the line in a template tells VPCART not to display anything on that line if there is nothing in that field.
For example:
<p align=center>
<a href="shopexd.asp?id=[catalogid]">
$ <img border="0" src="[cimageurl]"></a>
<br /><a href="shopexd.asp?id=[catalogid]">Click here</a>
</p>
You can call any field from the Products table in the database in your product template. For a full list of these fields, see page220.