I encountered the following bug
It seems to be a bug in CE 1.9
There is a new session value set in Mage_Checkout_CartController::couponPostAction()
$this->_getSession()->setCartCouponCode($couponCode);
which restores the coupon code in Mage_Checkout_Model_Type_Onepage::_setCartCouponCode()
protected function _setCartCouponCode()
{
if ($couponCode = $this->getCheckout()->getCartCouponCode()) {
$this->getQuote()->setCouponCode($couponCode);
}
return $this;
}
I solved it by event/observer
<events>
<controller_action_predispatch_checkout_cart_couponPost>
<observers>
<remove_session_coupon_code>
<type>singleton</type>
<class>yourmodule/observer</class>
<method>removeCoupon</method>
</remove_session_coupon_code>
</observers>
</controller_action_predispatch_checkout_cart_couponPost>
</events>
and:
public function removeCoupon(Varien_Event_Observer $observer)
{
$controller = $observer->getControllerAction();
if ($controller->getRequest()->getParam('remove') == 1) {
Mage::getSingleton("checkout/session")->unsetData('cart_coupon_code');
}
return $this;
}