Posted By

nico65 on 04/27/11


Tagged

price magento


Versions (?)

magento echo all prices


 / Published in: PHP
 

URL: http://xhtmlandcsshelp.blogspot.com/2010/10/how-to-get-special-price-in-magento.html

not fully tested maybe must be like specialprice in this excample

  1. <?php
  2. $product= Mage::getModel('catalog/product')->load(product_id);
  3. $price = $product->getPrice();
  4. $webprice = $product->getwebprice();
  5. $specialprice = ($_product->getSpecialPrice());
  6. if($specialprice==$price)
  7. {?>
  8. <span class="price">Price $<?php echo number_format($price,2);?></span>
  9. <?php } else { ?>
  10. <div class="regular-price">
  11. <span>Regular Price:</span>
  12. <span class="price">$ <?php echo number_format($price,2); ?></span>
  13. </div>
  14. <div class="special-price">
  15. <span>Web Special:</span>
  16. <span class="price">$ <?php echo number_format($specialprice,2); ?> </span>
  17. </div>
  18. <?php } ?>

Report this snippet  

You need to login to post a comment.