I have a shopping cart rule setup which applies a discount if the product has a specific attribute – there's no coupon code involved.
Throughout the site I just need to check whether or not that shopping cart rule has been applied to the quote.
I've tried this:
$coupon_code = Mage::getSingleton('checkout/session')->getQuote()->getCouponCode();
But that doesn't work; it only works with coupon codes input by the user.
How would I check if such a shopping cart rule has been applied?
Best Answer
This will give you the ids of the rules applied to the quote separated by comma.
you can turn them into an array like this:
if you want to get the rules applied as objects you can do this: