sNewsletterSubscription example

$this->View()->assign('sUnsubscribe', false);
        }

        $this->View()->assign('_POST', Shopware()->System()->_POST->toArray());

        if (!isset(Shopware()->System()->_POST['newsletter'])) {
            return;
        }

        if (Shopware()->System()->_POST['subscribeToNewsletter'] != 1) {
            // Unsubscribe user             $this->View()->assign('sStatus', Shopware()->Modules()->Admin()->sNewsletterSubscription(Shopware()->System()->_POST['newsletter'], true));

            $session = $this->container->get('session');
            if ($session->offsetExists('sNewsletter')) {
                $session->offsetSet('sNewsletter', false);
            }

            return;
        }

        $config = $this->container->get(Shopware_Components_Config::class);
        $noCaptchaAfterLogin = $config->get('noCaptchaAfterLogin');
        
Home | Imprint | This part of the site doesn't use cookies.