$sql = '
INSERT INTO s_core_optin (datum, hash, data, type)
VALUES (NOW(), ?, ?, "swNotification")
';
$connection->
executeQuery($sql,
[$hash,
serialize(Shopware()->
System()->_POST->
toArray())]);
$context =
[ 'sConfirmLink' =>
$link,
'sArticleName' =>
$name,
];
$mail =
$this->
get('templatemail'
)->
createMail('sACCEPTNOTIFICATION',
$context);
$mail->
addTo($email);
$mail->
send();
$sNotificationArticleWaitingForOptInApprovement =
$session->
get('sNotifcationArticleWaitingForOptInApprovement',
[]);
$sNotificationArticleWaitingForOptInApprovement[$notifyOrderNumber] = true;
$session->
set('sNotifcationArticleWaitingForOptInApprovement',
$sNotificationArticleWaitingForOptInApprovement);
} else { $action->
View()->
assign('NotifyAlreadyRegistered', true
);
} } }