public function init() { parent::init(); Plugin::getEventManager()->trigger('controller.init', $this); $this->view->setScriptPath(array_merge($this->view->getScriptPaths(), array(PIMCORE_WEBSITE_PATH . '/views/scripts/', PIMCORE_WEBSITE_PATH . '/views/layouts/', PIMCORE_WEBSITE_PATH . '/views/scripts/coreshop/'))); $this->view->addHelperPath(CORESHOP_PATH . '/lib/CoreShop/View/Helper', 'CoreShop\\View\\Helper'); $this->session = $this->view->session = Tool::getSession(); /* if(!$this->session->country instanceof CoreShopCountry) { if($this->session->user instanceof \CoreShop\Plugin\User && count($this->session->user->getAddresses()) > 0) { $this->session->country = $this->session->user->getAddresses()->get(0)->getCountry(); } else $this->session->country = Tool::getCountry(); } */ if ($this->getParam("currency")) { if (Currency::getById($this->getParam("currency")) instanceof Currency) { $this->session->currencyId = $this->getParam("currency"); } } $this->view->country = Tool::getCountry(); $this->enableLayout(); $this->setLayout(Plugin::getLayout()); $this->prepareCart(); $this->view->isShop = true; }