PHP 클래스 TI_Cart, TastyIgniter

상속: extends CI_Cart
파일 보기 프로젝트 열기: tastyigniter/tastyigniter

공개 프로퍼티들

프로퍼티 타입 설명
$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

보호된 프로퍼티들

프로퍼티 타입 설명
$_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