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.
Magento – check if price is being displayed tax included
magento-1.9priceproduct-view
Best Answer
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 oftax_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:
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 underpath
=tax/display/type
.