2014-11-05 71 views
0

使用目錄價格規則,我試圖表明,一旦查看購物車頁面,有特定產品的折扣。目前,Magento在查看購物車時會停止顯示「劃掉」價格,因此,除非他們返回到產品/目錄頁面,否則他們看起來並沒有收到折扣價格。Magento - 顯示原始價格購物車模板

所涉地區位於周圍行103:

模板>結算>購物車>項目> default.phtml

什麼是顯示旁邊當前原價的正確方法本節內的價格?我serioulsly不知道它是如何工作的,並不能找到這方面的任何淨,因爲它是非常不同的設置比任何內View.phtml

<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> 
        <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?> 
       <?php else: ?> 
        <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> 
       <?php endif; ?> 

由於隨機/低的回答,我從備用StackExchange得到網站,我也在這裏發佈這個問題:https://magento.stackexchange.com/questions/42494/show-original-price-in-cart 並會相應地更新我的問題。謝謝!

回答

2

您可以嘗試使用$_item->getProduct()->getPrice()以獲得原始價格。

<?php echo $this->helper('checkout')->formatPrice($_item->getProduct()->getPrice()) ?> 
相關問題