Template Locations

Templates are located in the privdata/Transact/Templates/ directory. The default files are named
product.html.en Default template for single product display.
list.html.en Default template for product lists.
group.html.en Default template for product builder.
You can modify these templates, add new templates (remember to keep the .en extension), or add translations of the templates in another language (.es .de .fr .jp etc) Any new template added here will immediately become selectable within the Transact e-commerce Product Center tool.

Customizing Templates

Users will make purchases by adding items to their shopping cart, and then purchasing the cart. The actual database interaction is invisible; simply define an HTML form for each item, and use the following form variables.

Product Templates

To add an item to the shopping cart, the following form elements should be defined.
Variable Name Required? Purpose
Product_PartNumber X The part number used to identify a product in the store. You should include this with every product:
<INPUT type=HIDDEN name="Product_PartNumber" value="ThermoRecycler">
Product_Description X A description of item.
Product_Quantity X The number of this item to purchase
Product_Price X The price of the item. This should be numeric only (####.##) - no $ or other currency signs.
Product_Price - - Alternate syntax for quantity-based pricing. (Quantity@Price)
Product_ShippingPrice   How much you will charge to ship the item.
Product_Class   This field defines which Class of product this is, defining the taxes and handling charges appropriate for this product.
Product_Expires   Either a date ( MM/DD/YYYY ) or a number of days until this price is no longer valid. After this time, the item will no longer appear in the person's shopping cart.
This field will default to 90 days if not supplied. It cannot be disabled (ie, don't use 0).
Action X Must be Add Item to add an item to the shopping cart.

Extra Product Info

To store additional, customized information about products, simply name the form elements "Product_something". When the item is stored in the database, both the field name and the value are stored in the database along with the item. There is no requirement that items share the same custom values. One item could store a color (using Product_Color), while another item can store Product_Size.

Color: <SELECT name="Product_Color">
<OPTION> blue
<OPTION> red
</SELECT>

Multiple Products in a Single Submission

To put multiple products in a single form, simply rename the above listed form variables to include a digit after Product_, like so:
This example uses the combined Quantity/Price syntax described above.

<INPUT type=HIDDEN name="Product_01_PartNumber" value="Radio">
<INPUT type=HIDDEN name="Product_01_Description" value="Kid-Cool Radio!">
How many toy cars would you like? <SELECT name="Product_01_Price">
<OPTION value="0@0"> 0
<OPTION value="1@2.99"> 1 for $2.99
<OPTION value="2@4.99"> 2 for $4.99
</SELECT>

<INPUT type=HIDDEN name="Product_02_PartNumber" value="Toy Car">
...etc

It is very important that the default quantity be 0 on multiple-item forms, or people will inadvertently add items they never wanted to their cart.

Main Menu Next Page