Magento, price helper code snippet

Here is a little code snippet as requested from one of my readers :). Hope you find it useful.

<?php 
$_coreHelper = $this->helper(’core’);
$_taxHelper = $this->helper(’tax’);
$_finalPriceInclTax = $_taxHelper->getPrice($_product, $_product->getFinalPrice(), true);
$_finalPriceInclTaxNicelyFormated = $_coreHelper->currency($_finalPriceInclTax,true,false);
 
echo $_finalPriceInclTaxNicelyFormated;
?>

You made it all the way down here so you must have enjoyed this post! You may also like:

The time has come to… make some plans if you’re on Magento 1 Aron Stanic
, | 1

The time has come to… make some plans if you’re on Magento 1

How to generate SSH keys for Git authorization Hrvoje Ivancic
, | 15

How to generate SSH keys for Git authorization

Custom price filter in Magento Branko Ajzele
Branko Ajzele, | 20

Custom price filter in Magento

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <blockquote cite=""> <code> <del datetime=""> <em> <s> <strike> <strong>. You may use following syntax for source code: <pre><code>$current = "Inchoo";</code></pre>.

Tell us about your project

Drop us a line. We'd love to know more about your project.