eZPublishCommunityProject(LegacyStack)  2013.5
eZSimplePrice Class Reference

Handles prices with VAT and discounts. More...

+ Inheritance diagram for eZSimplePrice:

Public Member Functions

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

Public Attributes

 $ContentObject
 
 $DiscountPercent
 
 $IsVATIncluded
 
 $Price
 
 $VATType
 

Detailed Description

Handles prices 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

eZSimplePrice::attribute (   $attr)

Referenced by eZMultiPrice\attribute().

eZSimplePrice::attributes ( )
eZSimplePrice::calcDiscountExVATPrice (   $priceValue)
eZSimplePrice::calcDiscountIncVATPrice (   $priceValue)
eZSimplePrice::calcExVATPrice (   $priceValue)
eZSimplePrice::calcIncVATPrice (   $priceValue)
eZSimplePrice::currency ( )

Return the currency for the datatype.

Referenced by attribute().

eZSimplePrice::discount ( )
Returns
discount percentage. Backward compatibility.
eZSimplePrice::discountExVATPrice ( )

Referenced by attribute().

eZSimplePrice::discountIncVATPrice ( )

Referenced by attribute().

eZSimplePrice::discountPercent ( )
eZSimplePrice::exVATPrice ( )

Referenced by attribute().

eZSimplePrice::eZSimplePrice (   $classAttribute,
  $contentObjectAttribute,
  $storedPrice = null 
)
eZSimplePrice::hasAttribute (   $attr)
Returns
true if the attribute named $attr exists.
eZSimplePrice::hasDiscount ( )

Referenced by attribute().

eZSimplePrice::incVATPrice ( )

Referenced by attribute().

eZSimplePrice::price ( )
eZSimplePrice::serializeContentClassAttribute (   $classAttribute,
  $attributeNode,
  $attributeParametersNode 
)
eZSimplePrice::setAttribute (   $attr,
  $value 
)
eZSimplePrice::setDiscountPercent (   $percent)

Referenced by eZSimplePrice().

eZSimplePrice::setPrice (   $value)

Referenced by eZSimplePrice().

eZSimplePrice::setVATIncluded (   $VATIncluded)

Referenced by eZSimplePrice(), and setAttribute().

eZSimplePrice::setVATType (   $VATID)

Referenced by setAttribute().

eZSimplePrice::unserializeContentClassAttribute (   $classAttribute,
  $attributeNode,
  $attributeParametersNode 
)
eZSimplePrice::VATIncluded ( )
eZSimplePrice::VATPercent (   $object = false,
  $country = false 
)

Can return dynamic percentage depending on product and country the user is from.

Referenced by attribute(), calcExVATPrice(), and calcIncVATPrice().

eZSimplePrice::VATType ( )

Referenced by attribute(), setVATType(), and VATPercent().

Member Data Documentation

eZSimplePrice::$ContentObject

Referenced by VATPercent().

eZSimplePrice::$DiscountPercent

Referenced by discountPercent().

eZSimplePrice::$IsVATIncluded

Referenced by VATIncluded().

eZSimplePrice::$Price

Referenced by price().

eZSimplePrice::$VATType

Referenced by VATPercent(), and VATType().


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