Property | Type | Description | |
---|---|---|---|
$product_id_rules | string | These are the regular expression rules that we use to validate the product ID and product name alpha-numeric, dashes, underscores, or periods | |
$product_name_rules | string | These are the regular expression rules that we use to validate the product ID and product name alpha-numeric, dashes, underscores, colons or periods | |
$product_name_safe | boolean | only allow safe product names |
Property | Type | Description | |
---|---|---|---|
$CI | object | Reference to CodeIgniter instance | |
$_cart_contents | array | Contents of the cart |
Method | Description | |
---|---|---|
__construct ( $params = [] ) : void | Shopping Class Constructor | |
contents ( $newest_first = FALSE ) : array | Cart Contents | |
destroy ( ) : void | Destroy the cart | |
format_number ( $n = '' ) : string | Format Number | |
get_item ( string $row_id ) : array | Get cart item | |
has_options ( string $row_id = '' ) : boolean | Has options | |
insert ( $items = [] ) : boolean | Insert items into the cart and save it to the session table | |
product_options ( string $row_id = '' ) : array | Product options | |
remove ( $rowid ) : boolean | Remove Item | |
total ( ) : integer | Cart Total | |
total_items ( ) : integer | Total Items | |
update ( $items = [] ) : boolean | Update the cart |
Method | Description | |
---|---|---|
_insert ( $items = [] ) : boolean | Insert | |
_save_cart ( ) : boolean | Save the cart array to the session DB | |
_update ( $items = [] ) : boolean | Update the cart |
public __construct ( $params = [] ) : void | ||
return | void |
protected _save_cart ( ) : boolean | ||
return | boolean |
public format_number ( $n = '' ) : string | ||
return | string |
public has_options ( string $row_id = '' ) : boolean | ||
$row_id | string | = '' |
return | boolean |
public product_options ( string $row_id = '' ) : array | ||
$row_id | string | = '' |
return | array |
public total_items ( ) : integer | ||
return | integer |
protected array $_cart_contents | ||
return | array |
public string $product_id_rules | ||
return | string |
public string $product_name_rules | ||
return | string |
public bool $product_name_safe | ||
return | boolean |