Element index for package Cart
[ a ]
[ c ]
[ e ]
[ i ]
[ l ]
[ p ]
[ r ]
[ s ]
[ t ]
[ v ]
a
- add_item
- in file Cart.php, method Cart::add_item()
Adds an item to the cart.
- add_tax
- in file Cart.php, method Cart::add_tax()
Returns the total of the prices, plus taxes.
top
c
- $checkout_tpl
- in file Cart.php, variable Cart::$checkout_tpl
If you call the checkout_button () method, it uses this template to generate a 'Check Out' link.
- $customer_id
- in file Cart.php, variable Cart::$customer_id
To identify a customer, we assign them a $customer_id. This can be generated randomly, set to be some other identifying value, such as the $session object's id property, or whatever you want.
- Cart
- in file Cart.php, class Cart
- Cart
- in file Cart.php, method Cart::Cart()
Constructor method.
- Cart.php
- procedural page Cart.php
- checkout
- in file Cart.php, method Cart::checkout()
Empty method - to be defined when subclassed. Check the person out, we have led them to buy.
- checkout_button
- in file Cart.php, method Cart::checkout_button()
Generates a 'Check Out' button.
top
e
- error
- in file Cart.php, method Cart::error()
Empty method - to be defined when subclassed. Report something gone wrong.
top
i
- $items
- in file Cart.php, variable Cart::$items
The list of items in the cart. Keys are the sku's, values are Item objects.
- Item
- in file Cart.php, class Item
Cart provides a basic set of functions to create a shopping cart
top
l
- $link
- in file Cart.php, variable Cart::$link
This property is necessary in order to create a proper 'View Cart' or 'Check Out' link with the view_button () and checkout_button () methods.
top
p
- $price_column
- in file Cart.php, variable Cart::$price_column
In order to calculate subtotals and totals, Cart needs to know which property of Item contains the prices of the items. This defaults to 'price'.
top
r
- retrieve
- in file Cart.php, method Cart::retrieve()
Empty method - to be defined when subclassed. Retrive the cart from wherever it was stored before.
top
s
- save
- in file Cart.php, method Cart::save()
Empty method - to be defined when subclassed. Save the cart for later, without purchasing anything. Sort of a 'save as wishlist' option.
- store
- in file Cart.php, method Cart::store()
Empty method - to be defined when subclassed. Store the cart somewhere for another script to retrive it.
- subtotal
- in file Cart.php, method Cart::subtotal()
Adds up all of the prices of the items, not including taxes.
top
t
- $tax
- in file Cart.php, variable Cart::$tax
The tax is a number that the prices are simply multiplied by, so to assign 15% tax, you would set $tax to 1.15
- total_items
- in file Cart.php, method Cart::total_items()
Returns the number of items in the cart.
top
v
- $view_tpl
- in file Cart.php, variable Cart::$view_tpl
If you call the view_button () method, it uses this template to generate a 'View Cart' link.
- valid
- in file Cart.php, method Cart::valid()
Empty method - to be defined when subclassed. Check if the information (contact, credit cart, whatever) provided is valid.
- view_button
- in file Cart.php, method Cart::view_button()
Generates a 'View Cart' button. Requires a global $simple SimpleTemplate object.
top
|
|