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条)

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog