MagicSmoke  $VERSION$
Templates

Base Variables

There are some variables available for all templates.

Parameters
script.*variables contain URLs for different modes of the web site:
script.rootroot URL for the index.php script
script.thisthe URL of the currently called script mode
script.indexURL of the list index
script.eventDetailsURL for event detail pages, append the event ID to it to complete it
script.eventOrderURL for ordering tickets for a specific event, arguments are expected as POST or GET parameters
script.vouchersURL for listing vouchers
script.voucherOrderURL for ordering vouchers, arguments are expected as POST or GET parameters
script.removeItemURL for removing tickets/vouchers/items from the cart, arguments are expected as POST or GET parameters
script.shopURL for listing shop items
script.cartURL of the cart, the cart must exist when calling it, otherwise a cookie error will be displayed
script.mycartURL of the cart that transparently creates the cart if it does not exist yet
script.checkoutURL to check out the cart
script.setlanguageURL for setting the language cookie, add the language code to it to complete it
inputnames.*variables contain names for specific form input elements:
inputnames.amountTicketsamount of tickets to be ordered
inputnames.eventcontains the event ID
inputnames.modecontains the display mode
inputnames.cartidID of the cart of the current customer, usually the cart cookie is used instead
cartcookievariable contains the name of the cookie that contains the cart ID.
langvariable is an object of type LanguageManager - it represents translations done for the language the user has chosen.
Parameters
sessionidcontains 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.namethe (family) name of the user
user.firstnamethe first name of the user
user.titlethe title of the user
user.emailthe e-mail and login name of the user

error.html

This template is used whenever an error occurs during processing.

Parameters
ErrorTextthe text to be shown for an error
ErrorTracea 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
cartan object of the web type WebCart (PHP: WOWebCart) that represents the entire cart of the user.
shippingand array of web objects of type Shipping (PHP: WOShipping) which represent all available shipping types that customers can chose from.
forceshippinga 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.isemptytrue if the cart is empty
cart.totalsumthe complete sum of all prices in the cart
cart.tickets[...].eventprice.*
*.amountInputFieldname of the input field of a form that should contain the amount of tickets for ordering, see the example on how to use it
*.categoryIdWebpart 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
voucherpricescontains 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
cartan 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
eventsan 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
eventthe 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.customerLoginthe page to call for logging in
script.customerRegistrationthe page to call for registering a new customer
customer_namethe 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
errorTypethe 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)
backUrlthe URL to call back to the login page