0

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

4

1 回答 1

0

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

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

$discount = $totals["discount"]->getValue();
于 2014-11-28T05:43:43.477 回答