Esempio n. 1
0
 function preDispatch()
 {
     $this->_helper->layout->setLayout('layout-storepayment');
     $this->_testMode = true;
     $this->_defaultCurrency = 'USD';
     $tblPaymentSetting = new App_Model_Db_Table_PaymentSetting();
     $usdIdrEx = $tblPaymentSetting->fetchAll($tblPaymentSetting->select()->where(" settingKey= 'USDIDR'"));
     $this->_currencyValue = $usdIdrEx[0]->settingValue;
     Zend_Session::start();
     $tblPaymentSetting = new App_Model_Db_Table_PaymentSetting();
     $rowSet = $tblPaymentSetting->fetchAll();
     for ($iRow = 0; $iRow < count($rowSet); $iRow++) {
         $key = $rowSet[$iRow]->settingKey;
         $this->_paymentVars[$key] = $rowSet[$iRow]->settingValue;
     }
     $tblSetting = new App_Model_Db_Table_PaymentSetting();
     $this->_holMail = $tblSetting->fetchAll($tblSetting->select()->where("settingKey = 'paypalBusiness'"));
 }
Esempio n. 2
0
 function preDispatch()
 {
     $sReturn = "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
     $sReturn = base64_encode($sReturn);
     $auth = Zend_Auth::getInstance();
     if (!$auth->hasIdentity()) {
         $registry = Zend_Registry::getInstance();
         $config = $registry->get('config');
         $loginUrl = $config->identity->config->local->login->url;
         $this->_redirect(ROOT_URL . $loginUrl . '?returnTo=' . $sReturn);
     } else {
         $this->_testMode = true;
         $this->_defaultCurrency = 'USD';
         $tblPaymentSetting = new App_Model_Db_Table_PaymentSetting();
         $usdIdrEx = $tblPaymentSetting->fetchAll($tblPaymentSetting->select()->where(" settingKey= 'USDIDR'"));
         $this->_currencyValue = $usdIdrEx[0]->settingValue;
         $this->_helper->layout->setLayout('layout-membership');
         $this->_helper->layout->setLayoutPath(array('layoutPath' => ROOT_DIR . '/app/modules/membership/views/layouts'));
         Zend_Session::start();
         $this->_user = $auth->getIdentity();
     }
 }