public function init() { parent::init(); $this->resize_imagepath = rtrim($this->getConfig()->getPicturePath(null), '/') . '/stylafeed/'; if (!file_exists($this->resize_imagepath)) { @mkdir($this->resize_imagepath); } $this->oModule = oxNew('oxModule'); $this->oModule->load('StylaFeed'); }
/** * Initializes all required components. * * @return null|void */ public function init() { parent::init(); set_exception_handler(array($this, 'exceptionHandler')); try { $this->_initVersionLayer(); } catch (Exception $e) { $sMessage = json_encode($this->_errorMessage($e->getMessage()), JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); if ($this->_hasRegistry('getUtils')) { $oUtils = oxRegistry::getUtils(); } else { $oUtils = oxUtils::getInstance(); } $oUtils->showMessageAndExit($sMessage); } }
/** * Sets self::$_aCollectedComponentNames to null, as views and widgets * controllers loads different components and calls parent::init() */ public function init() { self::$_aCollectedComponentNames = null; if (!empty($this->_aComponentNames)) { foreach ($this->_aComponentNames as $sComponentName => $sCompCache) { $oActTopView = $this->getConfig()->getTopActiveView(); if ($oActTopView) { $this->_oaComponents[$sComponentName] = $oActTopView->getComponent($sComponentName); if (!isset($this->_oaComponents[$sComponentName])) { $this->_blLoadComponents = true; break; } else { $this->_oaComponents[$sComponentName]->setParent($this); } } } } parent::init(); }
/** * Loads basket oxsession::getBasket(), sets $this->oBasket->blCalcNeeded = true to * recalculate, sets back basket to session oxsession::setBasket(), executes * parent::init(). */ public function init() { // disabling performance control variable $this->getConfig()->setConfigParam('bl_perfCalcVatOnlyForBasketOrder', false); // recalc basket cause of payment stuff if ($oBasket = $this->getBasket()) { $oBasket->onUpdate(); } parent::init(); }
/** * Fetches search parameter from GET/POST/session, prepares search * SQL (search::GetWhere()), and executes it forming the list of * found articles. Article list is stored at search::_aArticleList * array. * * @return null */ public function init() { parent::init(); $myConfig = $this->getConfig(); // #1184M - special char search $oConfig = oxRegistry::getConfig(); $sSearchParamForQuery = trim($oConfig->getRequestParameter('searchparam', true)); // searching in category ? $sInitialSearchCat = $this->_sSearchCatId = rawurldecode($oConfig->getRequestParameter('searchcnid')); // searching in vendor #671 $sInitialSearchVendor = rawurldecode($oConfig->getRequestParameter('searchvendor')); // searching in Manufacturer #671 $sManufacturerParameter = $oConfig->getRequestParameter('searchmanufacturer'); $sInitialSearchManufacturer = $this->_sSearchManufacturer = rawurldecode($sManufacturerParameter); $this->_blEmptySearch = false; if (!$sSearchParamForQuery && !$sInitialSearchCat && !$sInitialSearchVendor && !$sInitialSearchManufacturer) { //no search string $this->_aArticleList = null; $this->_blEmptySearch = true; return false; } // config allows to search in Manufacturers ? if (!$myConfig->getConfigParam('bl_perfLoadManufacturerTree')) { $sInitialSearchManufacturer = null; } // searching .. /** @var oxSearch $oSearchHandler */ $oSearchHandler = oxNew('oxsearch'); $oSearchList = $oSearchHandler->getSearchArticles($sSearchParamForQuery, $sInitialSearchCat, $sInitialSearchVendor, $sInitialSearchManufacturer, $this->getSortingSql($this->getSortIdent())); // list of found articles $this->_aArticleList = $oSearchList; $this->_iAllArtCnt = 0; // skip count calculation if no articles in list found if ($oSearchList->count()) { $this->_iAllArtCnt = $oSearchHandler->getSearchArticleCount($sSearchParamForQuery, $sInitialSearchCat, $sInitialSearchVendor, $sInitialSearchManufacturer); } $iNrofCatArticles = (int) $myConfig->getConfigParam('iNrofCatArticles'); $iNrofCatArticles = $iNrofCatArticles ? $iNrofCatArticles : 1; $this->_iCntPages = round($this->_iAllArtCnt / $iNrofCatArticles + 0.49); }
/** * Executes parent::init(), Loads user chosen product object (with all data). */ public function init() { if (oxRegistry::getConfig()->getRequestParameter('recommid') && !$this->getActiveRecommList()) { oxRegistry::getUtils()->redirect($this->getConfig()->getShopHomeURL(), true, 302); } oxUBase::init(); }
/** * Executes parent method parent::init(). * * @return null */ public function init() { $this->_filterDynData(); parent::init(); }
/** * Executes parent::init(), loads basket from session * (thankyou::_oBasket = oxsession::getBasket()) then destroys * it (oxsession::delBasket()), unsets user session ID, if * this user didn't entered password while ordering. * * @return null */ public function init() { parent::init(); // get basket we might need some information from it here $oBasket = $this->getSession()->getBasket(); $oBasket->setOrderId(oxSession::getVar('sess_challenge')); // copying basket object $this->_oBasket = clone $oBasket; // delete it from the session $oBasket->deleteBasket(); oxSession::deleteVar('sess_challenge'); }
public function init() { parent::init(); $this->_initialized = true; }
/** * Executes parent::init(), Loads user chosen product object (with all data). * * @return null */ public function init() { if (oxConfig::getParameter('recommid') && !$this->getActiveRecommList()) { oxUtils::getInstance()->redirect($this->getConfig()->getShopHomeURL(), true, 302); } oxUBase::init(); }