CI_Config::set_item()

set_item($item, $value) Parameters: $item (string) – Config item name $value (string) – Config item value Return type: void Sets a config file item to the specified value.

CI_Config::base_url()

base_url() Returns: Base URL Return type: string This method retrieves the URL to your site, plus an optional path such as to a stylesheet or image. This method is normally accessed via the corresponding functions in the URL Helper.

CI_Config

class CI_Config $config Array of all loaded config values $is_loaded Array of all loaded config files item($item[, $index='']) Parameters: $item (string) – Config item name $index (string) – Index name Returns: Config item value or NULL if not found Return type: mixed Fetch a config file item. set_item($item, $value) Parameters: $item (string) – Config item name $value (string) – Config item value Return type: void Sets a config file item to the specified v

CI_Config::load()

load([$file = ''[, $use_sections = FALSE[, $fail_gracefully = FALSE]]]) Parameters: $file (string) – Configuration file name $use_sections (bool) – Whether config values shoud be loaded into their own section (index of the main config array) $fail_gracefully (bool) – Whether to return FALSE or to display an error message Returns: TRUE on success, FALSE on failure Return type: bool Loads a configuration file.

CI_Cart::update()

update([$items = array()]) Parameters: $items (array) – Items to update in the cart Returns: TRUE on success, FALSE on failure Return type: bool This method permits changing the properties of a given item. Typically it is called from the “view cart” page if a user makes changes to the quantity before checkout. That array must contain the rowid for each item.

CI_Cart::insert()

insert([$items = array()]) Parameters: $items (array) – Items to insert into the cart Returns: TRUE on success, FALSE on failure Return type: bool Insert items into the cart and save it to the session table. Returns TRUE on success and FALSE on failure.

CI_Cart::get_item()

get_item($row_id) Parameters: $row_id (int) – Row ID to retrieve Returns: Array of item data Return type: array Returns an array containing data for the item matching the specified row ID, or FALSE if no such item exists.

CI_Cart::remove()

remove($rowid) Parameters: $rowid (int) – ID of the item to remove from the cart Returns: TRUE on success, FALSE on failure Return type: bool Allows you to remove an item from the shopping cart by passing it the $rowid.

CI_Cart::total_items()

total_items() Returns: Total amount of items in the cart Return type: int Displays the total number of items in the cart.

CI_Cart::product_options()

product_options([$row_id = '']) Parameters: $row_id (int) – Row ID Returns: Array of product options Return type: array Returns an array of options for a particular product. This method is designed to be used in a loop with contents(), since you must pass the rowid to this method, as shown in the Displaying the Cart example above.