eurica
eurica

Reputation: 120

Magento Cart Inclusive Price

How do i get the magento total cart inclusive price? I found something like this:

$_product = Mage::getModel('catalog/product')->load($productId);
$_priceIncludingTax = Mage::helper('tax')->getPrice($_product, $_product->getFinalPrice());

but it only gets the price per product which i want is the total inclusive price in the cart.

Upvotes: 0

Views: 412

Answers (1)

Mufaddal
Mufaddal

Reputation: 5381

you can use this methods to display subtotal with inclusive of tax

$this->helper('checkout')->formatPrice($this->getTotal()->getValueInclTax();

if you are outside of cart page then use below steps

$quote = Mage::getModel('checkout/session')->getQuote();
$cartGrossTotal = 0;
foreach ($quote->getAllItems() as $item) {
 $cartGrossTotal += $item->getPriceInclTax()*$item->getQty();
}
echo $cartGrossTotal;

Upvotes: 2

Related Questions