Documentation

Mage_Weee_Helper_Data extends Mage_Core_Helper_Abstract
in package

Table of Contents

Constants

LOADED_AND_DISPLAY_WITH_TAX  : mixed = '2'
'FPT Tax Configuration' for LOADED_AND_DISPLAY_WITH_TAX
TAXED  : mixed = '1'
'FPT Tax Configuration' for TAXED
XML_PATH_FPT_ENABLED  : mixed = 'tax/weee/enable'
Config Path for FPT

Properties

$_layout  : Mage_Core_Model_Layout
Layout model object
$_moduleName  : string
Helper module name
$_request  : Mage_Core_Controller_Request_Http
Request object
$_store  : Mage_Core_Model_Store
Current store, in the case of backend order, it could be different from admin store
$_storeDisplayConfig  : array<string|int, mixed>
$modulesDisabled  : array<string|int, mixed>

Methods

__()  : string
Translate
escapeHtml()  : ($data is array ? ?string[] : ?string)
Escape html entities
escapeScriptIdentifiers()  : string
Remove `javascript:`, `vbscript:`, `data:` words from the string.
escapeSpecial()  : string
Remove `\t`,`\n`,`\r`,`\0`,`\x0B:` symbols from the string.
escapeUrl()  : string
Escape html entities in url
getAmount()  : float
Get weee tax amount for product based on shipping and billing addresses, website and tax settings
getAmountForDisplay()  : float
Returns amount to display excluding taxes
getAmountForDisplayInclTaxes()  : float
Returns amount to display including taxes
getAmountInclTaxes()  : float
Returns all summed weee taxes with all local taxes applied
getApplied()  : array<string|int, mixed>
Returns applied weee taxes
getBaseRowWeeeAmountAfterDiscount()  : float
Calculate base row weee amount for an order, invoice or credit memo item The returned value may contain discount if the discount is not included in the discount for subtotal
getBaseRowWeeeTaxInclTax()  : float
Get the total base weee including tax by row
getBaseTotalRowTaxAppliedForWeeeTax()  : float
Get the Total tax applied in base for Weee
getBaseTotalTaxAppliedForWeeeTax()  : float
Get the total tax applied on weee by unit
getBaseWeeeTaxInclTax()  : float
Get the total base weee tax
getEmailPriceDisplayType()  : int
Get weee amount display type in email templates
getLayout()  : Mage_Core_Model_Layout
Retrieve layout model object
getListPriceDisplayType()  : int
Get weee amount display type on product list page
getOriginalAmount()  : float|int
Returns original amount
getPriceDisplayType()  : int
Get weee amount display type on product view page
getProductWeeeAttributes()  : array<string|int, mixed>
Proxy for Mage_Weee_Model_Tax::getProductWeeeAttributes()
getProductWeeeAttributesForDisplay()  : array<string|int, mixed>
Returns array of weee attributes allowed for display
getProductWeeeAttributesForRenderer()  : array<string|int, mixed>
Get Product Weee attributes for price renderer
getRowWeeeAmountAfterDiscount()  : float
Calculate row weee amount for an order, invoice or credit memo item The returned value may contain discount if the discount is not included in the discount for subtotal
getRowWeeeTaxInclTax()  : float
Get the total weee including tax by row
getSalesPriceDisplayType()  : int
Get weee amount display type in sales modules
getTaxType()  : int
Get Weee Tax Configuration Type
getTotalRowTaxAppliedForWeeeTax()  : float
Get the Total tax applied for Weee
getTotalTaxAppliedForWeeeTax()  : float
Get the total tax applied on weee by unit
getWeeeTaxInclTax()  : float
Get the total weee tax
hasTags()  : bool
Check for tags in multidimensional arrays
includeInSubtotal()  : bool
Check if weee tax amount should be included to subtotal
isDiscounted()  : bool
Check if weee tax amount should be discounted
isEnabled()  : bool
Check if fixed taxes are used in system
isModuleEnabled()  : bool
Check is module exists and enabled in global config.
isModuleOutputEnabled()  : bool
Check whether the module output is enabled in Configuration
isTaxable()  : bool
Check if weee tax amount should be taxable
isTaxIncluded()  : bool
Returns true if default store tax is already applied to the FPT(weee)
jsQuoteEscape()  : ($data is array ? string[] : string)
Escape quotes in java script
processTierPrices()  : $this
Adds HTML containers and formats tier prices accordingly to the currency used
quoteEscape()  : string
Escape quotes inside html attributes Use $addSlashes = false for escaping js that inside html attribute (onClick, onSubmit etc)
removeTags()  : string
Remove html tags, but leave "<" and ">" signs
setApplied()  : $this
Sets applied weee taxes
setLayout()  : Mage_Core_Helper_Abstract
Declare layout
setStore()  : mixed
Set the store for the current quote
setWeeeTaxesAppliedProperty()  : mixed
Set a value to a specific property searching FPT by title for the Item
stripTags()  : string
Wrapper for standard strip_tags() function with extra functionality for html entities
translateArray()  : array<string|int, mixed>
Translate array
typeOfDisplay()  : bool|int
Returns display type for price accordingly to current zone
urlDecode()  : string
base64_decode() for URLs decoding
urlDecodeAndEscape()  : string
base64_decode() and escape quotes in url
urlEncode()  : string
base64_encode() for URLs encoding
validateCatalogPricesAndFptConfiguration()  : bool
Check if the configuration for the particular store causes conflicts
_cleanCache()  : Mage_Core_Helper_Abstract
Cleaning cache
_getModuleName()  : string
Retrieve helper module name
_getRequest()  : Mage_Core_Controller_Request_Http
Retrieve request object
_getUrl()  : string
Retrieve url
_loadCache()  : mixed
Loading cache data
_removeCache()  : Mage_Core_Helper_Abstract
Removing cache
_saveCache()  : Mage_Core_Helper_Abstract
Saving cache

Constants

LOADED_AND_DISPLAY_WITH_TAX

'FPT Tax Configuration' for LOADED_AND_DISPLAY_WITH_TAX

public mixed LOADED_AND_DISPLAY_WITH_TAX = '2'

TAXED

'FPT Tax Configuration' for TAXED

public mixed TAXED = '1'

XML_PATH_FPT_ENABLED

Config Path for FPT

public mixed XML_PATH_FPT_ENABLED = 'tax/weee/enable'

Properties

$_moduleName

Helper module name

protected string $_moduleName = 'Mage_Weee'

$_store

Current store, in the case of backend order, it could be different from admin store

protected Mage_Core_Model_Store $_store

$_storeDisplayConfig

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

$modulesDisabled

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

Methods

__()

Translate

public __() : string
Return values
string

escapeHtml()

Escape html entities

public escapeHtml(null|string|array<string|int, string> $data[, null|array<string|int, string> $allowedTags = null ]) : ($data is array ? ?string[] : ?string)
Parameters
$data : null|string|array<string|int, string>
$allowedTags : null|array<string|int, string> = null
Return values
($data is array ? ?string[] : ?string)

escapeScriptIdentifiers()

Remove `javascript:`, `vbscript:`, `data:` words from the string.

public escapeScriptIdentifiers(string $data) : string
Parameters
$data : string
Return values
string

escapeSpecial()

Remove `\t`,`\n`,`\r`,`\0`,`\x0B:` symbols from the string.

public escapeSpecial(string $data) : string
Parameters
$data : string
Return values
string

escapeUrl()

Escape html entities in url

public escapeUrl(string $data) : string
Parameters
$data : string
Return values
string

getAmount()

Get weee tax amount for product based on shipping and billing addresses, website and tax settings

public getAmount(Mage_Catalog_Model_Product $product[, null|Mage_Customer_Model_Address_Abstract $shipping = null ][, null|Mage_Customer_Model_Address_Abstract $billing = null ][, mixed $website = null ][, bool $calculateTaxes = false ]) : float
Parameters
$product : Mage_Catalog_Model_Product
$shipping : null|Mage_Customer_Model_Address_Abstract = null
$billing : null|Mage_Customer_Model_Address_Abstract = null
$website : mixed = null
$calculateTaxes : bool = false
Return values
float

getAmountInclTaxes()

Returns all summed weee taxes with all local taxes applied

public getAmountInclTaxes(array<string|int, mixed> $attributes) : float
Parameters
$attributes : array<string|int, mixed>

Array of \Maho\DataObject, result from getProductWeeeAttributes()

Tags
throws
Mage_Core_Exception
Return values
float

getBaseRowWeeeAmountAfterDiscount()

Calculate base row weee amount for an order, invoice or credit memo item The returned value may contain discount if the discount is not included in the discount for subtotal

public getBaseRowWeeeAmountAfterDiscount(mixed $item) : float
Parameters
$item : mixed
Return values
float

getEmailPriceDisplayType()

Get weee amount display type in email templates

public getEmailPriceDisplayType([bool|int|Mage_Core_Model_Store|null|string $store = null ]) : int
Parameters
$store : bool|int|Mage_Core_Model_Store|null|string = null
Return values
int

getListPriceDisplayType()

Get weee amount display type on product list page

public getListPriceDisplayType([bool|int|Mage_Core_Model_Store|null|string $store = null ]) : int
Parameters
$store : bool|int|Mage_Core_Model_Store|null|string = null
Return values
int

getPriceDisplayType()

Get weee amount display type on product view page

public getPriceDisplayType([bool|int|Mage_Core_Model_Store|null|string $store = null ]) : int
Parameters
$store : bool|int|Mage_Core_Model_Store|null|string = null
Return values
int

getProductWeeeAttributes()

Proxy for Mage_Weee_Model_Tax::getProductWeeeAttributes()

public getProductWeeeAttributes(Mage_Catalog_Model_Product $product[, null|false|DataObject $shipping = null ][, null|false|DataObject $billing = null ][, int|Mage_Core_Model_Website|null|string|true $website = null ][, bool $calculateTaxes = false ]) : array<string|int, mixed>
Parameters
$product : Mage_Catalog_Model_Product
$shipping : null|false|DataObject = null
$billing : null|false|DataObject = null
$website : int|Mage_Core_Model_Website|null|string|true = null
$calculateTaxes : bool = false
Return values
array<string|int, mixed>

getProductWeeeAttributesForDisplay()

Returns array of weee attributes allowed for display

public getProductWeeeAttributesForDisplay(Mage_Catalog_Model_Product $product) : array<string|int, mixed>
Parameters
$product : Mage_Catalog_Model_Product
Return values
array<string|int, mixed>

getProductWeeeAttributesForRenderer()

Get Product Weee attributes for price renderer

public getProductWeeeAttributesForRenderer(Mage_Catalog_Model_Product $product[, null|false|DataObject $shipping = null ][, null|false|DataObject $billing = null ][, int|Mage_Core_Model_Website|null|string|true $website = null ][, mixed $calculateTaxes = false ]) : array<string|int, mixed>
Parameters
$product : Mage_Catalog_Model_Product
$shipping : null|false|DataObject = null

Shipping Address

$billing : null|false|DataObject = null

Billing Address

$website : int|Mage_Core_Model_Website|null|string|true = null
$calculateTaxes : mixed = false
Return values
array<string|int, mixed>

getRowWeeeAmountAfterDiscount()

Calculate row weee amount for an order, invoice or credit memo item The returned value may contain discount if the discount is not included in the discount for subtotal

public getRowWeeeAmountAfterDiscount(mixed $item) : float
Parameters
$item : mixed
Return values
float

getSalesPriceDisplayType()

Get weee amount display type in sales modules

public getSalesPriceDisplayType([bool|int|Mage_Core_Model_Store|null|string $store = null ]) : int
Parameters
$store : bool|int|Mage_Core_Model_Store|null|string = null
Return values
int

hasTags()

Check for tags in multidimensional arrays

public hasTags(string|array<string|int, mixed> $data[, array<string|int, mixed> $arrayKeys = [] ][, bool $skipTags = true ]) : bool
Parameters
$data : string|array<string|int, mixed>
$arrayKeys : array<string|int, mixed> = []

keys of the array being checked that are excluded and included in the check

$skipTags : bool = true

skip transferred array keys, if false then check only them

Return values
bool

includeInSubtotal()

Check if weee tax amount should be included to subtotal

public includeInSubtotal([bool|int|Mage_Core_Model_Store|null|string $store = null ]) : bool
Parameters
$store : bool|int|Mage_Core_Model_Store|null|string = null
Return values
bool

isDiscounted()

Check if weee tax amount should be discounted

public isDiscounted([bool|int|Mage_Core_Model_Store|null|string $store = null ]) : bool
Parameters
$store : bool|int|Mage_Core_Model_Store|null|string = null
Return values
bool

isModuleEnabled()

Check is module exists and enabled in global config.

public isModuleEnabled([string $moduleName = null ]) : bool
Parameters
$moduleName : string = null

the full module name, example Mage_Core

Return values
bool

isModuleOutputEnabled()

Check whether the module output is enabled in Configuration

public isModuleOutputEnabled([string $moduleName = null ]) : bool
Parameters
$moduleName : string = null

Full module name

Return values
bool

isTaxIncluded()

Returns true if default store tax is already applied to the FPT(weee)

public isTaxIncluded([bool|int|Mage_Core_Model_Store|null|string $store = null ]) : bool
Parameters
$store : bool|int|Mage_Core_Model_Store|null|string = null
Return values
bool

processTierPrices()

Adds HTML containers and formats tier prices accordingly to the currency used

public processTierPrices(Mage_Catalog_Model_Product $product, array<string|int, mixed> &$tierPrices[, bool $includeIndex = true ]) : $this
Parameters
$product : Mage_Catalog_Model_Product
$tierPrices : array<string|int, mixed>
$includeIndex : bool = true
Return values
$this

quoteEscape()

Escape quotes inside html attributes Use $addSlashes = false for escaping js that inside html attribute (onClick, onSubmit etc)

public quoteEscape(string $data[, bool $addSlashes = false ]) : string
Parameters
$data : string
$addSlashes : bool = false
Return values
string

removeTags()

Remove html tags, but leave "<" and ">" signs

public removeTags(string $html) : string
Parameters
$html : string
Return values
string

setWeeeTaxesAppliedProperty()

Set a value to a specific property searching FPT by title for the Item

public setWeeeTaxesAppliedProperty(Mage_Core_Model_Abstract $item, string $title, string $property, string $value) : mixed
Parameters
$item : Mage_Core_Model_Abstract
$title : string
$property : string
$value : string

stripTags()

Wrapper for standard strip_tags() function with extra functionality for html entities

public stripTags(string $data[, null|string|array<string|int, string> $allowableTags = null ][, bool $escape = false ]) : string
Parameters
$data : string
$allowableTags : null|string|array<string|int, string> = null
$escape : bool = false
Return values
string

translateArray()

Translate array

public translateArray([mixed $arr = [] ]) : array<string|int, mixed>

@param array $arr

Parameters
$arr : mixed = []
Return values
array<string|int, mixed>

typeOfDisplay()

Returns display type for price accordingly to current zone

public typeOfDisplay(mixed $product[, array<string|int, mixed>|int|null $compareTo = null ][, string $zone = null ][, Mage_Core_Model_Store $store = null ]) : bool|int
Parameters
$product : mixed
$compareTo : array<string|int, mixed>|int|null = null
$zone : string = null
$store : Mage_Core_Model_Store = null
Return values
bool|int

urlDecode()

base64_decode() for URLs decoding

public urlDecode(mixed $url) : string

@param string $url

Parameters
$url : mixed
Return values
string

urlDecodeAndEscape()

base64_decode() and escape quotes in url

public urlDecodeAndEscape(mixed $url) : string

@param string $url

Parameters
$url : mixed
Return values
string

urlEncode()

base64_encode() for URLs encoding

public urlEncode(mixed $url) : string

@param string $url

Parameters
$url : mixed
Return values
string

validateCatalogPricesAndFptConfiguration()

Check if the configuration for the particular store causes conflicts

public validateCatalogPricesAndFptConfiguration([Mage_Core_Model_Store|null $store = null ]) : bool
Parameters
$store : Mage_Core_Model_Store|null = null
Return values
bool

_getModuleName()

Retrieve helper module name

protected _getModuleName() : string
Return values
string

_getUrl()

Retrieve url

protected _getUrl(string $route[, array<string|int, mixed> $params = [] ]) : string
Parameters
$route : string
$params : array<string|int, mixed> = []
Return values
string

_loadCache()

Loading cache data

protected _loadCache(string $id) : mixed
Parameters
$id : string

_saveCache()

Saving cache

protected _saveCache(mixed $data, string $id[, array<string|int, mixed> $tags = [] ][, null|false|int $lifeTime = false ]) : Mage_Core_Helper_Abstract
Parameters
$data : mixed
$id : string
$tags : array<string|int, mixed> = []
$lifeTime : null|false|int = false
Return values
Mage_Core_Helper_Abstract
On this page

Search results