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 --> |
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!
| Objective | Example 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" --> |
With your purchase, |
|
| Customized handling charge: Uses negative discounts |
<!-- CALCULATE "<!-- CART: Handling_Charge -->" + "<!-- CART: Discount -->" --> |
| 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. |
|---|
For example, put this in one screen..
And this in the next...<INPUT name="My_Custom_Variable" value="Enter a Value">
You told me this: <!-- INPUT: My_Custom_Variable -->