Documentation

Mage_Weee_Model_Total_Quote_Weee extends Mage_Tax_Model_Sales_Total_Quote_Tax
in package

Table of Contents

Properties

$_address  : Mage_Sales_Model_Quote_Address
$_areTaxRequestsSimilar  : bool
Flag which is initialized when collect method is start.
$_baseRoundingDeltas  : array<string|int, mixed>
Array for the base rounding deltas
$_calculator  : Mage_Tax_Model_Calculation
Tax calculation model
$_canAddAmountToAddress  : bool
Various abstract abilities
$_canSetAddressAmount  : mixed
$_code  : string
Total Code name
$_config  : Mage_Tax_Model_Config
Tax configuration object
$_helper  : Mage_Weee_Helper_Data
Weee module helper object
$_hiddenTaxes  : array<string|int, mixed>
Hidden taxes array
$_itemRowTotalKey  : string
Key for item row total getting
$_roundingDeltas  : array<string|int, mixed>
Array for the rounding deltas
$_store  : Mage_Core_Model_Store
Store model
$_weeeHelper  : Mage_Weee_Helper_Data
Weee helper class

Methods

__construct()  : mixed
Initialize Weee totals collector
collect()  : $this
Collect Weee taxes amount and prepare items prices for taxation and discount
fetch()  : $this
Fetch FPT data to address object for display in totals block
getCode()  : string
Retrieve total code name
getIsItemRowTotalCompoundable()  : bool
Whether the item row total may be compounded with others
getItemBaseRowTotal()  : float
Getter for row default base total
getItemRowTotal()  : float
Getter for row default total
getLabel()  : string
No aggregated label for fixed product tax
processConfigArray()  : array<string|int, mixed>
Process model configuration array.
setCode()  : Mage_Sales_Model_Quote_Address_Total_Abstract
Set total code code name
setHelper()  : mixed
Set the helper object.
setStore()  : mixed
Set the store Object
_addAmount()  : Mage_Sales_Model_Quote_Address_Total_Abstract
Add total model amount value to address
_addBaseAmount()  : Mage_Sales_Model_Quote_Address_Total_Abstract
Add total model base amount value to address
_aggregateTaxPerRate()  : $this
Aggregate row totals per tax rate in array
_calcRowTaxAmount()  : $this
Calculate item tax amount based on row total
_calculateRowWeeeTax()  : int
Calculates and updates the wee tax based on the customer tax rate and discount for Row
_calculateShippingTax()  : $this
Tax calculation for shipping price
_calculateShippingTaxByRate()  : mixed
_calculateWeeeAmountInclTax()  : mixed
Calculates the weeeAmountInclTax for display purpose
_calculateWeeeTax()  : float
Calculates the weee tax based on the customer tax rate and discount
_calcUnitTaxAmount()  : $this
Calculate unit tax amount based on unit price
_customerRatePercent()  : mixed
Get the default store rate
_deltaRound()  : float
Round price based on previous rounding operation delta
_getAddress()  : Mage_Sales_Model_Quote_Address
Get quote address object
_getAddressItems()  : array<string|int, Mage_Sales_Model_Quote_Address_Item>
Get all items except nominals
_getCalculator()  : Mage_Tax_Model_Calculation
Returns the model for calculation
_process()  : bool
Calculate item fixed tax and prepare information for discount and regular taxation
_processHiddenTaxes()  : mixed
Process hidden taxes for items and shipping (in accordance with hidden tax type)
_processTotalAmount()  : bool
Process row amount based on FPT total amount configuration setting
_recalculateParent()  : $this
Recalculate parent item amounts based on children results
_resetItemData()  : mixed
Reset information about FPT for shopping cart item
_roundTotals()  : $this
Round the total amounts in address
_rowBaseCalculation()  : $this
Calculate address total tax based on row total
_rowBaseProcessItemTax()  : mixed
_saveAppliedTaxes()  : mixed
Collect applied tax rates information on address level
_setAddress()  : Mage_Sales_Model_Quote_Address_Total_Abstract
Set address which can be used inside totals calculation
_setAmount()  : Mage_Sales_Model_Quote_Address_Total_Abstract
Set total model amount value to address
_setBaseAmount()  : Mage_Sales_Model_Quote_Address_Total_Abstract
Set total model base amount value to address
_totalBaseCalculation()  : $this
Calculate address total tax based on address subtotal
_totalBaseProcessItemTax()  : mixed
_unitBaseCalculation()  : $this
Calculate address tax amount based on one unit price and tax amount
_unitBaseProcessItemTax()  : mixed
_usePriceIncludeTax()  : bool
Check if price include tax should be used for calculations.

Properties

$_areTaxRequestsSimilar

Flag which is initialized when collect method is start.

protected bool $_areTaxRequestsSimilar = \false

Is used for checking if store tax and customer tax requests are similar

$_baseRoundingDeltas

Array for the base rounding deltas

protected array<string|int, mixed> $_baseRoundingDeltas = []

$_canAddAmountToAddress

Various abstract abilities

protected bool $_canAddAmountToAddress = \true

$_canSetAddressAmount

protected mixed $_canSetAddressAmount = \true

$_code

Total Code name

protected string $_code

$_hiddenTaxes

Hidden taxes array

protected array<string|int, mixed> $_hiddenTaxes = []

$_itemRowTotalKey

Key for item row total getting

protected string $_itemRowTotalKey = \null

$_roundingDeltas

Array for the rounding deltas

protected array<string|int, mixed> $_roundingDeltas = []

Methods

__construct()

Initialize Weee totals collector

public __construct() : mixed

getCode()

Retrieve total code name

public getCode() : string
Return values
string

getLabel()

No aggregated label for fixed product tax

public getLabel() : string

TODO: fix

Attributes
#[Override]
Return values
string

processConfigArray()

Process model configuration array.

public processConfigArray(array<string|int, mixed> $config, Mage_Core_Model_Store $store) : array<string|int, mixed>

This method can be used for changing totals collect sort order

Parameters
$config : array<string|int, mixed>
$store : Mage_Core_Model_Store
Attributes
#[Override]
Return values
array<string|int, mixed>

_aggregateTaxPerRate()

Aggregate row totals per tax rate in array

protected _aggregateTaxPerRate(Mage_Sales_Model_Quote_Item_Abstract $item, float $rate, array<string|int, mixed> &$taxGroups[, null|string $taxId = null ][, bool $recalculateRowTotalInclTax = false ]) : $this
Parameters
$item : Mage_Sales_Model_Quote_Item_Abstract
$rate : float
$taxGroups : array<string|int, mixed>
$taxId : null|string = null
$recalculateRowTotalInclTax : bool = false
Return values
$this

_calcRowTaxAmount()

Calculate item tax amount based on row total

protected _calcRowTaxAmount(Mage_Sales_Model_Quote_Item_Abstract $item, float $rate[, array<string|int, mixed> &$taxGroups = null ][, string $taxId = null ][, bool $recalculateRowTotalInclTax = false ]) : $this
Parameters
$item : Mage_Sales_Model_Quote_Item_Abstract
$rate : float
$taxGroups : array<string|int, mixed> = null
$taxId : string = null
$recalculateRowTotalInclTax : bool = false
Return values
$this

_calculateRowWeeeTax()

Calculates and updates the wee tax based on the customer tax rate and discount for Row

protected _calculateRowWeeeTax(float $discountAmount, Mage_Sales_Model_Quote_Item_Abstract $item, float $rate[, bool $base = true ]) : int
Parameters
$discountAmount : float
$item : Mage_Sales_Model_Quote_Item_Abstract
$rate : float
$base : bool = true
Return values
int

_calculateShippingTaxByRate()

protected _calculateShippingTaxByRate(Mage_Sales_Model_Quote_Address $address, float $rate, array<string|int, mixed> $appliedRates[, string $taxId = null ]) : mixed
Parameters
$address : Mage_Sales_Model_Quote_Address
$rate : float
$appliedRates : array<string|int, mixed>
$taxId : string = null

_calcUnitTaxAmount()

Calculate unit tax amount based on unit price

protected _calcUnitTaxAmount(Mage_Sales_Model_Quote_Item_Abstract $item, float $rate[, array<string|int, mixed> &$taxGroups = null ][, string $taxId = null ][, bool $recalculateRowTotalInclTax = false ]) : $this
Parameters
$item : Mage_Sales_Model_Quote_Item_Abstract
$rate : float
$taxGroups : array<string|int, mixed> = null
$taxId : string = null
$recalculateRowTotalInclTax : bool = false
Return values
$this

_deltaRound()

Round price based on previous rounding operation delta

protected _deltaRound(float $price, string $rate, bool $direction[, string $type = 'regular' ]) : float
Parameters
$price : float
$rate : string
$direction : bool

price including or excluding tax

$type : string = 'regular'
Return values
float

_processHiddenTaxes()

Process hidden taxes for items and shipping (in accordance with hidden tax type)

protected _processHiddenTaxes() : mixed

_processTotalAmount()

Process row amount based on FPT total amount configuration setting

protected _processTotalAmount(Mage_Sales_Model_Quote_Address $address, float $rowValue, float $baseRowValue) : bool
Parameters
$address : Mage_Sales_Model_Quote_Address
$rowValue : float
$baseRowValue : float
Return values
bool

Whether tax is affected

_saveAppliedTaxes()

Collect applied tax rates information on address level

protected _saveAppliedTaxes(Mage_Sales_Model_Quote_Address $address, array<string|int, mixed> $applied, float $amount, float $baseAmount, float|null $rate) : mixed
Parameters
$address : Mage_Sales_Model_Quote_Address
$applied : array<string|int, mixed>
$amount : float
$baseAmount : float
$rate : float|null

_usePriceIncludeTax()

Check if price include tax should be used for calculations.

protected _usePriceIncludeTax(null|string|bool|int|Mage_Core_Model_Store $store) : bool

We are using price include tax just in case when catalog prices are including tax and customer tax request is same as store tax request

Parameters
$store : null|string|bool|int|Mage_Core_Model_Store
Return values
bool
On this page

Search results