PHP Class TI_Cart, TastyIgniter

Inheritance: extends CI_Cart
Afficher le fichier Open project: tastyigniter/tastyigniter

Méthodes publiques

Свойство Type Description
$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 Properties

Свойство Type Description
$_cart_totals

Méthodes publiques

Méthode Description
__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

Méthodes protégées

Méthode Description
_save_cart ( ) : boolean Save the cart array to the session DB

Method Details

__construct() public méthode

public __construct ( $params = [] )

_save_cart() protected méthode

Save the cart array to the session DB
protected _save_cart ( ) : boolean
Résultat boolean

add_coupon() public méthode

This function permits calculates the coupon coupon from code.
public add_coupon ( array $coupon = [] ) : boolean
$coupon array
Résultat boolean

add_total() public méthode

This function adds new total to cart totals.
public add_total ( array $total = [] ) : integer
$total array
Résultat integer

calculate_tax() public méthode

Calculate tax if enabled
public calculate_tax ( ) : float
Résultat float

contents() public méthode

Cart Contents *** TASTYIGNITER
public contents ( boolean $newest_first = FALSE ) : integer
$newest_first boolean
Résultat integer

coupon() public méthode

Returns coupon
public coupon ( ) : integer
Résultat integer

coupon_code() public méthode

Returns the coupon code
public coupon_code ( ) : integer
Résultat integer

coupon_discount() public méthode

Returns coupon discount
public coupon_discount ( ) : integer
Résultat integer

delivery() public méthode

Returns the delivery charge amount
public delivery ( ) : integer
Résultat integer

destroy() public méthode

Empties the cart and kills the session
public destroy ( ) : void
Résultat void

get_item_by_id() public méthode

Returns the details of a specific item in the cart
public get_item_by_id ( string $id ) : array
$id string
Résultat array

get_total() public méthode

Returns the total from the cart totals array
public get_total ( string $total_name = '' ) : array
$total_name string
Résultat array

order_total() public méthode

Order Total *** TASTYIGNITER
public order_total ( ) : integer
Résultat integer

product_options_ids() public méthode

public product_options_ids ( $row_id )

product_options_string() public méthode

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

remove_coupon() public méthode

This function removes coupon from cart.
public remove_coupon ( string $coupon_code = '' ) : boolean
$coupon_code string
Résultat boolean

remove_total() public méthode

This function removes total from totals.
public remove_total ( string $total_name = '' ) : boolean
$total_name string
Résultat boolean

set_delivery() public méthode

This function permits calculates the delivery charge.
public set_delivery ( integer $charge ) : boolean
$charge integer
Résultat boolean

tax_amount() public méthode

Returns the taxes amount
public tax_amount ( ) : integer
Résultat integer

tax_array() public méthode

Returns taxes array
public tax_array ( ) : integer
Résultat integer

tax_percent() public méthode

Returns the taxes percentage
public tax_percent ( ) : integer
Résultat integer

tax_title() public méthode

Returns the taxes title
public tax_title ( ) : integer
Résultat integer

total_items() public méthode

Returns the total item count
public total_items ( ) : integer
Résultat integer

totals() public méthode

Returns the cart totals array
public totals ( ) : integer
Résultat integer

Property Details

$_cart_totals protected_oe property

protected $_cart_totals

$product_name_rules public_oe property

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
Résultat string