/** * Sets some global parameters to Smarty engine (such as self link, etc.), returns * modified shop object. * * @param object $oShop Object to modify some parameters * * @return object */ public function addGlobalParams($oShop = null) { $mySession = $this->getSession(); $myConfig = $this->getConfig(); $oLang = oxRegistry::getLang(); $oShop = parent::addGlobalParams($oShop); // override cause of admin dir $sURL = $myConfig->getConfigParam('sShopURL') . $myConfig->getConfigParam('sAdminDir') . "/"; if ($myConfig->getConfigParam('sAdminSSLURL')) { $sURL = $myConfig->getConfigParam('sAdminSSLURL'); } $oViewConf = $this->getViewConfig(); $oViewConf->setViewConfigParam('selflink', oxRegistry::get("oxUtilsUrl")->processUrl($sURL . 'index.php?editlanguage=' . $this->_iEditLang, false)); $oViewConf->setViewConfigParam('ajaxlink', str_replace('&', '&', oxRegistry::get("oxUtilsUrl")->processUrl($sURL . 'oxajax.php?editlanguage=' . $this->_iEditLang, false))); $oViewConf->setViewConfigParam('sServiceUrl', $this->getServiceUrl()); $oViewConf->setViewConfigParam('blLoadDynContents', $myConfig->getConfigParam('blLoadDynContents')); $oViewConf->setViewConfigParam('sShopCountry', $myConfig->getConfigParam('sShopCountry')); // set langugae in admin $iDynInterfaceLanguage = $myConfig->getConfigParam('iDynInterfaceLanguage'); //$this->_aViewData['adminlang'] = isset( $iDynInterfaceLanguage )?$iDynInterfaceLanguage:$myConfig->getConfigParam( 'iAdminLanguage' ); $this->_aViewData['adminlang'] = isset($iDynInterfaceLanguage) ? $iDynInterfaceLanguage : $oLang->getTplLanguage(); $this->_aViewData['charset'] = $this->getCharSet(); //setting active currency object $this->_aViewData["oActCur"] = $myConfig->getActShopCurrencyObject(); return $oShop; }
/** * Sets and caches default parameters for shop object and returns it. * * @param oxShop $oShop current shop object * * @return object $oShop current shop object */ public function addGlobalParams($oShop = null) { $oViewConf = parent::addGlobalParams($oShop); $this->_setNrOfArtPerPage(); return $oViewConf; }
/** * Sets and caches default parameters for shop object and returns it. * * @param oxShop $shop current shop object * * @return oxViewConfig Current shop object */ public function addGlobalParams($shop = null) { $viewConfig = parent::addGlobalParams($shop); $this->_setNrOfArtPerPage(); return $viewConfig; }