Class Mage_Tax_Helper_Data

Description

Catalog data helper

Located in /Tax/Helper/Data.php (line 30)

Mage_Core_Helper_Abstract
   |
   --Mage_Tax_Helper_Data
Class Constant Summary
Variable Summary
Method Summary
Mage_Tax_Helper_Data __construct ()
bool applyTaxAfterDiscount ([mixed $store = null])
bool applyTaxOnCustomPrice ([$store $store = null])
bool applyTaxOnOriginalPrice ([$store $store = null])
01 discountTax ([null|int $store = null])
bool displayCartBothPrices ([mixed $store = null])
bool displayCartPriceExclTax ([mixed $store = null])
bool displayCartPriceInclTax ([mixed $store = null])
bool displayFullSummary ([mixed $store = null])
bool displaySalesBothPrices ([mixed $store = null])
bool displaySalesPriceExclTax ([mixed $store = null])
bool displaySalesPriceInclTax ([mixed $store = null])
bool displaySalesSubtotalBoth ([mixed $store = null])
bool displaySalesSubtotalExclTax ([mixed $store = null])
bool displaySalesSubtotalInclTax ([mixed $store = null])
bool displayTaxColumn ([mixed $store = null])
bool displayZeroTax ([mixed $store = null])
string getAllRatesByProductClass ([ $store = null])
string getCalculationAgorithm ([null|int $store = null])
string getCalculationSequence ([null|int|string|Mage_Core_Model_Store $store = null])
Mage_Tac_Model_Calculation getCalculator ()
void getIncExcTaxLabel ( $flag)
void getIncExcText ( $flag, [ $store = null], boolean $includes)
float getPrice (Mage_Catalog_Model_Product $product, float $price, [bool $includingTax = null], [null|Mage_Customer_Model_Address $shippingAddress = null], [null|Mage_Customer_Model_Address $billingAddress = null], [null|int $ctc = null], [mixed $store = null], [bool $priceIncludesTax = null])
int getPriceDisplayType ([mixed $store = null])
string getPriceFormat ([mixed $store = null])
void getPriceTaxSql ( $priceField,  $taxClassField)
float|string getProductPrice (Mage_Catalog_Model_Product $product, [null|string $format = null])
float getShippingPrice ( $price, [ $includingTax = null], [ $shippingAddress = null], [ $ctc = null], [ $store = null])
void getShippingPriceDisplayType ([ $store = null])
void getShippingTaxClass ( $store)
01 getTaxBasedOn ([$store $store = null])
void joinTaxClass ( $select,  $storeId, [ $priceTable = 'main_table'])
false needPriceConversion ([mixed $store = null])
bool priceIncludesTax ([mix $store = null])
void shippingPriceIncludesTax ([ $store = null])
float _calculatePrice (float $price, float $percent, bool $type)
string _getAllRatesByProductClass ([ $store = null])
Variables
mixed $_applyTaxAfterDiscount (line 46)
  • access: protected
mixed $_calculator = null (line 41)
  • access: protected
Mage_Tax_Model_Config $_config = null (line 40)

Tax configuration object

  • access: protected
mixed $_displayTaxColumn (line 42)
  • access: protected
integer $_postCodeSubStringLength = 10 (line 55)

Postcode cut to this length when creating search templates

  • access: protected
mixed $_priceDisplayType (line 47)
  • access: protected
mixed $_priceIncludesTax (line 44)
  • access: protected
mixed $_shippingPriceDisplayType (line 48)
  • access: protected
mixed $_shippingPriceIncludesTax (line 45)
  • access: protected
mixed $_taxData (line 43)
  • access: protected

Inherited Variables

Inherited from Mage_Core_Helper_Abstract

Mage_Core_Helper_Abstract::$_layout
Mage_Core_Helper_Abstract::$_moduleName
Mage_Core_Helper_Abstract::$_request
Methods
Constructor __construct (line 57)
  • access: public
Mage_Tax_Helper_Data __construct ()
applyTaxAfterDiscount (line 135)

Check what taxes should be applied after discount

  • access: public
bool applyTaxAfterDiscount ([mixed $store = null])
  • mixed $store
applyTaxOnCustomPrice (line 712)

Check if tax can be applied to custom price

  • access: public
bool applyTaxOnCustomPrice ([$store $store = null])
  • $store $store
applyTaxOnOriginalPrice (line 723)

Check if tax should be applied just to original price

  • access: public
bool applyTaxOnOriginalPrice ([$store $store = null])
  • $store $store
discountTax (line 690)

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

  • access: public
01 discountTax ([null|int $store = null])
  • null|int $store
displayBothPrices (line 532)

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

  • access: public
bool displayBothPrices ()
displayCartBothPrices (line 253)

Check if need display cart prices excluding and including tax

  • access: public
bool displayCartBothPrices ([mixed $store = null])
  • mixed $store
displayCartPriceExclTax (line 242)

Check if need display cart prices excluding price

  • access: public
bool displayCartPriceExclTax ([mixed $store = null])
  • mixed $store
displayCartPriceInclTax (line 231)

Check if need display cart prices included tax

  • access: public
bool displayCartPriceInclTax ([mixed $store = null])
  • mixed $store
displayFullSummary (line 209)

Check if need display full tax summary information in totals block

  • access: public
bool displayFullSummary ([mixed $store = null])
  • mixed $store
displayPriceExcludingTax (line 522)

Check if we have display in catalog prices excluding tax

  • access: public
bool displayPriceExcludingTax ()
displayPriceIncludingTax (line 512)

Check if we have display in catalog prices including tax

  • access: public
bool displayPriceIncludingTax ()
displaySalesBothPrices (line 286)

Check if need display order prices excluding and including tax

  • access: public
bool displaySalesBothPrices ([mixed $store = null])
  • mixed $store
displaySalesPriceExclTax (line 275)

Check if need display order prices excluding price

  • access: public
bool displaySalesPriceExclTax ([mixed $store = null])
  • mixed $store
displaySalesPriceInclTax (line 264)

Check if need display order prices included tax

  • access: public
bool displaySalesPriceInclTax ([mixed $store = null])
  • mixed $store
displaySalesSubtotalBoth (line 298)

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

  • access: public
bool displaySalesSubtotalBoth ([mixed $store = null])
  • mixed $store
displaySalesSubtotalExclTax (line 320)

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

  • access: public
bool displaySalesSubtotalExclTax ([mixed $store = null])
  • mixed $store
displaySalesSubtotalInclTax (line 309)

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

  • access: public
bool displaySalesSubtotalInclTax ([mixed $store = null])
  • mixed $store
displayShippingBothPrices (line 580)
  • access: public
void displayShippingBothPrices ()
displayShippingPriceExcludingTax (line 575)
  • access: public
void displayShippingPriceExcludingTax ()
displayShippingPriceIncludingTax (line 570)
  • access: public
void displayShippingPriceIncludingTax ()
displayTaxColumn (line 331)

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

  • access: public
bool displayTaxColumn ([mixed $store = null])
  • mixed $store
displayZeroTax (line 220)

Check if need display zero tax in subtotal

  • access: public
bool displayZeroTax ([mixed $store = null])
  • mixed $store
getAllRatesByProductClass (line 369)

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

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

  • access: public
string getAllRatesByProductClass ([ $store = null])
  • $store
getCalculationAgorithm (line 747)

Get tax caclulation algorithm code

  • access: public
string getCalculationAgorithm ([null|int $store = null])
  • null|int $store
getCalculationSequence (line 736)

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.

  • access: public
string getCalculationSequence ([null|int|string|Mage_Core_Model_Store $store = null])
getCalculator (line 91)

Get tax calculation object

  • access: public
Mage_Tac_Model_Calculation getCalculator ()
getConfig (line 81)

Get tax configuration object

  • access: public
Mage_Tax_Model_Config getConfig ()
getIncExcTaxLabel (line 554)
  • access: public
void getIncExcTaxLabel ( $flag)
  • $flag
getIncExcText (line 145)

Output

  • access: public
void getIncExcText ( $flag, [ $store = null], boolean $includes)
  • boolean $includes
  • $flag
  • $store
getPostCodeSubStringLength (line 67)

Return max postcode length to create search templates

  • access: public
integer getPostCodeSubStringLength ()
getPrice (line 409)

Get product price with all tax settings processing

  • access: public
float getPrice (Mage_Catalog_Model_Product $product, float $price, [bool $includingTax = null], [null|Mage_Customer_Model_Address $shippingAddress = null], [null|Mage_Customer_Model_Address $billingAddress = null], [null|int $ctc = null], [mixed $store = null], [bool $priceIncludesTax = null])
getPriceDisplayType (line 164)

Get product price display type

  1. - Excluding tax
  2. - Including tax
  3. - Both

  • access: public
int getPriceDisplayType ([mixed $store = null])
  • mixed $store
getPriceFormat (line 342)

Get prices javascript format json

  • access: public
string getPriceFormat ([mixed $store = null])
  • mixed $store
getPriceTaxSql (line 618)
  • access: public
void getPriceTaxSql ( $priceField,  $taxClassField)
  • $priceField
  • $taxClassField
getProductPrice (line 106)

Get product price including store convertion rate

  • access: public
float|string getProductPrice (Mage_Catalog_Model_Product $product, [null|string $format = null])
getShippingPrice (line 595)

Get shipping price

  • access: public
float getShippingPrice ( $price, [ $includingTax = null], [ $shippingAddress = null], [ $ctc = null], [ $store = null])
  • $price
  • $includingTax
  • $shippingAddress
  • $ctc
  • $store
getShippingPriceDisplayType (line 565)
  • access: public
void getShippingPriceDisplayType ([ $store = null])
  • $store
getShippingTaxClass (line 585)
  • access: public
void getShippingTaxClass ( $store)
  • $store
getTaxBasedOn (line 701)

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

  • access: public
01 getTaxBasedOn ([$store $store = null])
  • $store $store
getTaxRatesByProductClass (line 356)

Get all tax rates JSON for all product tax classes

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

  • deprecated: after 1.4 - please use getAllRatesByProductClass
  • access: public
string getTaxRatesByProductClass ()
joinTaxClass (line 669)
  • access: public
void joinTaxClass ( $select,  $storeId, [ $priceTable = 'main_table'])
  • $select
  • $storeId
  • $priceTable
needPriceConversion (line 176)

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

  • return: | int
  • access: public
false needPriceConversion ([mixed $store = null])
  • mixed $store
priceIncludesTax (line 124)

Check if product prices inputed include tax

  • access: public
bool priceIncludesTax ([mix $store = null])
  • mix $store
shippingPriceIncludesTax (line 560)
  • access: public
void shippingPriceIncludesTax ([ $store = null])
  • $store
_calculatePrice (line 545)

Calculate price imcluding/excluding tax base on tax rate percent

  • access: protected
float _calculatePrice (float $price, float $percent, bool $type)
  • float $price
  • float $percent
  • bool $type: true - for calculate price including tax and false if price excluding tax
_getAllRatesByProductClass (line 383)

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

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

  • access: protected
string _getAllRatesByProductClass ([ $store = null])
  • $store

Inherited Methods

Inherited From Mage_Core_Helper_Abstract

Mage_Core_Helper_Abstract::escapeHtml()
Mage_Core_Helper_Abstract::escapeUrl()
Mage_Core_Helper_Abstract::getLayout()
Mage_Core_Helper_Abstract::htmlEscape()
Mage_Core_Helper_Abstract::isModuleEnabled()
Mage_Core_Helper_Abstract::isModuleOutputEnabled()
Mage_Core_Helper_Abstract::jsQuoteEscape()
Mage_Core_Helper_Abstract::setLayout()
Mage_Core_Helper_Abstract::stripTags()
Mage_Core_Helper_Abstract::translateArray()
Mage_Core_Helper_Abstract::urlDecode()
Mage_Core_Helper_Abstract::urlEncode()
Mage_Core_Helper_Abstract::urlEscape()
Mage_Core_Helper_Abstract::_cleanCache()
Mage_Core_Helper_Abstract::_getModuleName()
Mage_Core_Helper_Abstract::_getRequest()
Mage_Core_Helper_Abstract::_getUrl()
Mage_Core_Helper_Abstract::_loadCache()
Mage_Core_Helper_Abstract::_removeCache()
Mage_Core_Helper_Abstract::_saveCache()
Mage_Core_Helper_Abstract::__()
Class Constants
PRICE_CONVERSION_MINUS = 2 (line 33)
PRICE_CONVERSION_PLUS = 1 (line 32)

Documentation generated on Fri, 11 Feb 2011 17:00:37 +0200 by phpDocumentor 1.4.3