Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 /**
  * 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();
     }
 }
Exemplo n.º 3
0
	/**
	 * 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();
	}
Exemplo n.º 4
0
 /**
  * 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();
     }
 }
Exemplo n.º 5
0
 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();
 }
Exemplo n.º 6
0
 /**
  * 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();
 }
Exemplo n.º 8
0
 /**
  * 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();
 }
Exemplo n.º 9
0
 /**
  * {@inheritdoc}
  */
 public function preDispatch()
 {
     $this->plugin = $this->get('plugins')->Frontend()->SwagPaymentStripe();
     parent::preDispatch();
 }
Exemplo n.º 10
0
 /**
  * Loads auth and script renderer resource
  */
 public function init()
 {
     Shopware()->Plugins()->Backend()->Auth()->setNoAuth();
     parent::init();
 }
Exemplo n.º 11
0
 /**
  * Setup Translation Component
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     $this->translation = new Shopware_Components_Translation();
 }
Exemplo n.º 12
0
 /**
  * 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();
 }
Exemplo n.º 13
0
 /**
  * Adding local template directory to smarty template scope
  */
 public function init()
 {
     $this->View()->addTemplateDir(dirname(__FILE__) . "/../../Views/");
     parent::init();
 }
Exemplo n.º 14
0
 /**
  * Enable json renderer for index / load action
  * Check acl rules
  *
  * @return void
  */
 public function preDispatch()
 {
     if ($this->Request()->getActionName() !== 'upload') {
         parent::preDispatch();
     }
 }
Exemplo n.º 15
0
 /**
  * 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();
 }
Exemplo n.º 17
0
 /**
  * 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();
     }
 }
Exemplo n.º 18
0
 public function preDispatch()
 {
     parent::preDispatch();
     $this->cacheManager = $this->get('shopware.cache_manager');
 }