首页 > 代码库 > magento 修改优惠券规则

magento 修改优惠券规则

app\code\local\Mage\SalesRule\Model\Validator.php

public function process

if($this->getCouponCode() == ‘codename‘ && $this->_rulesItemTotals[$rule->getId()][‘base_items_price‘] >= 150){
    if($this->_rulesItemTotals[$rule->getId()][‘base_items_price‘] >= 200){
        $rule->setDiscountAmount(15);
     }else{
        $rule->setDiscountAmount(10);
    }
}





magento 修改优惠券规则