2012-04-29 123 views
1

我在尝试在Magento中的购物车中显示原始单价时遇到问题。默认情况下,Magento只显示特价,但我也想显示原价以突出显示节省。如何在Magento中的购物车中显示原始价格

我知道哪些模板需要更改哪些是/template/checkout/cart/item/default.phtml。

线145它显示

<?php 
echo $this->helper('checkout')-> 
       formatPrice($_incl-$_item->getWeeeTaxDisposition()) 
?> 

这显示特殊价格。我只是不知道显示原始价格的语法。

回答

5

请参阅下面的另一种方法, 我不知道,如果$ _item->用getPrice访问非特惠价,所以它跃升到产品

  <?php echo $_item->getProduct()->getPrice(); ?> 

   <?php foreach($this->getItems() as $_item): ?> 
      <?php echo $this->getItemHtml($_item) ?> 
     // insert it here 
      <?php endforeach ?> 
+0

谢谢,我不太清楚你建议编辑哪个模板,但是你的回复确实可以帮助我想出以下解决方案,它可以很好地工作: – user1363578 2012-04-29 19:32:51

+1

<?php if($ _item-> getProduct() - > getSpecialPrice()): ?> \t <?php echo $ this-> helper('checkout') - > formatPrice($ _ item-> getProduct() - > getPrice()); ?> \t <?php endif; ?> – user1363578 2012-04-29 21:12:07

相关问题