shouldForwardToRegister example


    public function init()
    {
        $this->admin = Shopware()->Modules()->Admin();
        $this->customerService = Shopware()->Container()->get(CustomerServiceInterface::class);
    }

    public function preDispatch()
    {
        $this->View()->setScope(Smarty::SCOPE_PARENT);
        if ($this->shouldForwardToRegister()) {
            $this->forward('index', 'register', 'frontend', $this->getForwardParameters());

            return;
        }
        $customerData = $this->admin->sGetUserData();
        if (!\is_array($customerData)) {
            $this->forward('index', 'register', 'frontend', $this->getForwardParameters());

            return;
        }

        
Home | Imprint | This part of the site doesn't use cookies.