/** * Update coupon usage * @param Mage_Sales_Model_Order */ protected function updateCouponUsage(Mage_Sales_Model_Order $order) { $couponCodes = $this->couponService->getCouponCodesFromOrder($order); // default handler works well with 1 code, we don't need to change anything if (count($couponCodes) > 1) { $customerId = $order->getCustomerId(); $this->couponService->updateCouponUsage($couponCodes, $customerId); } }