public function init() { parent::init(); $currency = Shopware()->Db()->fetchRow('SELECT templatechar as sign, (symbol_position = 16) currencyAtEnd FROM s_core_currencies WHERE standard = 1'); $this->View()->assign('analyticsCurrency', $currency); }
/** * Disable template engine for selected actions * * @codeCoverageIgnore * @return void */ public function preDispatch() { parent::preDispatch(); if (in_array($this->Request()->getActionName(), array('validateTrackingCode','mapCustomerAccount'))) { $this->Front()->Plugins()->Json()->setRenderer(false); $this->Front()->Plugins()->ViewRenderer()->setNoRender(); } }
/** * Create reference to widget-model * * @return void */ public function preDispatch() { $this->widgetsXml = Shopware()->DocPath()."files/config/Widgets.xml"; $this->widgetsApi = new Shopware_Models_Widgets_Widgets(null, $this->widgetsXml); $this->authCode = 'f0Dbh1jL9RoddLD8lqhYHKYWyUqova'; // Shopware Update-Service Rest-Code $this->dir = Shopware()->DocPath()."files/config"; parent::preDispatch(); }
/** * Initials the script renderer and handles the json request. * If the internal customer repository isn't initialed the * repository is initialed. * * @codeCoverageIgnore * @return void */ public function init() { if (!$this->Request()->getActionName() || in_array($this->Request()->getActionName(), array('index', 'load'))) { $this->View()->addTemplateDir('.'); $this->Front()->Plugins()->ScriptRenderer()->setRender(); Shopware()->Plugins()->Backend()->Auth()->setNoAuth(); } else { parent::init(); } }
public function preDispatch() { if (strtolower($this->Request()->getActionName()) == 'index') { $available = $this->checkStoreApi(); if ($available) { $this->getCategoryService()->synchronize(); } $this->get('shopware_plugininstaller.plugin_manager')->refreshPluginList(); } parent::preDispatch(); }
/** * Default init method * * @codeCoverageIgnore * @return void */ public function init() { parent::init(); if (!is_null(self::$testRepository)) { $this->repository = self::$testRepository; } else { $this->repository = Shopware()->Models()->Banner(); } $this->namespace = Shopware()->Snippets()->getNamespace('backend/banner/banner'); }
/** * @param Enlight_Controller_Request_Request $request * @param Enlight_Controller_Response_Response $response */ public function __construct(Enlight_Controller_Request_Request $request, Enlight_Controller_Response_Response $response) { parent::__construct($request, $response); $this->plugin = Shopware()->Plugins()->Backend()->SwagImportExport(); }
/** * This function add the template directory and register the Shopware_Components namespace */ public function init() { $this->setMaxExecutionTime(); Shopware()->Loader()->registerNamespace('Shopware_Components', dirname(__FILE__) . '/../../Components/'); $this->View()->addTemplateDir(dirname(__FILE__) . "/../../Views/"); parent::init(); }
/** * {@inheritdoc} */ public function preDispatch() { $this->plugin = $this->get('plugins')->Frontend()->SwagPaymentStripe(); parent::preDispatch(); }
/** * Loads auth and script renderer resource */ public function init() { Shopware()->Plugins()->Backend()->Auth()->setNoAuth(); parent::init(); }
/** * Setup Translation Component * * @return void */ public function init() { parent::init(); $this->translation = new Shopware_Components_Translation(); }
/** * Initialisation of the controller. * Throws an exception is the model property isn't configured. * * @throws Exception */ public function init() { if (empty($this->model)) { throw new Exception('The `model` property of your PHP controller is not configured!'); } parent::init(); }
/** * Adding local template directory to smarty template scope */ public function init() { $this->View()->addTemplateDir(dirname(__FILE__) . "/../../Views/"); parent::init(); }
/** * Enable json renderer for index / load action * Check acl rules * * @return void */ public function preDispatch() { if ($this->Request()->getActionName() !== 'upload') { parent::preDispatch(); } }
/** * Deactivates the authentication for the performOrderRedirect action * This is used in the performOrder action */ public function init() { if (in_array($this->Request()->getActionName(), array('performOrderRedirect'))) { Shopware()->Plugins()->Backend()->Auth()->setNoAuth(); } parent::init(); }
/** * {@inheritdoc} */ public function init() { $this->plugin = $this->get('plugins')->Frontend()->SwagPaymentPaypal(); parent::init(); }
/** * Disable template engine for all actions * * @codeCoverageIgnore * @return void */ public function preDispatch() { parent::preDispatch(); if (in_array($this->Request()->getActionName(), array('validateOrderCode', 'validateVoucherCode', 'validateDescription'))) { $this->Front()->Plugins()->Json()->setRenderer(false); $this->Front()->Plugins()->ViewRenderer()->setNoRender(); } }
public function preDispatch() { parent::preDispatch(); $this->cacheManager = $this->get('shopware.cache_manager'); }