dream198731 2014-03-03 20:37
浏览 32
已采纳

在Magento的Mage_Sales_Model_Quote_Item_Abstract中获得价格函数的不同之处是什么?

getBaseCalculationPrice (line 315) Get calculation price used for quote calculation in base currency.

getBaseOriginalPrice (line 389) Get Original item price (got from product) in base website currency.

getCalculationPrice (line 296) Get item price used for quote calculation process.

getConvertedPrice (line 434) Get item price converted to quote currency

getOriginalPrice (line 363) Get original price (retrieved from product) for item.

getPrice (line 412) Get item price. Item price currency is website base currency.

I am trying to get the final price that is displayed in the shopping cart, the price that is already been discounted if there are any promotions. Should I use getPrice or getCalculationPrice or getBaseCalculationPrice or any other? What are differences of all these different get price functions in Magento.

  • 写回答

2条回答 默认 最新

  • dongqing5575 2014-03-03 22:57
    关注

    In the shopping cart are the cart totals displayed, not the prices. So i think you should use the following methods if Mage_Sales_Model_Quote_Item:

    • getRowTotal()
    • getRowTotalInclTax()
    • getRowTotalWithDiscount()
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?