public function saveNewsletterAction() { if ($this->
Request()->
isPost()) { $status =
(bool) $this->
Request()->
getPost('newsletter'
);
$customerMail =
$this->admin->
sGetUserMailById();
if (!\
is_string($customerMail)) { return;
} $this->admin->
sUpdateNewsletter($status,
$customerMail, true
);
$successMessage =
$status ? 'newsletter' : 'deletenewsletter';
if (Shopware()->
Config()->
get('optinnewsletter'
) &&
$status) { $successMessage = 'optinnewsletter';
} $this->
View()->
assign('sSuccessAction',
$successMessage);
$this->container->
get('session'
)->
offsetSet('sNewsletter',
$status);
} $this->
forward('index'
);
} /**
* Read and test download file
*
* @return void
*/