Home    Articles

 

How to get the total price of a product in magento

 

In order to get the total price of a product as it is displayed on the frontend you have to use the Magento Tax Helper.

The full code to get the total product price:

<?php
$product = Mage::getModel('catalog/product')->load($product_id);
$priceIncludingTax = Mage::helper('tax')->getPrice($product , $product ->getFinalPrice());
?>

If the code above doesn't work, try this:

<?php
$product = Mage::getModel('catalog/product')->load($product_id);
$total_price = $product->getFinalPrice();
?>
by