createSearchFacets example


    public function up($modus)
    {
        $this->addModule();

        $this->addCategoryConfig();

        $this->importDefaultFacets();

        $this->importFacetTranslations();

        $this->createSearchFacets();

        $this->addNewCategoryFilterParam();
    }

    private function addModule()
    {
        $sql = <<<SQL CREATE TABLE IF NOT EXISTS `s_search_custom_facet` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `active` int(1) unsigned NOT NULL, `unique_key` varchar(100) NULL DEFAULT NULL, `display_in_categories` int(1) unsigned NOT NULL, `deletable` int(1) unsigned NOT NULL, `position` int(11) NOT NULL, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `facet` LONGTEXT NOT NULL, PRIMARY KEY (`id`), UNIQUE `unique_identifier` (`unique_key`), KEY `sorting` (`display_in_categories`,`position`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
Home | Imprint | This part of the site doesn't use cookies.