1

I am overriding the price.phtml template because I need to display a label. When in the backend, the "Tax Display Type" setting catalog products is set to 'Tax Included' but I don't know how to perform this check.

1 Answer 1

7

From what I can tell, you're trying to get the configuration setting which determines how Taxes are displayed in the Catalog in Magento. This setting can be found in System -> Configuration -> (Sales)Tax -> Price Display Settings

If you look at the dropdown for "Display Product Price in Catalog" you can see that the <select> has three values of 1,2,3 and an id of tax_display_type.

Now to take all this information we found and translate it into code:

Retrieving any data that this field stores in the database uses the following code:

$tax_display_type = Mage::getStoreConfig(
                   'tax/display/type',
                   Mage::app()->getStore()
               ); 

This will return 1,2 or 3 depending on what you have set that dropdown to. As an aside, these settings are stored in the core_config_data table under path = tax/display/type.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.