Base Variables
There are some variables available for all templates.
- Parameters
-
script.* | variables contain URLs for different modes of the web site:
script.root | root URL for the index.php script |
script.this | the URL of the currently called script mode |
script.index | URL of the list index |
script.eventDetails | URL for event detail pages, append the event ID to it to complete it |
script.eventOrder | URL for ordering tickets for a specific event, arguments are expected as POST or GET parameters |
script.vouchers | URL for listing vouchers |
script.voucherOrder | URL for ordering vouchers, arguments are expected as POST or GET parameters |
script.removeItem | URL for removing tickets/vouchers/items from the cart, arguments are expected as POST or GET parameters |
script.shop | URL for listing shop items |
script.cart | URL of the cart, the cart must exist when calling it, otherwise a cookie error will be displayed |
script.mycart | URL of the cart that transparently creates the cart if it does not exist yet |
script.checkout | URL to check out the cart |
script.setlanguage | URL for setting the language cookie, add the language code to it to complete it |
|
inputnames.* | variables contain names for specific form input elements:
inputnames.amountTickets | amount of tickets to be ordered |
inputnames.event | contains the event ID |
inputnames.mode | contains the display mode |
inputnames.cartid | ID of the cart of the current customer, usually the cart cookie is used instead |
|
cartcookie | variable contains the name of the cookie that contains the cart ID. |
lang | variable is an object of type LanguageManager - it represents translations done for the language the user has chosen. |
- Parameters
-
sessionid | contains the ID of the current session as it is stored in a cookie and the session table. |
user.* | contains basic data about the web user.
user.name | the (family) name of the user |
user.firstname | the first name of the user |
user.title | the title of the user |
user.email | the e-mail and login name of the user |
|
error.html
This template is used whenever an error occurs during processing.
- Parameters
-
ErrorText | the text to be shown for an error |
ErrorTrace | a full ASCII version of an exception trace. This is only filled if the $WebShowErrors option is set to true in the config.php file. |
Cart Variables
The cart.html template is used to render the current cart of the customer.
- Parameters
-
cart | an object of the web type WebCart (PHP: WOWebCart) that represents the entire cart of the user. |
shipping | and array of web objects of type Shipping (PHP: WOShipping) which represent all available shipping types that customers can chose from. |
forceshipping | a boolean that contains whether customers must chose a shipping type. |
Cart Extensions
Some of the sub-objects of cart have extended attributes in addition to those generated by Wob:
- Parameters
-
cart.isempty | true if the cart is empty |
cart.totalsum | the complete sum of all prices in the cart |
cart.tickets[...].eventprice.* | |
*.amountInputField | name of the input field of a form that should contain the amount of tickets for ordering, see the example on how to use it |
*.categoryIdWeb | part of the URL query that represents this category, used for removing tickets from the cart, see the example on how to use it |
Voucher Variables
The voucher.html template is used to render the voucher selection form.
- Parameters
-
voucherprices | contains an array of valid voucher prices. |
Cart Error Variables
The carterror.html template is used to when the cart expired or the customers browser lost the cookie.
Just the Base Variables Base Variables are available.
Checkout Variables
The checkout.html template is used to render the current cart of the customer.
- Parameters
-
cart | an object of the web type WebCart (PHP: WOWebCart) that represents the entire cart of the user. |
Event List
The index.html template is used to render the list of events available to customers.
- Parameters
-
events | an array of the events available, starting at the current time, ordered by time; the events are of web object type Event (PHP: WOEvent) |
Event Details
The eventdetails.html template is used to render a single event and to offer the user to buy tickets for it.
- Parameters
-
event | the event being rendered; the event is of web object type Event (PHP: WOEvent) |
Login Page
The login.html template is used to render the customer login and registration page.
- Parameters
-
script.customerLogin | the page to call for logging in |
script.customerRegistration | the page to call for registering a new customer |
customer_name | the name (mail) of the customer (or an empty string if unknown) |
Login Error
The loginerror.html template is used to render customer login and registering errors.
- Parameters
-
errorType | the type of error: "login" - the login failed (wrong mail or password), "exist" - an account with the same mail already exists, "mismatch" - the new passwords do no match, "create" for unspecified errors during creation of the new account (e.g. missing or invalid parameters) |
backUrl | the URL to call back to the login page |