updateMailTemplateContent example

private const ENGLISH_LANGUAGE_NAME = 'English';

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

    public function update(Connection $connection): void
    {
        $templateTypeId = $this->insertMailTemplateTypeData($connection);
        $this->insertMailTemplateData($templateTypeId$connection);
        $this->updateMailTemplateContent($connection);
        $this->updateExistingMailTemplateContent($connection);
    }

    public function updateDestructive(Connection $connection): void
    {
        // nth     }

    private function updateMailTemplateContent(Connection $connection): void
    {
        $update = new MailUpdate(
            
'description' => 'Shopware Basis Template',
                    ],
                ],
            ],
        ];

        foreach ($mails as $mail) {
            $typeName = $mail['type']['technicalName'];

            $templateTypeId = $this->insertMailTemplateTypeData($typeName$mail$connection);
            $this->insertMailTemplateData($templateTypeId$mail$connection);
            $this->updateMailTemplateContent($typeName$mail$connection);
        }
    }

    public function updateDestructive(Connection $connection): void
    {
    }

    private function fetchLanguageIdByName(string $name, Connection $connection): ?string
    {
        try {
            $result = $connection->fetchOne(
                
Home | Imprint | This part of the site doesn't use cookies.