Class: Item
Properties
$items = array ()
The list of items in the cart. Keys are the sku's, values are
Item objects.
$tax = 1.0
The tax is a number that the prices are simply multiplied by,
so to assign 15% tax, you would set $tax to 1.15
$price_column = 'price'
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'.
$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.
$view_tpl = '<a href="{link}">View Cart</a>'
If you call the view_button () method, it uses this template
to generate a 'View Cart' link.
$checkout_tpl = '<a href="{link}">Check Out</a>'
If you call the checkout_button () method, it uses this
template to generate a 'Check Out' link.
$link = '/index'
This property is necessary in order to create a proper
'View Cart' or 'Check Out' link with the view_button () and
checkout_button () methods.
Return to Top
Methods
Return to Top