updateTemplates example



class Migrations_Migration438 extends Shopware\Components\Migrations\AbstractMigration
{
    public function up($modus)
    {
        $this->addConfigFields();
        $this->fixContextData();
        $this->updateTemplates();
        $this->updateTranslations();
    }

    /** * Add the new configuration fields * * - emailheaderplain * - emailfooterplain * - emailheaderhtml * - emailfooterhtml */
    


class Migrations_Migration440 extends Shopware\Components\Migrations\AbstractMigration
{
    public function up($modus)
    {
        $this->updateTemplates();
        $this->updateTranslations();
    }

    /** * Update all mail templates */
    private function updateTemplates()
    {
        $this->updateTemplate(
            'sORDER',
            'Hallo {$billingaddress.firstname} {$billingaddress.lastname},\n\nvielen Dank fuer Ihre Bestellung bei {config name=shopName} (Nummer: {$sOrderNumber}) am {$sOrderDay|date:\"DATE_MEDIUM\"} um {$sOrderTime|date:\"TIME_SHORT\"}.\nInformationen zu Ihrer Bestellung:\n\nPos. Art.Nr. Menge Preis Summe\n{foreach item=details key=position from=$sOrderDetails}\n{$position+1|fill:4} {$details.ordernumber|fill:20} {$details.quantity|fill:6} {$details.price|padding:8} EUR {$details.amount|padding:8} EUR\n{$details.articlename|wordwrap:49|indent:5}\n{/foreach}\n\nVersandkosten: {$sShippingCosts}\nGesamtkosten Netto: {$sAmountNet}\n{if !$sNet}\nGesamtkosten Brutto: {$sAmount}\n{/if}\n\nGewählte Zahlungsart: {$additional.payment.description}\n{$additional.payment.additionaldescription}\n{if $additional.payment.name == \"debit\"}\nIhre Bankverbindung:\nKontonr: {$sPaymentTable.account}\nBLZ:{$sPaymentTable.bankcode}\nWir ziehen den Betrag in den nächsten Tagen von Ihrem Konto ein.\n{/if}\n{if $additional.payment.name == \"prepayment\"}\n\nUnsere Bankverbindung:\n{config name=bankAccount}\n{/if}\n\n{if $sComment}\nIhr Kommentar:\n{$sComment}\n{/if}\n\nRechnungsadresse:\n{$billingaddress.company}\n{$billingaddress.firstname} {$billingaddress.lastname}\n{$billingaddress.street}\n{$billingaddress.zipcode} {$billingaddress.city}\n{$billingaddress.phone}\n{$additional.country.countryname}\n\nLieferadresse:\n{$shippingaddress.company}\n{$shippingaddress.firstname} {$shippingaddress.lastname}\n{$shippingaddress.street}\n{$shippingaddress.zipcode} {$shippingaddress.city}\n{$additional.countryShipping.countryname}\n\n{if $billingaddress.ustid}\nIhre Umsatzsteuer-ID: {$billingaddress.ustid}\nBei erfolgreicher Prüfung und sofern Sie aus dem EU-Ausland\nbestellen, erhalten Sie Ihre Ware umsatzsteuerbefreit.\n{/if}\n\n\nFür Rückfragen stehen wir Ihnen jederzeit gerne zur Verfügung.\n\nWir wünschen Ihnen noch einen schönen Tag.',
            
// we need an app secret to securely communicate with apps         // therefore we only install webhooks, modules, tax providers and payment methods if we have a secret         if ($app->getAppSecret()) {
            $this->paymentMethodPersister->updatePaymentMethods($manifest$id$defaultLocale$context);
            $this->taxProviderPersister->updateTaxProviders($manifest$id$defaultLocale$context);

            $this->updateModules($manifest$id$defaultLocale$context);
        }

        $this->ruleConditionPersister->updateConditions($manifest$id$defaultLocale$context);
        $this->actionButtonPersister->updateActions($manifest$id$defaultLocale$context);
        $this->templatePersister->updateTemplates($manifest$id$context);
        $this->scriptPersister->updateScripts($id$context);
        $this->customFieldPersister->updateCustomFields($manifest$id$context);
        $this->assetService->copyAssetsFromApp($app->getName()$app->getPath());

        $cmsExtensions = $this->appLoader->getCmsExtensions($app);
        if ($cmsExtensions) {
            $this->cmsBlockPersister->updateCmsBlocks($cmsExtensions$id$defaultLocale$context);
        }

        $updatePayload = [
            'id' => $app->getId(),
            


class Migrations_Migration461 extends Shopware\Components\Migrations\AbstractMigration
{
    public function up($modus)
    {
        if ($modus === self::MODUS_INSTALL) {
            $this->updateTemplates();
            $this->updateTranslations();
        }
    }

    /** * Update all mail templates */
    private function updateTemplates()
    {
        $this->updateTemplate(
            'sORDER',
            


class Migrations_Migration474 extends Shopware\Components\Migrations\AbstractMigration
{
    public function up($modus)
    {
        if ($modus === self::MODUS_INSTALL) {
            $this->updateTemplates();
            $this->updateTranslations();
        }
    }

    /** * Update all mail templates */
    private function updateTemplates()
    {
        $this->updateTemplate(
            'sORDER',
            
Home | Imprint | This part of the site doesn't use cookies.