![](/img/trans.png)
[英]Magento: Create coupon code rule that discount differently base on the current discount of items in cart
[英]How to get the coupon code discount amount for the current session order in Magento
我正在嘗試找到一個代碼,當我使用折扣代碼時,該代碼將為我提供當前會話訂單的折扣金額。
這是我現在擁有的東西,但是它不起作用:
$coupon = Mage::getModel('salesrule/rule');
$couponCollection = $coupon->getCollection();
foreach($couponCollection as $c){
$CouponDiscount = $c->getDiscountAmount();
}
echo $CouponDiscount;
如何獲得當前會話訂單中使用的折扣金額?
要獲取當前客戶報價的折扣金額,請參見此處:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.