schafferer/product-category-filter-bundle
add new category filter style
Requires
- chameleon-system/elasticsearch-bundle: ~6.1.0
README
Adds category tree as product list filter instead of normal category navigation.
Installation
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require "product-category-filter-bundle": "~6.0"
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation. Be sure to adjust the version information "~6.0" to the actual version you need.
Step 2: Enable the Bundle
Then, enable the bundle by adding the following line in the app/AppKernel.php
file of your project:
<?php
// app/AppKernel.php
// ...
public function registerBundles()
{
$bundles = array(
// ...
new \Schafferer\ProductCategoryFilterBundle\SchaffererProductCategoryFilterBundle()
);
}
Step 3: Snippet Chain
The bundle has its own snippets. To use them add following directory to your theme snippet chain in CMS
../../../../vendor/schafferer/product-category-filter-bundle/Resources/views
Step 4: CMS Configuration
Add new category filter to your list filter entries with following required values.
Filter-Typ = Produktkategoriebaum Service ID des ElasticsearchFilterDataProvider = schafferer.product_category_filter.category_data_provider Twigtemplate, mit dem das Filterelement in Elasticsearch gerendert werden soll = pkgShopListFilter/categoryFilter.html.twig
Then you have to add the service ID for the search modifiers "chameleon_system.elasticsearch.query_search_modifier" to the "Artikellistenfilter" you want to filter with elastic search.