【问题标题】:How get item price without currency in osclass如何在osclass中获取没有货币的商品价格
【发布时间】:2016-01-05 10:24:25
【问题描述】:

如何在osclass中获取没有货币代码的商品价格?我需要这个值才能将其发送到 Paypal。

  • 使用 osc_item_formated_price() 我得到 ex 10 美元
  • 使用 osc_item_price() 我得到 10000000

我希望函数只获取 10 个数字。

【问题讨论】:

    标签: php osclass


    【解决方案1】:

    osc_item_price() 是正确的函数,但您必须将返回的数字除以 1000000。您可以使用以下函数:

    function getItemPrice() {
      return osc_item_price()/1000000;
    }
    

    【讨论】:

    • 谢谢这是最好的解决方案
    • 感谢您的反馈。请考虑将此答案标记为已接受的解决方案,也许您想投票。
    猜你喜欢
    • 1970-01-01
    • 2021-08-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-10-03
    • 2012-05-01
    相关资源
    最近更新 更多