updateCustomTemplates example



class Migrations_Migration705 extends Shopware\Components\Migrations\AbstractMigration
{
    public function up($modus)
    {
        $this->addSql("DELETE FROM `s_core_config_elements` WHERE name = 'category_default_tpl';");

        $this->updateSnippets();
        $this->updateCustomTemplates();
        $this->emptyCustomTemplates();
    }

    private function updateSnippets()
    {
        $this->addSql('DELETE FROM `s_core_snippets` WHERE name = "view/settings_default_settings_template_help"');
        $this->addSql('UPDATE `s_core_snippets` SET `value` = "Listen Layout" WHERE `name` = "view/settings_default_settings_template_label" AND localeID = 1 AND dirty = 0;');
        $this->addSql('UPDATE `s_core_snippets` SET `value` = "Listing layout" WHERE `name` = "view/settings_default_settings_template_label" AND localeID = 2 AND dirty = 0;');
        $this->addSql('UPDATE `s_core_config_elements` SET label = "Verfügbare Listen Layouts" WHERE label = "Verfügbare Templates Kategorien";');
        $this->addSql('UPDATE `s_core_config_element_translations` SET label = "Available listing layouts" WHERE label = "Available template categories";');
    }

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