In my cart page (i.e checkout/cart.phtml) each added product with price and total product price(subtotal) is shown as following…
<div class="cart contpdng">
<form action="<?php echo $this->getUrl('checkout/cart/updatePost') ?>" method="post">
<fieldset>
<table id="shopping-cart-table" class="data-table cart-table" width="98%" align="right">
<tbody>
<?php
foreach($this->getItems() as $_item): ?>
<?php echo $this->getItemHtml($_item) ?>
<?php endforeach ?>
</tbody>
<tfoot>
<tr class="subtotal-before-delivery">
<td class="txtRight">SUBTOTAL : </td>
<td>
<?php
$totals = $this->getQuote()->getTotals();
$formattedPrice = Mage::helper('core')->currency($totals["subtotal"]->getValue(), true, false);
echo $formattedPrice; ?>
</td>
</tr>
<tr>
<td colspan="2">
<a href="<?php echo Mage::getBaseUrl()."checkout/cart/login"; ?>" name=" " title="<?php echo $this->__('Secure Checkout'); ?>" class="button btnPrimary" id=""><?php echo $this->__('Secure Checkout'); ?></a>
</td>
</tr>
<tr>
<td colspan="2">
<a href="<?php echo Mage::getBaseUrl(); ?>" name=" " title="<?php echo $this->__('Continue Shopping'); ?>" class="button" id=""><?php echo $this->__('Continue Shopping'); ?></a>
</td>
</tr>
</tfoot>
</table>
</fieldset>
</form>
The below code shows the product image and its price(excluding tax), But I want to show the price(including tax) .
<?php
foreach($this->getItems() as $_item): ?>
<?php echo $this->getItemHtml($_item) ?>
<?php endforeach ?>
Then the below code shows the total price (excluding vat) of the added products in the cart.
<?php
$totals = $this->getQuote()->getTotals();
$formattedPrice = Mage::helper('core')->currency($totals["subtotal"]->getValue(), true, false);
echo $formattedPrice;
?>
I want to display all the price (i.e each product and also "SUBTOTAL") inlcuding tax in the cart page.
How can I get the price (including tax) in the cart page ?
Best Answer
You can try this one