Magento 获取原价格和打折价格 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 } ?>

 

Loading

Add a Comment

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.