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 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)
  • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计