2013-07-31 69 views
0

如何在Magento的購物車頁面上顯示等級價格?在Magento的購物車頁面顯示Tier價格

我知道getTierPriceHtml()方法只適用於List和Detail頁面,所以我們不能在cart頁面上使用它。

我編輯/template/checkout/cart/item/default.phtml

+0

http://stackoverflow.com/questions/7437066/display-tiered-pricing-on-the-cart-page 請查看這個鏈接 –

+0

我已經檢查過該線程和其他相關線程。給出的解決方案不起作用,這就是爲什麼我提出了一個新問題。 – user2525207

+0

請結算這個環節 http://magento.stackexchange.com/questions/1283/magento-display-tiered-pricing-for-each-product-on-cart-page 謝謝 – lvillarino

回答

0

你要一線價格在購物車頁面also.I認爲這是對您有用的功能

您可以直接使用此代碼結帳/ cart/item/default.phtml:之後的$ _item = $ this-> getItem(); (在第28行)....

 **$tierPrice = $this->getLayout()->createBlock(
'catalog/product_view', 
'product.tierprices', 
array(
    'product_id' => $_item->getProductId() 
) 

); **

**$tierPrice->setTemplate('catalog/product/view/tierprices.phtml');** 

**echo $tierPrice->getTierPriceHtml();** 

您可以創建一個文件,你也可以在地方目錄/產品的使用它自己的風格模板/view/tierprice.phml像目錄/產品/視圖/ tierprice1.phml

相關問題