/** * constructor with arguments */ public function __construct($aOrderObj, $encryptedOrderId) { parent::__construct(); $this->aOrderObj = $aOrderObj; $this->tiffinId = $aOrderObj->order2tiffin; $this->quantity = $aOrderObj->num_of_units; $this->encryptedOrderId = $encryptedOrderId; $this->allowedAPriceTimeObjArray = AppCommon::getAllowedAPriceTimeObjForGivenTiffinAndQuantity($this->tiffinId, $this->quantity); if (!isset($this->allowedAPriceTimeObjArray) || count($this->allowedAPriceTimeObjArray) < 1) { //redirect to first checkout stage screen for order editing Yii::app()->getRequest()->redirect(Yii::app()->getRequest()->getHostInfo() . Yii::app()->getRequest()->getScriptUrl() . '/cart/checkout/id/' . $this->encryptedOrderId); } }