Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages | Examples

tx_commerce_basket_item Class Reference

List of all members.

Public Member Functions

 tx_commerce_basket_item ()
 init ($uid, $quantity, $priceid, $lang_id=0)
 change_quantity ($quantity)
 recalculate_item_sums ()
 calculate_net_sum ()
 calculate_gross_sum ()
 get_price_net ()
 getNoScalePriceGross ()
 getNoScalePriceNet ()
 setTitle ($title)
 getTitle ($type='article')
 getSubtitle ($type='article')
 setPriceNet ($value)
 get_price_gross ()
 setPriceGross ($value)
 get_tax ()
 getQuantity ()
 get_price_uid ()
 get_item_sum_net ($recalculate=false)
 get_item_sum_gross ($recalculate=false)
 get_item_sum_tax ($recalculate=false)
 getArticleTypeUid ()
 getOrderNumber ()
 getEanCode ()
 get_article_uid ()
 getArticleAssocArray ($prefix)
 getArticleObj ()
 get_article_assoc_array ($prefix='')
 getProductUid ()
 getProductMasterparentCategorie ()
 getProductAssocArray ($prefix)
 get_product_assoc_array ($prefix='')
 get_array_of_assoc_array ($prefix='')
 setTaxCalculationMethod ($priceFromNet)
 get_article_article_type_uid ()
 get_quantity ()
 setField ($field, $value)
 getField ($field)

Public Attributes

 $article = ''
 $product = ''
 $price = ''
 $quantity = 0
 $priceid = ''
 $item_net_sum = 0
 $item_gross_sum = 0
 $pricefromnet = 0
 $priceNet
 $priceGross
 $lang_id = 0

Detailed Description

Class for defining one Item in the basket


Constructor & Destructor Documentation

tx_commerce_basket_item::tx_commerce_basket_item  ) 
 

Call to $this->init

Parameters:
uid artcile UID
quantity amount for this article
lang_id Language ID


Member Function Documentation

tx_commerce_basket_item::calculate_gross_sum  ) 
 

Calculates the gross_sum

Returns:
integer gross_sum
Todo:
add hook for this function

tx_commerce_basket_item::calculate_net_sum  ) 
 

Calculates the net_sum

Returns:
integer net_sum
Todo:
add hook for this function

tx_commerce_basket_item::change_quantity quantity  ) 
 

Change the basket item quantity

Parameters:
quanitity 
Returns:
true public

tx_commerce_basket_item::get_array_of_assoc_array prefix = ''  ) 
 

gets an array of get_article_assoc_array and get_product_assoc_array

Parameters:
prefix Prefix for the keys or returnung array optional
Returns:
array

tx_commerce_basket_item::get_article_article_type_uid  ) 
 

gets the article Type uid

Returns:
integer article type uid

tx_commerce_basket_item::get_article_assoc_array prefix = ''  ) 
 

gets the article_assoc_array

Parameters:
prefix Prefix for the keys or returnung array optional
Returns:
array
See also:
tx_commerce_article <- tx_commerce_element_alib

tx_commerce_basket_item::get_article_uid  ) 
 

gets the uid from the article

Returns:
uid

tx_commerce_basket_item::get_item_sum_gross recalculate = false  ) 
 

retruns the item_sum_gross

Parameters:
recalculate if the sum shoudl be recalculated, defaul false
Returns:
item sum gross

tx_commerce_basket_item::get_item_sum_net recalculate = false  ) 
 

retruns the item_sum_net

Parameters:
recalculate if the sum should be recalculated, default false
Returns:
item sum net

tx_commerce_basket_item::get_item_sum_tax recalculate = false  ) 
 

retruns the absolut TAX

Parameters:
recalculate if the sum shoudl be recalculated, defaul false
Returns:
item sum gross

tx_commerce_basket_item::get_price_gross  ) 
 

gets the price_gross from thhe article

Returns:
price_gross

tx_commerce_basket_item::get_price_net  ) 
 

gets the price_net from thhe article

Returns:
price_net

tx_commerce_basket_item::get_price_uid  ) 
 

gets the uid from thhe article

Returns:
uid

tx_commerce_basket_item::get_product_assoc_array prefix = ''  ) 
 

gets the product_assoc_array

Parameters:
prefix Prefix for the keys or returnung array optional
Returns:
array
See also:
tx_commerce_product <- tx_commerce_element_alib

tx_commerce_basket_item::get_quantity  ) 
 

gets the quantity from thos item

Returns:
quantity

tx_commerce_basket_item::get_tax  ) 
 

gets the tax from the article

Returns:
percantage of tax

tx_commerce_basket_item::getArticleAssocArray prefix  ) 
 

returns the ArticleAssocArray

Returns:
array

tx_commerce_basket_item::getArticleObj  ) 
 

Returns the ArticleObject

Returns:
article object

tx_commerce_basket_item::getArticleTypeUid  ) 
 

gets the article type uid

Returns:
type of the article

tx_commerce_basket_item::getEanCode  ) 
 

return the Ordernumber of item

Returns:
Oredernumber of Articles

tx_commerce_basket_item::getField field  ) 
 

get a given field value, only to use with custom field without own method

Warning: commerce provides getMethods for all default fields. For Compatibility reasons always use the built in Methods. Only use this method with you own added fields

See also:
add_fields_to_fieldlist

add_field_to_fieldlist

Parameters:
string $field: fieldname
Returns:
mixed value of the field

tx_commerce_basket_item::getNoScalePriceGross  ) 
 

return the the gross price without the scale calculation

tx_commerce_basket_item::getNoScalePriceNet  ) 
 

return the the net price without the scale calculation

tx_commerce_basket_item::getOrderNumber  ) 
 

return the Ordernumber of item

Returns:
Oredernumber of Articles

tx_commerce_basket_item::getProductAssocArray prefix  ) 
 

returns the ArticleAssocArray

Returns:
array

tx_commerce_basket_item::getProductMasterparentCategorie  ) 
 

gets the master parent category

Returns:
category
See also:
producz

tx_commerce_basket_item::getProductUid  ) 
 

gets the uid from the product

Returns:
uid

tx_commerce_basket_item::getQuantity  ) 
 

gets the quantity from thos item

Returns:
quantity

tx_commerce_basket_item::getSubtitle type = 'article'  ) 
 

Gets the subtitle of the basket item

Parameters:
string type of subtitle, possible values arte article and product
Returns:
Subtitle of article (default) or product

tx_commerce_basket_item::getTitle type = 'article'  ) 
 

Gets the title

Parameters:
string type of title, possible values arte article and product
Returns:
title of article (default) or product

tx_commerce_basket_item::init uid,
quantity,
priceid,
lang_id = 0
 

Initialises the object, checks if given uid is valid and loads the the article an product data

Parameters:
uid artcile UID
quantity amount for this article
lang_id Language ID

tx_commerce_basket_item::recalculate_item_sums  ) 
 

recalculates the itm sums

tx_commerce_basket_item::setField field,
value
 

set a given field, only to use with custom field without own method

Warning: commerce provides getMethods for all default fields. For Compatibility reasons always use the built in Methods. Only use this method with you own added fields

See also:
add_fields_to_fieldlist

add_field_to_fieldlist

Parameters:
string $field: fieldname
mixed $value: value
Returns:
void

tx_commerce_basket_item::setPriceGross value  ) 
 

Sets pre gross price

Parameters:
new Price Value

tx_commerce_basket_item::setPriceNet value  ) 
 

Sets the net price

Parameters:
new Price Value

tx_commerce_basket_item::setTaxCalculationMethod priceFromNet  ) 
 

This Method Sets the Tax Calculation method (pricefromnet)

Parameters:
boolean Switch if calculationg from net or not
Returns:
void

tx_commerce_basket_item::setTitle title  ) 
 

Sets the Title

Parameters:
new Title


Member Data Documentation

tx_commerce_basket_item::$article = ''
 

object Article_object

See also:
tx_commerce_article public

tx_commerce_basket_item::$item_gross_sum = 0
 

item summe from gross_price private

tx_commerce_basket_item::$item_net_sum = 0
 

item summe from net_price private

tx_commerce_basket_item::$lang_id = 0
 

tx_commerce_basket_item::$price = ''
 

Object tx_commerce_article_price

See also:
tx_commerce_product private

tx_commerce_basket_item::$pricefromnet = 0
 

calculated price from net price private

tx_commerce_basket_item::$priceGross
 

tx_commerce_basket_item::$priceid = ''
 

integer priceid for this item private

tx_commerce_basket_item::$priceNet
 

tx_commerce_basket_item::$product = ''
 

Object tx_commerce_product

See also:
tx_commerce_product public

tx_commerce_basket_item::$quantity = 0
 

integer quantity for this article private


The documentation for this class was generated from the following file:
Generated on Sun Jan 13 23:12:17 2008 for tx_commerce by  doxygen 1.4.4