get Special price or Regular Price in magento


<?php
 $product= Mage::getModel('catalog/product')->load(product_id);
 $price = $product->getPrice();
 $webprice = $product->getwebprice();
 $specialprice = $product->getFinalPrice();
 if($specialprice==$price)
 {?>
 <span>$<?php echo number_format($price,2);?></span>
 <?php } else { ?>
 <div>
 <span>Regular Price:</span>
 <span>$ <?php echo number_format($price,2); ?></span>
 </div>
 <div>
 <span>Web Special:</span>
 <span>$ <?php echo number_format($specialprice,2); ?> </span>
 </div>
 <?php } ?>

for more magento tutorial visit: http://blog.free-extension.com/

  1. this help me a lot, thanks!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.