I need to check to see if a coupon code is correct in an ajax controller, how is this done?
I get the code like this:
$param['code'];
Try
couponCode = $param['code']
$oCoupon = Mage::getModel('salesrule/coupon')->load($couponCode, 'code');
$oRule = Mage::getModel('salesrule/rule')->load($oCoupon->getRuleId());
Then try to apply it to your order see Check if coupon is valid for a quote