Class: Item



Properties


$items = array ()

  • Access: public

The list of items in the cart. Keys are the sku's, values are
Item objects.


$tax = 1.0

  • Access: public

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'

  • Access: public

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 = ''

  • Access: public

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>'

  • Access: public

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>'

  • Access: public

If you call the checkout_button () method, it uses this
template to generate a 'Check Out' link.


$link = '/index'

  • Access: public

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

Copyright © 2008 Sitellite CMS Project

Powered by Sitellite 5.0 Content Management System