- <?php
- $product= Mage::getModel('catalog/product')->load(product_id);
- $price = $product->getPrice();
- $webprice = $product->getwebprice();
- $specialprice = ($_product->getSpecialPrice());
- if($specialprice==$price)
- {?>
- <span class="price">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 } ?>
- //该片段来自于http://www.codesnippet.cn/detail/160420132832.html
来源: http://www.codesnippet.cn/detail/160420132832.html