Свойство | Тип | Описание | |
---|---|---|---|
$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 |
Свойство | Тип | Описание | |
---|---|---|---|
$CI | object | Reference to CodeIgniter instance | |
$_cart_contents | array | Contents of the cart |
Метод | Описание | |
---|---|---|
__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 |
Метод | Описание | |
---|---|---|
_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 | ||
Результат | void |
protected _save_cart ( ) : boolean | ||
Результат | boolean |
public format_number ( $n = '' ) : string | ||
Результат | string |
public has_options ( string $row_id = '' ) : boolean | ||
$row_id | string | = '' |
Результат | boolean |
public product_options ( string $row_id = '' ) : array | ||
$row_id | string | = '' |
Результат | array |
public total_items ( ) : integer | ||
Результат | integer |
protected array $_cart_contents | ||
Результат | array |
public string $product_id_rules | ||
Результат | string |
public string $product_name_rules | ||
Результат | string |
public bool $product_name_safe | ||
Результат | boolean |