【问题标题】:Get the value for discount in cart获取购物车中的折扣值
【发布时间】:2015-01-26 18:04:19
【问题描述】:

如果我们有一个优惠券代码,上面写着 5% 的折扣....我怎样才能将折扣值获取到变量中?例如 100 美元小计,折扣 5%。折扣的值为 5。我需要将“5”放入变量中。

【问题讨论】:

    标签: shopping-cart cart discount coupon


    【解决方案1】:

    基于这个答案Magento Checkout : Get Subtotal Value without iterating

    我能够为折扣添加另一个变量:

    $discount = $totals["discount"]->getValue();
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-10-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-06-27
      相关资源
      最近更新 更多