questions

1 Answers

Set Magento price rule to inactive after coupons are used up

Asked by: Daniel 1147 views , ,
Questions

Our clients are confused by the facts that Price Rules are still active after the specified uses per coupon has been reached. Is there a way to automatically set them to inactive once they can’t be used anymore?

1 Answers



  1. Dan Seibert on Dec 10, 2011

    The calculation of times used occurs in the salesrule/observer. You could override the function sales_order_afterPlace to check to see if this is the last time it’s available and set the status of the rule using $rule->setIsActive(0); $rule->save();

    +2 Votes Thumb up 2 Votes Thumb down 0 Votes


Answer Question