eZPublish  3.8
eZMultiPrice Class Reference

Handles prices in different currencies with VAT and discounts. More...

+ Inheritance diagram for eZMultiPrice:
+ Collaboration diagram for eZMultiPrice:

Public Member Functions

addPrice ($currencyCode, $value, $type)
 
attribute ($attr)
 
 attributes ()
 
autoCurrencyList ()
 
autoPrice ($currencyCode)
 
autoPriceList ()
 
 baseCurrency ()
 
 basePrice ()
 
calcPriceList ($calculationType, $priceType)
 
createPrice ($currencyCode, $value, $type)
 
currency ()
 
currencyByCode ($currencyCode)
 
currencyList ()
 
customPrice ($currencyCode)
 
customPriceList ()
 
 decodeDOMTree ($rootNode)
 
discountExVATPriceList ($type=false)
 
discountIncVATPriceList ($type=false)
 
 DOMDocument ()
 
exVATPriceList ($type=false)
 
 eZMultiPrice (&$classAttribute, &$contentObjectAttribute, $storedPrice=null)
 
 hasAttribute ($attr)
 
 hasDirtyData ()
 
incVATPriceList ($type=false)
 
preferredCurrencyCode ()
 
price ()
 
priceByCurrency ($currencyCode, $type=false)
 
priceList ($type=false)
 
 remove ($objectAttributeID, $objectAttributeVersion=null)
 
 removePriceByCurrency ($currencyCode)
 
 setAttribute ($attr, $value)
 
 setAutoPrice ($currencyCode, $value)
 
 setCustomPrice ($currencyCode, $value)
 
 setHasDirtyData ($hasDirtyData)
 
 setPrice ($value)
 
 setPriceByCurrency ($currencyCode, $value, $type)
 
 store ()
 
 storePriceList ()
 
 updateAutoPriceList ()
 
updatePrice ($currencyCode, $value, $type)
 
- Public Member Functions inherited from eZSimplePrice
attribute ($attr)
 
 attributes ()
 
calcDiscountExVATPrice ($priceValue)
 
calcDiscountIncVATPrice ($priceValue)
 
calcExVATPrice ($priceValue)
 
calcIncVATPrice ($priceValue)
 
currency ()
 
 discount ()
 
discountExVATPrice ()
 
discountIncVATPrice ()
 
discountPercent ()
 
exVATPrice ()
 
 eZSimplePrice (&$classAttribute, &$contentObjectAttribute, $storedPrice=null)
 
 hasAttribute ($attr)
 
hasDiscount ()
 
incVATPrice ()
 
price ()
 
 serializeContentClassAttribute (&$classAttribute, &$attributeNode, &$attributeParametersNode)
 
 setAttribute ($attr, $value)
 
 setDiscountPercent ($percent)
 
 setPrice ($value)
 
 setVATIncluded ($VATIncluded)
 
 setVATType ($VATID)
 
 unserializeContentClassAttribute (&$classAttribute, &$attributeNode, &$attributeParametersNode)
 
VATIncluded ()
 
 VATPercent ($object=false, $country=false)
 Can return dynamic percentage depending on product and country the user is from. More...
 
VATType ()
 

Private Attributes

 $ContentObjectAttribute
 
 $CurrencyList
 
 $HasDataDirty
 
 $PriceList
 

Detailed Description

Handles prices in different currencies with VAT and discounts.

The available attributes are:

  • vat_type
  • current_user
  • is_vat_included
  • selected_vat_type
  • vat_percent
  • inc_vat_price
  • ex_vat_price
  • discount_percent
  • discount_price_inc_vat
  • discount_price_ex_vat
  • has_discount
  • price

Member Function Documentation

& eZMultiPrice::addPrice (   $currencyCode,
  $value,
  $type 
)

Referenced by setPriceByCurrency().

& eZMultiPrice::attribute (   $attr)
Returns
The value of the attribute named $attr or null if it doesn't exist.

Referenced by DOMDocument(), priceByCurrency(), and priceList().

eZMultiPrice::attributes ( )
Returns
An array with attributes that is available.

Referenced by hasAttribute().

& eZMultiPrice::autoCurrencyList ( )

functional attribute

Referenced by attribute(), and updateAutoPriceList().

& eZMultiPrice::autoPrice (   $currencyCode)
& eZMultiPrice::autoPriceList ( )

Referenced by attribute().

eZMultiPrice::baseCurrency ( )

Returns a currency code of the first custom price.

Referenced by basePrice().

eZMultiPrice::basePrice ( )

Referenced by updateAutoPriceList().

& eZMultiPrice::calcPriceList (   $calculationType,
  $priceType 
)
& eZMultiPrice::createPrice (   $currencyCode,
  $value,
  $type 
)

Referenced by addPrice().

& eZMultiPrice::currency ( )
& eZMultiPrice::currencyByCode (   $currencyCode)

Referenced by createPrice().

& eZMultiPrice::currencyList ( )
& eZMultiPrice::customPrice (   $currencyCode)
& eZMultiPrice::customPriceList ( )

functional attribute

Referenced by attribute(), autoCurrencyList(), and baseCurrency().

eZMultiPrice::decodeDOMTree (   $rootNode)
& eZMultiPrice::discountExVATPriceList (   $type = false)

Referenced by attribute().

& eZMultiPrice::discountIncVATPriceList (   $type = false)

Referenced by attribute().

eZMultiPrice::DOMDocument ( )
& eZMultiPrice::exVATPriceList (   $type = false)

Referenced by attribute().

eZMultiPrice::eZMultiPrice ( $classAttribute,
$contentObjectAttribute,
  $storedPrice = null 
)

Constructor

eZMultiPrice::hasAttribute (   $attr)
Returns
true if the attribute named $attr exists.
eZMultiPrice::hasDirtyData ( )

Referenced by store().

& eZMultiPrice::incVATPriceList (   $type = false)

Referenced by attribute().

& eZMultiPrice::preferredCurrencyCode ( )

functional attribute

Referenced by currency(), and price().

& eZMultiPrice::price ( )
& eZMultiPrice::priceByCurrency (   $currencyCode,
  $type = false 
)
eZMultiPrice::remove (   $objectAttributeID,
  $objectAttributeVersion = null 
)
eZMultiPrice::removePriceByCurrency (   $currencyCode)
eZMultiPrice::setAttribute (   $attr,
  $value 
)

Sets the attribute named $attr to value $value.

eZMultiPrice::setAutoPrice (   $currencyCode,
  $value 
)

Referenced by updateAutoPriceList().

eZMultiPrice::setCustomPrice (   $currencyCode,
  $value 
)
eZMultiPrice::setHasDirtyData (   $hasDirtyData)

Referenced by addPrice(), store(), and updatePrice().

eZMultiPrice::setPrice (   $value)
eZMultiPrice::setPriceByCurrency (   $currencyCode,
  $value,
  $type 
)
eZMultiPrice::store ( )
eZMultiPrice::storePriceList ( )

Referenced by store().

eZMultiPrice::updateAutoPriceList ( )
& eZMultiPrice::updatePrice (   $currencyCode,
  $value,
  $type 
)

Referenced by setPriceByCurrency().

Member Data Documentation

eZMultiPrice::$ContentObjectAttribute
private
eZMultiPrice::$CurrencyList
private

Referenced by currencyList().

eZMultiPrice::$HasDataDirty
private

Referenced by hasDirtyData().

eZMultiPrice::$PriceList
private

Referenced by priceList().


The documentation for this class was generated from the following file: