To get Special Price or Regular Price of a product you need to Know the product Id.
Then write the code Below to fetch the All Price of a procduct
$product= Mage::getModel('catalog/product')->load(product_id);
$price = $product->getPrice();
$webprice = $product->getwebprice();
$specialprice = $product->getFinalPrice();
if($specialprice==$price)
{?>
<span class="price">$<?php echo number_format($price,2);?></span>
<?php } else { ?>
<div class="regular-price">
<span>Regular Price:</span>
<span class="price">$ <?php echo number_format($price,2); ?></span>
</div>
<div class="special-price">
<span>Web Special:</span>
<span class="price">$ <?php echo number_format($specialprice,2); ?> </span>
</div>
<?php } ?>
Please mention the path... where i put this coding...
ReplyDelete@sudhakar where ever you want to place you can.. one more thing you can use Magento price format to get the currency code also. Follow the below link
ReplyDeletehttp://xhtmlandcsshelp.blogspot.com/2011/02/magento-format-price-with-currency.html