Overview

Packages

  • currencysymbol
  • MAbout
  • Mage
    • Admin
    • Adminhtml
    • AdminNotification
    • Api
    • Api2
    • Authorizenet
    • Backup
    • Bundle
    • Captcha
    • Catalog
    • CatalogIndex
    • CatalogInventory
    • CatalogRule
    • CatalogSearch
    • Centinel
    • Checkout
    • Cms
    • Compiler
    • Connect
    • Contacts
    • Core
    • Cron
    • CurrencySymbol
    • Customer
    • Dataflow
    • Directory
    • DirtectPost
    • Downloadable
    • Eav
    • GiftMessage
    • GoogleAnalytics
    • GoogleBase
    • GoogleCheckout
    • ImportExport
    • Index
    • Install
    • Log
    • Media
    • Newsletter
    • Oauth
    • Page
    • PageCache
    • Paygate
    • Payment
    • Paypal
    • PaypalUk
    • Persistent
    • Poll
    • ProductAlert
    • Rating
    • Reports
    • Review
    • Rss
    • Rule
    • Sales
    • SalesRule
    • Sedfriend
    • Sendfriend
    • Shipping
    • Sitemap
    • Tag
    • Tax
    • Usa
    • Weee
    • Widget
    • Wishlist
    • XmlConnect
  • None
  • Phoenix
    • Moneybookers
  • PHP
  • Zend
    • Date
    • Mime
    • XmlRpc

Classes

  • Mage_Tax_Block_Adminhtml_Frontend_Region_Updater
  • Mage_Tax_Block_Checkout_Discount
  • Mage_Tax_Block_Checkout_Grandtotal
  • Mage_Tax_Block_Checkout_Shipping
  • Mage_Tax_Block_Checkout_Subtotal
  • Mage_Tax_Block_Checkout_Tax
  • Mage_Tax_Block_Sales_Order_Tax
  • Mage_Tax_Helper_Data
  • Mage_Tax_Model_Calculation
  • Mage_Tax_Model_Calculation_Rate
  • Mage_Tax_Model_Calculation_Rate_Title
  • Mage_Tax_Model_Calculation_Rule
  • Mage_Tax_Model_Class
  • Mage_Tax_Model_Class_Source_Customer
  • Mage_Tax_Model_Class_Source_Product
  • Mage_Tax_Model_Config
  • Mage_Tax_Model_Config_Price_Include
  • Mage_Tax_Model_Mysql4_Calculation
  • Mage_Tax_Model_Mysql4_Calculation_Collection
  • Mage_Tax_Model_Mysql4_Calculation_Rate
  • Mage_Tax_Model_Mysql4_Calculation_Rate_Collection
  • Mage_Tax_Model_Mysql4_Calculation_Rate_Title
  • Mage_Tax_Model_Mysql4_Calculation_Rate_Title_Collection
  • Mage_Tax_Model_Mysql4_Calculation_Rule
  • Mage_Tax_Model_Mysql4_Calculation_Rule_Collection
  • Mage_Tax_Model_Mysql4_Class
  • Mage_Tax_Model_Mysql4_Class_Collection
  • Mage_Tax_Model_Mysql4_Report_Collection
  • Mage_Tax_Model_Mysql4_Report_Tax
  • Mage_Tax_Model_Mysql4_Report_Updatedat_Collection
  • Mage_Tax_Model_Mysql4_Sales_Order_Tax
  • Mage_Tax_Model_Mysql4_Sales_Order_Tax_Collection
  • Mage_Tax_Model_Mysql4_Setup
  • Mage_Tax_Model_Observer
  • Mage_Tax_Model_Resource_Calculation
  • Mage_Tax_Model_Resource_Calculation_Collection
  • Mage_Tax_Model_Resource_Calculation_Rate
  • Mage_Tax_Model_Resource_Calculation_Rate_Collection
  • Mage_Tax_Model_Resource_Calculation_Rate_Title
  • Mage_Tax_Model_Resource_Calculation_Rate_Title_Collection
  • Mage_Tax_Model_Resource_Calculation_Rule
  • Mage_Tax_Model_Resource_Calculation_Rule_Collection
  • Mage_Tax_Model_Resource_Class
  • Mage_Tax_Model_Resource_Class_Collection
  • Mage_Tax_Model_Resource_Report_Collection
  • Mage_Tax_Model_Resource_Report_Tax
  • Mage_Tax_Model_Resource_Report_Tax_Createdat
  • Mage_Tax_Model_Resource_Report_Tax_Updatedat
  • Mage_Tax_Model_Resource_Report_Updatedat_Collection
  • Mage_Tax_Model_Resource_Sales_Order_Tax
  • Mage_Tax_Model_Resource_Sales_Order_Tax_Collection
  • Mage_Tax_Model_Resource_Sales_Order_Tax_Item
  • Mage_Tax_Model_Resource_Sales_Order_Tax_Item_Collection
  • Mage_Tax_Model_Resource_Setup
  • Mage_Tax_Model_Sales_Order_Tax
  • Mage_Tax_Model_Sales_Order_Tax_Item
  • Mage_Tax_Model_Sales_Pdf_Grandtotal
  • Mage_Tax_Model_Sales_Pdf_Shipping
  • Mage_Tax_Model_Sales_Pdf_Subtotal
  • Mage_Tax_Model_Sales_Pdf_Tax
  • Mage_Tax_Model_Sales_Total_Quote_Discount
  • Mage_Tax_Model_Sales_Total_Quote_Nominal_Subtotal
  • Mage_Tax_Model_Sales_Total_Quote_Nominal_Tax
  • Mage_Tax_Model_Sales_Total_Quote_Shipping
  • Mage_Tax_Model_Sales_Total_Quote_Subtotal
  • Mage_Tax_Model_Sales_Total_Quote_Tax
  • Mage_Tax_Model_System_Config_Source_Algorithm
  • Mage_Tax_Model_System_Config_Source_Apply
  • Mage_Tax_Model_System_Config_Source_PriceType
  • Mage_Tax_Model_System_Config_Source_Tax_Country
  • Mage_Tax_Model_System_Config_Source_Tax_Display_Type
  • Mage_Tax_Model_System_Config_Source_Tax_Region

Exceptions

  • Mage_Tax_Exception
  • Overview
  • Package
  • Class
  • Tree

Class Mage_Tax_Helper_Data

Catalog data helper

Mage_Core_Helper_Abstract
Extended by Mage_Tax_Helper_Data
Package: Mage\Tax
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Located at code/core/Mage/Tax/Helper/Data.php
Methods summary
public
# __construct( )
public integer
# getPostCodeSubStringLength( )

Return max postcode length to create search templates

Return max postcode length to create search templates

Returns

integer
$len
public Mage_Tax_Model_Config
# getConfig( )

Get tax configuration object

Get tax configuration object

Returns

Mage_Tax_Model_Config
public Mage_Tac_Model_Calculation
# getCalculator( )

Get tax calculation object

Get tax calculation object

Returns

Mage_Tac_Model_Calculation
public float|string
# getProductPrice( Mage_Catalog_Model_Product $product, null|string $format = null )

Get product price including store convertion rate

Get product price including store convertion rate

Parameters

$product
Mage_Catalog_Model_Product
$product
$format
null|string
$format

Returns

float|string
public boolean
# priceIncludesTax( mix $store = null )

Check if product prices inputed include tax

Check if product prices inputed include tax

Parameters

$store
mix
$store

Returns

boolean
public boolean
# applyTaxAfterDiscount( mixed $store = null )

Check what taxes should be applied after discount

Check what taxes should be applied after discount

Parameters

$store
mixed
$store

Returns

boolean
public
# getIncExcText( boolean $flag, mixed $store = null )

Output

Output

Parameters

$flag
boolean
$includes
$store
public integer
# getPriceDisplayType( mixed $store = null )

Get product price display type
1 - Excluding tax
2 - Including tax
3 - Both

Get product price display type 1 - Excluding tax 2 - Including tax 3 - Both

Parameters

$store
mixed
$store

Returns

integer
public false
# needPriceConversion( mixed $store = null )

Check if necessary do product price conversion If it necessary will be returned conversion type (minus or plus)

Check if necessary do product price conversion If it necessary will be returned conversion type (minus or plus)

Parameters

$store
mixed
$store

Returns

false
| int
public boolean
# displayFullSummary( mixed $store = null )

Check if need display full tax summary information in totals block

Check if need display full tax summary information in totals block

Parameters

$store
mixed
$store

Returns

boolean
public boolean
# displayZeroTax( mixed $store = null )

Check if need display zero tax in subtotal

Check if need display zero tax in subtotal

Parameters

$store
mixed
$store

Returns

boolean
public boolean
# displayCartPriceInclTax( mixed $store = null )

Check if need display cart prices included tax

Check if need display cart prices included tax

Parameters

$store
mixed
$store

Returns

boolean
public boolean
# displayCartPriceExclTax( mixed $store = null )

Check if need display cart prices excluding price

Check if need display cart prices excluding price

Parameters

$store
mixed
$store

Returns

boolean
public boolean
# displayCartBothPrices( mixed $store = null )

Check if need display cart prices excluding and including tax

Check if need display cart prices excluding and including tax

Parameters

$store
mixed
$store

Returns

boolean
public boolean
# displaySalesPriceInclTax( mixed $store = null )

Check if need display order prices included tax

Check if need display order prices included tax

Parameters

$store
mixed
$store

Returns

boolean
public boolean
# displaySalesPriceExclTax( mixed $store = null )

Check if need display order prices excluding price

Check if need display order prices excluding price

Parameters

$store
mixed
$store

Returns

boolean
public boolean
# displaySalesBothPrices( mixed $store = null )

Check if need display order prices excluding and including tax

Check if need display order prices excluding and including tax

Parameters

$store
mixed
$store

Returns

boolean
public boolean
# displaySalesSubtotalBoth( mixed $store = null )

Check if we need display price include and exclude tax for order/invoice subtotal

Check if we need display price include and exclude tax for order/invoice subtotal

Parameters

$store
mixed
$store

Returns

boolean
public boolean
# displaySalesSubtotalInclTax( mixed $store = null )

Check if we need display price include tax for order/invoice subtotal

Check if we need display price include tax for order/invoice subtotal

Parameters

$store
mixed
$store

Returns

boolean
public boolean
# displaySalesSubtotalExclTax( mixed $store = null )

Check if we need display price exclude tax for order/invoice subtotal

Check if we need display price exclude tax for order/invoice subtotal

Parameters

$store
mixed
$store

Returns

boolean
public boolean
# displayTaxColumn( mixed $store = null )

Check if need display tax column in for shopping cart/order items

Check if need display tax column in for shopping cart/order items

Parameters

$store
mixed
$store

Returns

boolean
public string
# getPriceFormat( mixed $store = null )

Get prices javascript format json

Get prices javascript format json

Parameters

$store
mixed
$store

Returns

string
public string
# getAllRatesByProductClass( mixed $store = null )

Get all tax rates JSON for all product tax classes of specific store

Get all tax rates JSON for all product tax classes of specific store

array( value_{$productTaxVlassId} => $rate )

Returns

string
protected string
# _getAllRatesByProductClass( mixed $store = null )

Get all tax rates JSON for all product tax classes of specific store

Get all tax rates JSON for all product tax classes of specific store

array( value_{$productTaxVlassId} => $rate )

Returns

string
public float
# getPrice( Mage_Catalog_Model_Product $product, float $price, boolean $includingTax = null, null|Mage_Customer_Model_Address $shippingAddress = null, null|Mage_Customer_Model_Address $billingAddress = null, null|integer $ctc = null, mixed $store = null, boolean $priceIncludesTax = null )

Get product price with all tax settings processing

Get product price with all tax settings processing

Parameters

$product
Mage_Catalog_Model_Product
$product
$price
float
$price inputed product price
$includingTax
boolean
$includingTax return price include tax flag
$shippingAddress
null|Mage_Customer_Model_Address
$shippingAddress
$billingAddress
null|Mage_Customer_Model_Address
$billingAddress
$ctc
null|integer
$ctc customer tax class
$store
mixed
$store
$priceIncludesTax
boolean
$priceIncludesTax flag what price parameter contain tax

Returns

float
public boolean
# displayPriceIncludingTax( )

Check if we have display in catalog prices including tax

Check if we have display in catalog prices including tax

Returns

boolean
public boolean
# displayPriceExcludingTax( )

Check if we have display in catalog prices excluding tax

Check if we have display in catalog prices excluding tax

Returns

boolean
public boolean
# displayBothPrices( )

Check if we have display in catalog prices including and excluding tax

Check if we have display in catalog prices including and excluding tax

Returns

boolean
protected float
# _calculatePrice( float $price, float $percent, boolean $type )

Calculate price imcluding/excluding tax base on tax rate percent

Calculate price imcluding/excluding tax base on tax rate percent

Parameters

$price
float
$price
$percent
float
$percent
$type
boolean
$type true - for calculate price including tax and false if price excluding tax

Returns

float
public
# getIncExcTaxLabel( mixed $flag )
public
# shippingPriceIncludesTax( mixed $store = null )
public
# getShippingPriceDisplayType( mixed $store = null )
public
# displayShippingPriceIncludingTax( )
public
# displayShippingPriceExcludingTax( )
public
# displayShippingBothPrices( )
public
# getShippingTaxClass( mixed $store )
public float
# getShippingPrice( mixed $price, mixed $includingTax = null, mixed $shippingAddress = null, mixed $ctc = null, mixed $store = null )

Get shipping price

Get shipping price

Returns

float
public
# getPriceTaxSql( mixed $priceField, mixed $taxClassField )
public Mage_Tax_Helper_Data
# joinTaxClass( Varien_Db_Select $select, integer $storeId, string $priceTable = 'main_table' )

Join tax class

Join tax class

Parameters

$select
Varien_Db_Select
$select
$storeId
integer
$storeId
$priceTable
string
$priceTable

Returns

Mage_Tax_Helper_Data
public 0|1
# discountTax( null|integer $store = null )

Get configuration setting "Apply Discount On Prices Including Tax" value

Get configuration setting "Apply Discount On Prices Including Tax" value

Parameters

$store
null|integer
$store

Returns

0|1
public 0|1
# getTaxBasedOn( mixed $store = null )

Get value of "Apply Tax On" custom/original price configuration settings

Get value of "Apply Tax On" custom/original price configuration settings

Parameters

$store
mixed
$store

Returns

0|1
public boolean
# applyTaxOnCustomPrice( mixed $store = null )

Check if tax can be applied to custom price

Check if tax can be applied to custom price

Parameters

$store
mixed
$store

Returns

boolean
public boolean
# applyTaxOnOriginalPrice( mixed $store = null )

Check if tax should be applied just to original price

Check if tax should be applied just to original price

Parameters

$store
mixed
$store

Returns

boolean
public string
# getCalculationSequence( null|integer|string|Mage_Core_Model_Store $store = null )

Get taxes/discounts calculation sequence. This sequence depends on "Catalog price include tax", "Apply Tax After Discount" and "Apply Discount On Prices Including Tax" configuration options.

Get taxes/discounts calculation sequence. This sequence depends on "Catalog price include tax", "Apply Tax After Discount" and "Apply Discount On Prices Including Tax" configuration options.

Parameters

$store
null|integer|string|Mage_Core_Model_Store
$store

Returns

string
public string
# getCalculationAgorithm( null|integer $store = null )

Get tax caclulation algorithm code

Get tax caclulation algorithm code

Parameters

$store
null|integer
$store

Returns

string
public array
# getCalculatedTaxes( Mage_Sales_Model_Order $source )

Get calculated taxes for each tax class

Get calculated taxes for each tax class

This method returns array with format: array( $index => array( 'tax_amount' => $taxAmount, 'base_tax_amount' => $baseTaxAmount, 'hidden_tax_amount' => $hiddenTaxAmount 'title' => $title 'percent' => $percent ) )

Parameters

$source
Mage_Sales_Model_Order
$source

Returns

array
public array
# getShippingTax( Mage_Sales_Model_Order $source )

Get calculated Shipping & Handling Tax

Get calculated Shipping & Handling Tax

This method returns array with format: array( $index => array( 'tax_amount' => $taxAmount, 'base_tax_amount' => $baseTaxAmount, 'hidden_tax_amount' => $hiddenTaxAmount 'title' => $title 'percent' => $percent ) )

Parameters

$source
Mage_Sales_Model_Order
$source

Returns

array
Methods inherited from Mage_Core_Helper_Abstract
__(), _cleanCache(), _getModuleName(), _getRequest(), _getUrl(), _loadCache(), _removeCache(), _saveCache(), escapeHtml(), escapeUrl(), getLayout(), isModuleEnabled(), isModuleOutputEnabled(), jsQuoteEscape(), quoteEscape(), removeTags(), setLayout(), stripTags(), translateArray(), urlDecode(), urlEncode()
Constants summary
integer PRICE_CONVERSION_PLUS 1
#
integer PRICE_CONVERSION_MINUS 2
#
Properties summary
protected Mage_Tax_Model_Config $_config null
#

Tax configuration object

Tax configuration object

protected mixed $_calculator null
#
protected mixed $_displayTaxColumn
#
protected mixed $_taxData
#
protected mixed $_priceIncludesTax
#
protected mixed $_shippingPriceIncludesTax
#
protected mixed $_applyTaxAfterDiscount
#
protected mixed $_priceDisplayType
#
protected mixed $_shippingPriceDisplayType
#
protected integer $_postCodeSubStringLength 10
#

Postcode cut to this length when creating search templates

Postcode cut to this length when creating search templates

Properties inherited from Mage_Core_Helper_Abstract
$_layout, $_moduleName, $_request
Magento 1.7.0.2 API documentation generated by ApiGen 2.8.0