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

tx_commerce_basic_basket Class Reference

Inheritance diagram for tx_commerce_basic_basket:

tx_commerce_basket List of all members.

Public Member Functions

 tx_commerce_basket ()
 add_article ($article_uid, $quantity=1, $priceid='')
 changePrices ($article_uid, $new_price_gross, $new_price_net)
 changeTitle ($article_uid, $newtitle)
 change_quantity ($article_uid, $quantity=1)
 delete_article ($article_uid)
 delete_all_articles ()
 getItemsCount ()
 recalculate_sums ()
 get_gross_sum ($again=true)
 get_net_sum ()
 get_assoc_arrays ($prefix='')
 get_articles_by_article_type_uid_asUidlist ($article_type_uid)
 getArticleTypeCount ($article_type_uid)
 getArticleTypeCountFromList ($articleTypes)
 getArticleTypeSumNet ($article_type_uid)
 getArticleTypeSumGross ($article_type_uid)
 getFirstArticleTypeTitle ($article_type_uid)
 getFirstArticleTypeDescription ($article_type_uid)
 getTaxSum ()
 getTaxRateSums ()
 hasArticles ()
 getBasketHashValue ()
 setTaxCalculationMethod ($priceFromNet)
 setReadOnly ()
 isReadOnly ()
 isChangeable ()
 releaseReadOnly ()

Public Attributes

 $basket_items = array()
 $basket_sum_net = 0
 $basket_sum_gross = 0
 $pricefromnet = 0
 $items = 0
 $crdate = 0
 $readOnly = false

Detailed Description

Abstract libary for Basket Handling. This class should not be used directly, instead use tx_commerce_basket. Do not acces class variables directly, allways use the get and set methods, variables will be changed in php5 to private

Author:
Ingo Schmitt <is@marketing-factory.de>


Member Function Documentation

tx_commerce_basic_basket::add_article article_uid,
quantity = 1,
priceid = ''
 

Addes an article to the basket Volker Graubaum, proofs if item exists

Parameters:
article_uid Article UID
quantity quantity for this basket
Returns:
true if success / false if no success public
Todo:
implement methid is_in_basket
Todo:
: Zusaetzliches feld fuer price_uid, pflichfeld
Since:
Get the price from the article object

Check if the given price id is related to the article

tx_commerce_basic_basket::change_quantity article_uid,
quantity = 1
 

Changes the quantity for this artcile in the basket

Parameters:
article_uid Article UID
quantity quantity for this basket
Returns:
true if success / false if no success public

tx_commerce_basic_basket::changePrices article_uid,
new_price_gross,
new_price_net
 

Changes the price_value for one ARticle

Parameters:
$article_uid 
$new_price_gross 
$new_price_net 

tx_commerce_basic_basket::changeTitle article_uid,
newtitle
 

Changes the Title for one Article

Parameters:
$article_uid 
$newtitle 

tx_commerce_basic_basket::delete_all_articles  ) 
 

deletes all articles form basket

Returns:
true

tx_commerce_basic_basket::delete_article article_uid  ) 
 

deletes article form basket

Parameters:
article_uid article UID
Returns:
true

tx_commerce_basic_basket::get_articles_by_article_type_uid_asUidlist article_type_uid  ) 
 

Returns an array of articles to a corresponding article_tyoe

Parameters:
$article_type_uid article type
Returns:
array or article_ids

tx_commerce_basic_basket::get_assoc_arrays prefix = ''  ) 
 

Creates an Array of assoc_arrays from the basket_articles the array within array (uid => array( 'article' => result form tx_commerce_article->return_assoc_array(), 'product' => result form tx_commerce_product->return_assoc_array(), ), uid2 =>array( 'article' => result form tx_commerce_article->return_assoc_array(); 'product' => result form tx_commerce_product->return_assoc_array(); ), )

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

tx_commerce_basic_basket::get_gross_sum again = true  ) 
 

gets the gross basket sum

Parameters:
again if should be recalculated
Returns:
basket_sum

tx_commerce_basic_basket::get_net_sum  ) 
 

gets the net basket sum

Returns:
basket_sum

tx_commerce_basic_basket::getArticleTypeCount article_type_uid  ) 
 

tx_commerce_basic_basket::getArticleTypeCountFromList articleTypes  ) 
 

returns the count of allArticles in the given array

Parameters:
array $articleType

tx_commerce_basic_basket::getArticleTypeSumGross article_type_uid  ) 
 

check function

tx_commerce_basic_basket::getArticleTypeSumNet article_type_uid  ) 
 

check function

tx_commerce_basic_basket::getBasketHashValue  ) 
 

returns true if the the basket has currently active articles

Returns:
char basketHash value

tx_commerce_basic_basket::getFirstArticleTypeDescription article_type_uid  ) 
 

tx_commerce_basic_basket::getFirstArticleTypeTitle article_type_uid  ) 
 

tx_commerce_basic_basket::getItemsCount  ) 
 

gets the number of items in the basket

Returns:
integer number of items

tx_commerce_basic_basket::getTaxRateSums  ) 
 

Calculates the TAX-Sum for the complete and different Tax-Rates depending on article

Returns:
array Taxratesums

tx_commerce_basic_basket::getTaxSum  ) 
 

Calculates the TAX-Sum for the complete Basket

Returns:
integert sum

tx_commerce_basic_basket::hasArticles  ) 
 

returns true if the the basket has currently active articles

Returns:
booles true / false

tx_commerce_basic_basket::isChangeable  ) 
 

returns True if the basket is changeable

Returns:
unknown

tx_commerce_basic_basket::isReadOnly  ) 
 

returns the currenty readonly statd

Returns:
boolean: true if readonly

tx_commerce_basic_basket::recalculate_sums  ) 
 

Recalculates the sums

tx_commerce_basic_basket::releaseReadOnly  ) 
 

releasses the readOnly

tx_commerce_basic_basket::setReadOnly  ) 
 

Sets the Basket to readonly, for checkout

tx_commerce_basic_basket::setTaxCalculationMethod priceFromNet  ) 
 

This Method Sets the Tax Calculation method (pricefromnet)

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

tx_commerce_basic_basket::tx_commerce_basket  ) 
 

Dummy instantiate Method

Reimplemented in tx_commerce_basket.


Member Data Documentation

tx_commerce_basic_basket::$basket_items = array()
 

Internal associative array for storing basket_items in the basket

public

tx_commerce_basic_basket::$basket_sum_gross = 0
 

gross Basket Summ private

tx_commerce_basic_basket::$basket_sum_net = 0
 

net Basket Summ private

tx_commerce_basic_basket::$crdate = 0
 

tx_commerce_basic_basket::$items = 0
 

Number of items in the basket private

tx_commerce_basic_basket::$pricefromnet = 0
 

calculated price from net price private

tx_commerce_basic_basket::$readOnly = false
 


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