Static Public Member Functions | Public Attributes | Static Protected Member Functions

WebCart Class Reference

helper class wrapping Web Cart handling logic, the class wrapping the tables is WOWebCart in wext/webcart.php More...

List of all members.

Static Public Member Functions

static addTickets ()
 called from index.php - add tickets to cart
static addVoucher ()
 called from index.php - adds a voucher to the cart
static changeAddressPage ($mode)
static checkout ()
 renders the checkout page
static createCartOverview ()
 creates the cart overview
static createVoucherOverview ()
 creates an overview of known good voucher types
static getCart ()
 returns the current cart ID, or an empty string if there is no cart, automatically updates its timeout
static getNewCartId ()
static getOrCreateCart ()
 return existing cart or create a new one
static placeOrder ()
static removeItem ()
 called from index.php - removes tickets/vouchers from cart

Public Attributes

const cartIdName = "smoke_cartid"
 contains the name of the cookie and the HTTP parameter for the cart ID
const TicketAmountField = "amountTickets"
 contains the name for the web UI field that is supposed to contain the amount of tickets

Static Protected Member Functions

static cleanupDb ()
 clean up old carts
static findCart ()
 returns the current cart ID, or an empty string if there is no cart, does not update

Detailed Description

helper class wrapping Web Cart handling logic, the class wrapping the tables is WOWebCart in wext/webcart.php


Member Function Documentation

static WebCart::addTickets (  )  [static]
static WebCart::addVoucher (  )  [static]

called from index.php - adds a voucher to the cart

References $basevars, $HTTPARGS, WTrWebCartAddVoucher::execute(), getOrCreateCart(), and redirectHome().

static WebCart::changeAddressPage ( mode  )  [static]
static WebCart::checkout (  )  [static]

renders the checkout page

see the Checkout Variables Checkout Template page for details

References $basevars, $db, WOWebCartAbstract::fromTablecart(), getCart(), WTcart::getFromDB(), and redirectHome().

static WebCart::cleanupDb (  )  [static, protected]

clean up old carts

References $db.

Referenced by getCart().

static WebCart::createCartOverview (  )  [static]
static WebCart::createVoucherOverview (  )  [static]

creates an overview of known good voucher types

for templating info see Voucher Variables Voucher Variables and Base Variables Base Variables

References $basevars, and WTrGetValidVoucherPrices::execute().

static WebCart::findCart (  )  [static, protected]

returns the current cart ID, or an empty string if there is no cart, does not update

References $HTTPARGS, and WTcart::getFromDB().

Referenced by getCart().

static WebCart::getCart (  )  [static]

returns the current cart ID, or an empty string if there is no cart, automatically updates its timeout

References $CartTimeout, cleanupDb(), findCart(), and WTcart::getFromDB().

Referenced by changeAddressPage(), WOCustomer::checkLogin(), checkout(), createCartOverview(), getOrCreateCart(), WOCustomer::loginPage(), placeOrder(), and WOCustomer::registerCustomer().

static WebCart::getNewCartId (  )  [static]

References getCode39ID(), and WTcart::getFromDB().

Referenced by WTcart::newKey().

static WebCart::getOrCreateCart (  )  [static]

return existing cart or create a new one

References $CartTimeout, $WebDefaultShipping, getCart(), and WTcart::newRow().

Referenced by addTickets(), addVoucher(), and removeItem().

static WebCart::placeOrder (  )  [static]
static WebCart::removeItem (  )  [static]

Member Data Documentation

const WebCart::cartIdName = "smoke_cartid"

contains the name of the cookie and the HTTP parameter for the cart ID

const WebCart::TicketAmountField = "amountTickets"

contains the name for the web UI field that is supposed to contain the amount of tickets

Referenced by WOEventPrice::getAmountinputfield().


The documentation for this class was generated from the following file: