Variables to Store Data

Passing data to the database engine, and retrieving data from it, is handled using variables that you define in your HTML pages. Simply put the field name in an HTML comment, and the Transact e-commerce engine will replace it with the data you indicated. Here is list of the types of variables, and the ways to retrieve them:

Type of Information Usage
User Information <!-- SESSION: Variable -->
Shopping Cart Information <!-- CART: Variable -->
Purchase Information <!-- PURCHASE: Variable -->
Store Configuration <!-- CONFIG: Variable -->

And for Product definitions...
Product Information <!-- PRODUCT: Variable -->
List Information <!-- LIST: Variable -->
GROUP Information <!-- GROUP: Variable -->

And for passing information from screen to screen.
Form-supplied Values <!-- INPUT: Variable -->

Variable Calculations

The Transact e-commerce engine can perform basic math functions on variables. The addition + subtraction - multiplication * division / and mod (remainder) % operators are supported. This is pretty advanced stuff that may not work as expected - be careful!

ObjectiveExample Code
Combined shipping and handling cost: <!-- CALCULATE "<!-- CART: Total_Shipping_Price -->" + "<!-- CART: Handling_Charge -->" -->
Make suggestions to the user: Only $<!-- CALCULATE "<!-- CART: Total_Price -->" % "100" -->
to a larger discount!
With your purchase,
$<!-- CALCULATE "<!-- CART: Total_Price -->" * "0.02" -->
will be donated to charity!
Customized handling charge:
Uses negative discounts
<!-- CALCULATE "<!-- CART: Handling_Charge -->" + "<!-- CART: Discount -->" -->

Special Variables

These are some special variables you can and should reference in your pages.
CONFIG: Reference_Page Contains the name of the page from the previous screen. If this is unavailable for some reason, the HTTP REFERER information may be supplied here as a backup.

Custom Variables

You can pass custom variables from screen to screen. They work the same as the standard variables, they just don't get saved in the database. Simply specify them as part of the form, and then reference them in the followup screen.

For example, put this in one screen..

<INPUT name="My_Custom_Variable" value="Enter a Value">
And this in the next...
You told me this: <!-- INPUT: My_Custom_Variable -->
Main Menu Next Page