eZPublish  4.5
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)
 
 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 ()
 

Static Public Member Functions

static removeByID ($objectAttributeID, $objectAttributeVersion=null)
 

Public Attributes

 $ContentObjectAttribute
 
 $CurrencyList
 
 $HasDataDirty
 
 $PriceList
 
const CALCULATION_TYPE_DISCOUNT_EXCLUDE = 4
 
const CALCULATION_TYPE_DISCOUNT_INCLUDE = 3
 
const CALCULATION_TYPE_VAT_EXCLUDE = 2
 
const CALCULATION_TYPE_VAT_INCLUDE = 1
 
- Public Attributes inherited from eZSimplePrice
 $ContentObject
 
 $DiscountPercent
 
 $IsVATIncluded
 
 $Price
 
 $VATType
 

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(), and priceByCurrency().

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 
)
static eZMultiPrice::removeByID (   $objectAttributeID,
  $objectAttributeVersion = null 
)
static
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
eZMultiPrice::$CurrencyList

Referenced by currencyList().

eZMultiPrice::$HasDataDirty

Referenced by hasDirtyData().

eZMultiPrice::$PriceList

Referenced by priceList().

const eZMultiPrice::CALCULATION_TYPE_DISCOUNT_EXCLUDE = 4
const eZMultiPrice::CALCULATION_TYPE_DISCOUNT_INCLUDE = 3
const eZMultiPrice::CALCULATION_TYPE_VAT_EXCLUDE = 2
const eZMultiPrice::CALCULATION_TYPE_VAT_INCLUDE = 1

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