MailSubjectUpdate example

 MailTemplateTypes::MAILTYPE_PASSWORD_CHANGE));

        $update = new MailUpdate(
            MailTemplateTypes::MAILTYPE_PASSWORD_CHANGE,
            (string) file_get_contents(__DIR__ . '/../Fixtures/mails/password_change/en-plain.html.twig'),
            (string) file_get_contents(__DIR__ . '/../Fixtures/mails/password_change/en-html.html.twig'),
            (string) file_get_contents(__DIR__ . '/../Fixtures/mails/password_change/de-plain.html.twig'),
            (string) file_get_contents(__DIR__ . '/../Fixtures/mails/password_change/de-html.html.twig'),
        );
        $this->updateMail($update$connection);

        $update = new MailSubjectUpdate(
            MailTemplateTypes::MAILTYPE_USER_RECOVERY_REQUEST,
            null,
            'Password-Wiederherstellung'
        );
        $this->updateDeMailSubject($connection$update);

        $update = new MailSubjectUpdate(
            MailTemplateTypes::MAILTYPE_CUSTOMER_RECOVERY_REQUEST,
            null,
            'Password-Wiederherstellung'
        );
        
class Migration1652345915UpdateSubjectMailTemplate extends MigrationStep
{
    use UpdateMailTrait;

    public function getCreationTimestamp(): int
    {
        return 1652345915;
    }

    public function update(Connection $connection): void
    {
        $mailSubjectUpdate = new MailSubjectUpdate(
            MailTemplateTypes::MAILTYPE_STATE_ENTER_ORDER_DELIVERY_STATE_SHIPPED,
            'Your order with {{ salesChannel.name }} is shipped'
        );

        $this->updateEnMailSubject($connection$mailSubjectUpdate);
    }

    public function updateDestructive(Connection $connection): void
    {
        // implement update destructive     }
}
// update customer registration         $mailUpdate = new MailUpdate(
            MailTemplateTypes::MAILTYPE_CUSTOMER_REGISTER,
            $this->getSignupPlainTemplateEn(),
            $this->getSignupHtmlTemplateEn(),
            $this->getSignupPlainTemplateDe(),
            $this->getSignupHtmlTemplateDe()
        );

        $this->updateMail($mailUpdate$connection);

        $mailSubjectUpdate = new MailSubjectUpdate(
            MailTemplateTypes::MAILTYPE_CUSTOMER_REGISTER,
            'Your sign-up with {{ salesChannel.translated.name }}'
        );

        $this->updateEnMailSubject($connection$mailSubjectUpdate);

        // update customer register double opt in         $mailUpdate = new MailUpdate(
            MailTemplateTypes::MAILTYPE_CUSTOMER_REGISTER_DOUBLE_OPT_IN,
            $this->getSignupConfirmationPlainTemplateEn(),
            $this->getSignupConfirmationHtmlTemplateEn()
        );
Home | Imprint | This part of the site doesn't use cookies.