Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
eZMultiPrice Class Reference

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

Inheritance diagram for eZMultiPrice:

## Public Member Functions
| __construct ( $classAttribute, $contentObjectAttribute, $storedPrice=null)
| attributes ()
| hasAttribute ( $attr)
| setAttribute ( $attr, $value)
| attribute ( $attr)
| preferredCurrencyCode ()
| currencyList ()
| autoCurrencyList ()
| customPriceList ()
| autoPriceList ()
| priceList ( $type=false)
| incVATPriceList ( $type=false)
| exVATPriceList ( $type=false)
| discountIncVATPriceList ( $type=false)
| discountExVATPriceList ( $type=false)
| calcPriceList ( $calculationType, $priceType)
| removePriceByCurrency ( $currencyCode)
| setCustomPrice ( $currencyCode, $value)
| setAutoPrice ( $currencyCode, $value)
| setPriceByCurrency ( $currencyCode, $value, $type)
| setPrice ( $value)
| updateAutoPriceList ()
| createPrice ( $currencyCode, $value, $type)
| addPrice ( $currencyCode, $value, $type)
| updatePrice ( $currencyCode, $value, $type)
| customPrice ( $currencyCode)
| autoPrice ( $currencyCode)
| priceByCurrency ( $currencyCode, $type=false)
| price ()
| currencyByCode ( $currencyCode)
| store ()
| storePriceList ()
| hasDirtyData ()
| setHasDirtyData ( $hasDirtyData)
| baseCurrency ()
| basePrice ()
| currency ()
| DOMDocument ()
| decodeDOMTree ( $rootNode)

## Static Public Member Functions
static | removeByID ( $objectAttributeID, $objectAttributeVersion=null)

## Public Attributes
| $IsDataDirty
const | CALCULATION_TYPE_VAT_INCLUDE = 1
const | CALCULATION_TYPE_VAT_EXCLUDE = 2
const | CALCULATION_TYPE_DISCOUNT_INCLUDE = 3
const | CALCULATION_TYPE_DISCOUNT_EXCLUDE = 4
| $PriceList
| $CurrencyList
| $HasDataDirty
| $ContentObjectAttribute

## 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

Definition at line 31 of file ezmultiprice.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZMultiPrice::__construct | ( |  | $classAttribute,
|  |  | $contentObjectAttribute,
|  |  | $storedPrice = `null`
| ) |  |

Definition at line 42 of file ezmultiprice.php.

References eZMultiPriceType\INCLUDE_VAT_FIELD, and eZMultiPriceType\VAT_ID_FIELD.

## Member Function Documentation

## ◆ addPrice()

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

Definition at line 398 of file ezmultiprice.php.

References createPrice(), and setHasDirtyData().

Referenced by setPriceByCurrency().

## ◆ attribute()

eZMultiPrice::attribute | ( |  | $attr | ) |

Returns
  The value of the attribute named $attr or `null` if it doesn't exist.

Definition at line 118 of file ezmultiprice.php.

References autoCurrencyList(), autoPriceList(), currencyList(), customPriceList(), discountExVATPriceList(), discountIncVATPriceList(), exVATPriceList(), incVATPriceList(), and priceList().

Referenced by DOMDocument(), and priceByCurrency().

## ◆ attributes()

eZMultiPrice::attributes | ( |  | ) |

Returns
  An array with attributes that is available.

Definition at line 59 of file ezmultiprice.php.

Referenced by hasAttribute().

## ◆ autoCurrencyList()

eZMultiPrice::autoCurrencyList | ( |  | ) |

functional attribute

Definition at line 196 of file ezmultiprice.php.

References currencyList(), and customPriceList().

Referenced by attribute(), and updateAutoPriceList().

## ◆ autoPrice()

eZMultiPrice::autoPrice | ( |  | $currencyCode | ) |

Definition at line 439 of file ezmultiprice.php.

References priceByCurrency().

## ◆ autoPriceList()

eZMultiPrice::autoPriceList | ( |  | ) |

Definition at line 223 of file ezmultiprice.php.

References priceList().

Referenced by attribute().

## ◆ baseCurrency()

eZMultiPrice::baseCurrency | ( |  | ) |

Returns a currency code of the first custom price.

Definition at line 521 of file ezmultiprice.php.

References customPriceList().

Referenced by basePrice().

## ◆ basePrice()

eZMultiPrice::basePrice | ( |  | ) |

Definition at line 537 of file ezmultiprice.php.

References baseCurrency(), and priceByCurrency().

Referenced by updateAutoPriceList().

## ◆ calcPriceList()

eZMultiPrice::calcPriceList | ( |  | $calculationType,
|  |  | $priceType
| ) |  |

Definition at line 283 of file ezmultiprice.php.

References CALCULATION_TYPE_DISCOUNT_EXCLUDE, CALCULATION_TYPE_DISCOUNT_INCLUDE, CALCULATION_TYPE_VAT_EXCLUDE, CALCULATION_TYPE_VAT_INCLUDE, and priceList().

Referenced by discountExVATPriceList(), discountIncVATPriceList(), exVATPriceList(), and incVATPriceList().

## ◆ createPrice()

eZMultiPrice::createPrice | ( |  | $currencyCode,
|  |  | $value,
|  |  | $type
| ) |  |

Definition at line 384 of file ezmultiprice.php.

References currencyByCode().

Referenced by addPrice().

## ◆ currency()

eZMultiPrice::currency | ( |  | ) |

Definition at line 543 of file ezmultiprice.php.

References preferredCurrencyCode().

## ◆ currencyByCode()

eZMultiPrice::currencyByCode | ( |  | $currencyCode | ) |

Definition at line 475 of file ezmultiprice.php.

References currencyList().

Referenced by createPrice().

## ◆ currencyList()

eZMultiPrice::currencyList | ( |  | ) |

Definition at line 183 of file ezmultiprice.php.

References $CurrencyList.

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

## ◆ customPrice()

eZMultiPrice::customPrice | ( |  | $currencyCode | ) |

Definition at line 434 of file ezmultiprice.php.

References priceByCurrency().

## ◆ customPriceList()

eZMultiPrice::customPriceList | ( |  | ) |

functional attribute

Definition at line 218 of file ezmultiprice.php.

References priceList().

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

## ◆ decodeDOMTree()

eZMultiPrice::decodeDOMTree | ( |  | $rootNode | ) |

Definition at line 578 of file ezmultiprice.php.

References setPriceByCurrency().

## ◆ discountExVATPriceList()

eZMultiPrice::discountExVATPriceList | ( |  | $type = `false` | ) |

Definition at line 278 of file ezmultiprice.php.

References calcPriceList().

Referenced by attribute().

## ◆ discountIncVATPriceList()

eZMultiPrice::discountIncVATPriceList | ( |  | $type = `false` | ) |

Definition at line 273 of file ezmultiprice.php.

References calcPriceList().

Referenced by attribute().

## ◆ DOMDocument()

eZMultiPrice::DOMDocument | ( |  | ) |

Definition at line 548 of file ezmultiprice.php.

References attribute().

## ◆ exVATPriceList()

eZMultiPrice::exVATPriceList | ( |  | $type = `false` | ) |

Definition at line 268 of file ezmultiprice.php.

References calcPriceList().

Referenced by attribute().

## ◆ hasAttribute()

eZMultiPrice::hasAttribute | ( |  | $attr | ) |

Returns
  `true` if the attribute named $attr exists.

Definition at line 76 of file ezmultiprice.php.

References attributes().

## ◆ hasDirtyData()

eZMultiPrice::hasDirtyData | ( |  | ) |

Definition at line 508 of file ezmultiprice.php.

References $HasDataDirty.

Referenced by store().

## ◆ incVATPriceList()

eZMultiPrice::incVATPriceList | ( |  | $type = `false` | ) |

Definition at line 263 of file ezmultiprice.php.

References calcPriceList().

Referenced by attribute().

## ◆ preferredCurrencyCode()

eZMultiPrice::preferredCurrencyCode | ( |  | ) |

functional attribute

Definition at line 178 of file ezmultiprice.php.

Referenced by currency(), and price().

## ◆ price()

eZMultiPrice::price | ( |  | ) |

Definition at line 460 of file ezmultiprice.php.

References preferredCurrencyCode(), and priceByCurrency().

## ◆ priceByCurrency()

eZMultiPrice::priceByCurrency | ( |  | $currencyCode,
|  |  | $type = `false`
| ) |  |

Definition at line 444 of file ezmultiprice.php.

References attribute(), and priceList().

Referenced by autoPrice(), basePrice(), customPrice(), price(), removePriceByCurrency(), and updatePrice().

## ◆ priceList()

eZMultiPrice::priceList | ( |  | $type = `false` | ) |

Definition at line 228 of file ezmultiprice.php.

References $PriceList.

Referenced by attribute(), autoPriceList(), calcPriceList(), customPriceList(), priceByCurrency(), removePriceByCurrency(), and storePriceList().

## ◆ removeByID()

static eZMultiPrice::removeByID | ( |  | $objectAttributeID,
|  |  | $objectAttributeVersion = `null`
| ) |  |
| static

Definition at line 326 of file ezmultiprice.php.

Referenced by eZMultiPriceType\deleteStoredObjectAttribute().

## ◆ removePriceByCurrency()

eZMultiPrice::removePriceByCurrency | ( |  | $currencyCode | ) |

Definition at line 331 of file ezmultiprice.php.

References priceByCurrency(), and priceList().

## ◆ setAttribute()

eZMultiPrice::setAttribute | ( |  | $attr,
|  |  | $value
| ) |  |

Sets the attribute named $attr to value $value.

Definition at line 84 of file ezmultiprice.php.

## ◆ setAutoPrice()

eZMultiPrice::setAutoPrice | ( |  | $currencyCode,
|  |  | $value
| ) |  |

Definition at line 347 of file ezmultiprice.php.

References setPriceByCurrency().

Referenced by updateAutoPriceList().

## ◆ setCustomPrice()

eZMultiPrice::setCustomPrice | ( |  | $currencyCode,
|  |  | $value
| ) |  |

Definition at line 342 of file ezmultiprice.php.

References setPriceByCurrency().

## ◆ setHasDirtyData()

eZMultiPrice::setHasDirtyData | ( |  | $hasDirtyData | ) |

Definition at line 513 of file ezmultiprice.php.

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

## ◆ setPrice()

eZMultiPrice::setPrice | ( |  | $value | ) |

Definition at line 364 of file ezmultiprice.php.

## ◆ setPriceByCurrency()

eZMultiPrice::setPriceByCurrency | ( |  | $currencyCode,
|  |  | $value,
|  |  | $type
| ) |  |

Definition at line 352 of file ezmultiprice.php.

References addPrice(), updatePrice(), and eZDebug\writeWarning().

Referenced by decodeDOMTree(), setAutoPrice(), and setCustomPrice().

## ◆ store()

eZMultiPrice::store | ( |  | ) |

Definition at line 487 of file ezmultiprice.php.

References hasDirtyData(), setHasDirtyData(), and storePriceList().

## ◆ storePriceList()

eZMultiPrice::storePriceList | ( |  | ) |

Definition at line 496 of file ezmultiprice.php.

References priceList().

Referenced by store().

## ◆ updateAutoPriceList()

eZMultiPrice::updateAutoPriceList | ( |  | ) |

Definition at line 368 of file ezmultiprice.php.

References autoCurrencyList(), basePrice(), and setAutoPrice().

## ◆ updatePrice()

eZMultiPrice::updatePrice | ( |  | $currencyCode,
|  |  | $value,
|  |  | $type
| ) |  |

Definition at line 413 of file ezmultiprice.php.

References priceByCurrency(), and setHasDirtyData().

Referenced by setPriceByCurrency().

## Member Data Documentation

## ◆ $ContentObjectAttribute

eZMultiPrice::$ContentObjectAttribute

Definition at line 599 of file ezmultiprice.php.

## ◆ $CurrencyList

eZMultiPrice::$CurrencyList

Definition at line 597 of file ezmultiprice.php.

Referenced by currencyList().

## ◆ $HasDataDirty

eZMultiPrice::$HasDataDirty

Definition at line 598 of file ezmultiprice.php.

Referenced by hasDirtyData().

## ◆ $IsDataDirty

eZMultiPrice::$IsDataDirty

Definition at line 36 of file ezmultiprice.php.

## ◆ $PriceList

eZMultiPrice::$PriceList

Definition at line 596 of file ezmultiprice.php.

Referenced by priceList().

## ◆ CALCULATION_TYPE_DISCOUNT_EXCLUDE

const eZMultiPrice::CALCULATION_TYPE_DISCOUNT_EXCLUDE = 4

Definition at line 40 of file ezmultiprice.php.

Referenced by calcPriceList().

## ◆ CALCULATION_TYPE_DISCOUNT_INCLUDE

const eZMultiPrice::CALCULATION_TYPE_DISCOUNT_INCLUDE = 3

Definition at line 39 of file ezmultiprice.php.

Referenced by calcPriceList().

## ◆ CALCULATION_TYPE_VAT_EXCLUDE

const eZMultiPrice::CALCULATION_TYPE_VAT_EXCLUDE = 2

Definition at line 38 of file ezmultiprice.php.

Referenced by calcPriceList().

## ◆ CALCULATION_TYPE_VAT_INCLUDE

const eZMultiPrice::CALCULATION_TYPE_VAT_INCLUDE = 1

Definition at line 37 of file ezmultiprice.php.

Referenced by calcPriceList().

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

- ezmultiprice.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.