protected function saveState() { Yii::app()->getUser()->setState($this->cartId, serialize($this->toArray())); $this->couponManager->check(); }