PHP Класс TI_Cart, TastyIgniter

Наследование: extends CI_Cart
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$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

Защищенные свойства (Protected)

Свойство Тип Описание
$_cart_totals

Открытые методы

Метод Описание
__construct ( $params = [] )
add_coupon ( array $coupon = [] ) : boolean Add Coupon *** TASTYIGNITER
add_total ( array $total = [] ) : integer Add additional cart total
calculate_tax ( ) : float Calculate tax if enabled
contents ( boolean $newest_first = FALSE ) : integer Cart Contents *** TASTYIGNITER
coupon ( ) : integer Coupon Amount *** TASTYIGNITER
coupon_code ( ) : integer Coupon Code *** TASTYIGNITER
coupon_discount ( ) : integer Coupon Discount *** TASTYIGNITER
delivery ( ) : integer Delivery Charge *** TASTYIGNITER
destroy ( ) : void Destroy the cart
get_item_by_id ( string $id ) : array Get cart item by id
get_total ( string $total_name = '' ) : array Get cart total
order_total ( ) : integer Order Total *** TASTYIGNITER
product_options_ids ( $row_id )
product_options_string ( $row_id, $split = '<br />' ) --------------------------------------------------------------------
remove_coupon ( string $coupon_code = '' ) : boolean Remove Coupon *** TASTYIGNITER
remove_total ( string $total_name = '' ) : boolean Remove Total
set_delivery ( integer $charge ) : boolean Set Delivery Charge *** TASTYIGNITER
tax_amount ( ) : integer Get Taxes Amount
tax_array ( ) : integer Get Taxes
tax_percent ( ) : integer Get Taxes Percentage
tax_title ( ) : integer Get Taxes Title
total_items ( ) : integer Total Items
totals ( ) : integer Get Cart Totals

Защищенные методы

Метод Описание
_save_cart ( ) : boolean Save the cart array to the session DB

Описание методов

__construct() публичный Метод

public __construct ( $params = [] )

_save_cart() защищенный Метод

Save the cart array to the session DB
protected _save_cart ( ) : boolean
Результат boolean

add_coupon() публичный Метод

This function permits calculates the coupon coupon from code.
public add_coupon ( array $coupon = [] ) : boolean
$coupon array
Результат boolean

add_total() публичный Метод

This function adds new total to cart totals.
public add_total ( array $total = [] ) : integer
$total array
Результат integer

calculate_tax() публичный Метод

Calculate tax if enabled
public calculate_tax ( ) : float
Результат float

contents() публичный Метод

Cart Contents *** TASTYIGNITER
public contents ( boolean $newest_first = FALSE ) : integer
$newest_first boolean
Результат integer

coupon() публичный Метод

Returns coupon
public coupon ( ) : integer
Результат integer

coupon_code() публичный Метод

Returns the coupon code
public coupon_code ( ) : integer
Результат integer

coupon_discount() публичный Метод

Returns coupon discount
public coupon_discount ( ) : integer
Результат integer

delivery() публичный Метод

Returns the delivery charge amount
public delivery ( ) : integer
Результат integer

destroy() публичный Метод

Empties the cart and kills the session
public destroy ( ) : void
Результат void

get_item_by_id() публичный Метод

Returns the details of a specific item in the cart
public get_item_by_id ( string $id ) : array
$id string
Результат array

get_total() публичный Метод

Returns the total from the cart totals array
public get_total ( string $total_name = '' ) : array
$total_name string
Результат array

order_total() публичный Метод

Order Total *** TASTYIGNITER
public order_total ( ) : integer
Результат integer

product_options_ids() публичный Метод

public product_options_ids ( $row_id )

product_options_string() публичный Метод

--------------------------------------------------------------------
public product_options_string ( $row_id, $split = '<br />' )

remove_coupon() публичный Метод

This function removes coupon from cart.
public remove_coupon ( string $coupon_code = '' ) : boolean
$coupon_code string
Результат boolean

remove_total() публичный Метод

This function removes total from totals.
public remove_total ( string $total_name = '' ) : boolean
$total_name string
Результат boolean

set_delivery() публичный Метод

This function permits calculates the delivery charge.
public set_delivery ( integer $charge ) : boolean
$charge integer
Результат boolean

tax_amount() публичный Метод

Returns the taxes amount
public tax_amount ( ) : integer
Результат integer

tax_array() публичный Метод

Returns taxes array
public tax_array ( ) : integer
Результат integer

tax_percent() публичный Метод

Returns the taxes percentage
public tax_percent ( ) : integer
Результат integer

tax_title() публичный Метод

Returns the taxes title
public tax_title ( ) : integer
Результат integer

total_items() публичный Метод

Returns the total item count
public total_items ( ) : integer
Результат integer

totals() публичный Метод

Returns the cart totals array
public totals ( ) : integer
Результат integer

Описание свойств

$_cart_totals защищенное свойство

protected $_cart_totals

$product_name_rules публичное свойство

These are the regular expression rules that we use to validate the product ID and product name alpha-numeric, dashes, underscores, colons or periods
public string $product_name_rules
Результат string