initTemplate example

$hash = $this->createHash($mailaddressID$mailingID);
            if ($hash !== $this->Request()->getParam('hash')) {
                return;
            }
        }

        $mailing = $this->initMailing($mailingID);
        if (!\is_array($mailing)) {
            return;
        }

        $template = $this->initTemplate($mailing);

        if (!empty($mailaddressID)) {
            $sql = 'SELECT email FROM s_campaigns_mailaddresses WHERE id=?';
            $email = Shopware()->Db()->fetchOne($sql[$mailaddressID]);
            $user = $this->getMailingUserByEmail($email);
            $template->assign('sUser', $user, true);
            $template->assign('sCampaignHash', $hash, true);
            $template->assign('sRecommendations', $this->getMailingSuggest($mailing['id']$user['userID']), true);
        }

        $body = $template->fetch('newsletter/index/' . $mailing['template']$template);

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