OXID eShop CE  6.1.5
OxidEsales\EshopCommunity\Core\PriceList Class Reference

Public Member Functions

 __construct ()
 
 getBruttoSum ()
 
 getNettoSum ()
 
 getSum ($isNettoMode=true)
 
 getVatInfo ($isNettoMode=true)
 
 getPriceInfo ()
 
 getMostUsedVatPercent ()
 
 getProportionalVatPercent ()
 
 addToPriceList ($oPrice)
 
 calculateToPrice ()
 
 getCount ()
 

Protected Attributes

 $_aList = []
 

Detailed Description

Price list class. Deals with a list of oxPrice object. The main reason why we can't just sum oxPrice objects is that they have different VAT percents.

Constructor & Destructor Documentation

◆ __construct()

OxidEsales\EshopCommunity\Core\PriceList::__construct ( )

Class constructor. The constructor is defined in order to be possible to call parent::__construct() in modules.

Returns
null;

Member Function Documentation

◆ addToPriceList()

OxidEsales\EshopCommunity\Core\PriceList::addToPriceList (   $oPrice)

Add an oxPrice object to prices array

Parameters
\OxidEsales\Eshop\Core\Price$oPriceoxprice object

◆ calculateToPrice()

OxidEsales\EshopCommunity\Core\PriceList::calculateToPrice ( )

Recalculate price list to one price: sum total value of prices, and calculate VAT

Returns
null

◆ getBruttoSum()

OxidEsales\EshopCommunity\Core\PriceList::getBruttoSum ( )

Returns Brutto price sum

Returns
double

◆ getCount()

OxidEsales\EshopCommunity\Core\PriceList::getCount ( )

Return count of added oxPrices

Returns
int

◆ getMostUsedVatPercent()

OxidEsales\EshopCommunity\Core\PriceList::getMostUsedVatPercent ( )

Iterates through applied VATs and fetches VAT for delivery. If not VAT was applied - default VAT (myConfig->dDefaultVAT) will be used

Returns
double

◆ getNettoSum()

OxidEsales\EshopCommunity\Core\PriceList::getNettoSum ( )

Returns the sum of list Netto prices

Returns
double

◆ getPriceInfo()

OxidEsales\EshopCommunity\Core\PriceList::getPriceInfo ( )

Return prices separated to different array elements depending on VAT

Returns
array

◆ getProportionalVatPercent()

OxidEsales\EshopCommunity\Core\PriceList::getProportionalVatPercent ( )

Iterates through applied VATs and calculates proportional VAT

Returns
double

◆ getSum()

OxidEsales\EshopCommunity\Core\PriceList::getSum (   $isNettoMode = true)

Returns the sum of list Netto prices

Parameters
bool$isNettoModemode in which calculate sum, default netto
Returns
double

◆ getVatInfo()

OxidEsales\EshopCommunity\Core\PriceList::getVatInfo (   $isNettoMode = true)

Returns VAT values sum separated to different array elements depending on VAT

Parameters
bool$isNettoModemode in which calculate sum, default netto
Returns
array

Member Data Documentation

◆ $_aList

OxidEsales\EshopCommunity\Core\PriceList::$_aList = []
protected

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