MagicSmoke  $VERSION$
WebCart Class Reference

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

Static Public Member Functions

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

Public Attributes

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

Static Protected Member Functions

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

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::addCoupon ( )
static

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

References $basevars, $HTTPARGS, and WTrWebCartAddCoupon\execute().

static WebCart::addTickets ( )
static
static WebCart::addVoucher ( )
static

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

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

static WebCart::checkout ( )
static

renders the checkout page

see the Checkout Variables Checkout Template page for details

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

static WebCart::cleanupDb ( )
staticprotected

clean up old carts

References $db.

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 ( )
staticprotected

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

References $HTTPARGS, and WTcart\getFromDB().

static WebCart::getCart ( )
static

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

References $CartTimeout, and WTcart\getFromDB().

Referenced by WOCustomer\checkLogin(), WOCustomer\loginPage(), 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, and WTcart\newRow().

Member Data Documentation

const WebCart::cartIdName = "smoke_cartid"

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

Referenced by BaseVars\initCartAndUserData().

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: