/** * Implements abstract method from superclass - refer to superclass for description. */ public function setToRefer($quoteId) { $quoteManager = new Manager_Insurance_LandlordsPlus_Quote($quoteId); $quoteManager->setStatus('Referred'); $quoteManager->save(); }
/** * Step 5 - Payment, incorporates direct debit form * * @return void */ public function step5Action() { $pageForm = new LandlordsInsuranceQuote_Form_Step5(); // Tell page to use AJAX validation as we go $this->view->headScript()->appendScript('var ajaxValidate = true; var ajaxValidatePage = 5;'); if ($this->getRequest()->isPost()) { // We need to validate and save the data $valid = $this->_formStepCommonValidate($pageForm, 5); if ($valid) { $data = $pageForm->getValues(); $quoteManager = new Manager_Insurance_LandlordsPlus_Quote($this->_quoteID); $quoteManager->setPayBy(strtoupper($data['subform_paymentselection']['payment_method'])); $quoteManager->setPayFrequency(strtoupper($data['subform_paymentselection']['payment_frequency'])); $quoteManager->save(); // Temporarily store payment selection details in session ready for use during bank confirmation step // for DD payers $pageSession = new Zend_Session_Namespace('landlords_insurance_quote'); $pageSession->paymentSelectionDetails = $data['subform_paymentselection']; // Everything has been saved ok so navigate to next step $this->_formStepCommonNavigate(5); return; } elseif (isset($_POST['back'])) { $this->_formStepCommonNavigate(5); return; } } // If there's no quote manager, then set it up so we can make use of the // QHLI in the templates. if (!isset($quoteManager)) { $quoteManager = new Manager_Insurance_LandlordsPlus_Quote($this->_quoteID); } $this->view->qhli = $quoteManager->getLegacyID(); // Load the element data from the database if we can if ($this->_formStepCommonPopulate($pageForm, 5)) { // Render the page unless we have been redirected $this->view->form = $pageForm; $this->render('step'); } }