User Guide | Cart

The structure of the cart comprises of three main groups of data, the data of items in the cart, the summary totals of the cart and then the configuration and localisation settings of the cart.

Below is a compiled list of functions related to cart session data.

User Guide Sections

Get Cart Item Session Data | Get Cart Summary Session Data | Get Cart Session Data | Set Cart Session Data

Getting Cart / Summary Data

Get cart and summary data from the cart session.
Cart Data
  • cart_status()
    Returns whether any items exist in the cart.
  • cart_array()
    Returns cart session array of the entire cart, unformatted.
  • cart_contents()
    Returns cart item and summary data, formatted by function parameters.

Summary Data

Summary Totals

Discount / Voucher / Surcharge Totals

Misc. Totals

Database / Helper Functions
  • get_expire_time()
    Returns the number of seconds until a submitted date, for the purpose of a generating a countdown timer.
  • get_date_time()
    Returns either an SQL DATETIME formatted time stamp or a UNIX timestamp.
  • get_weight_types()
    Returns either an array of a specific weight types data or a multi-dimensional array all weight types and their data.
  • weight_name()
    Returns the name of the carts default weight type.
  • weight_symbol()
    Returns the symbol of the carts default weight type.
  • convert_weight()
    Returns a weight converted from one weight type to another.
  • format_weight()
    Returns a submitted value as a formatted weight.
  • db_table()
    Returns the actual name of a table defined in the config file by referencing the tables internal name.
  • db_column()
    Returns the actual name of a table column defined in the config file by referencing the table columns internal name.

Getting Cart Item Data

Get cart item data from the cart session.
Item Data
  • row_id_exists()
    Returns whether a specific cart row exists.
  • cart_items()
    Returns entire cart item data, formatted by function parameters.
  • cart_item_row()
    Returns a specific cart item row, formatted by function parameters.
  • cart_item_array()
    Returns the cart session array of the entire cart item data, unformatted.

Required Item Columns

Item Tax

Item Shipping

Item Stock

Item Options

Item Reward Points

Item Weight

Item Discount Values

Item Status Messages

Misc.
  • get_item_column()
    Returns any set column name including user defined data for a specific cart row.

Item Admin Data

Setting Data / Messages

Set and alter data within the cart session.
Insert Items / Update Cart

Misc.

Messages