Smile-SA / elasticsuite

Smile ElasticSuite - Magento 2 merchandising and search engine built on ElasticSearch
https://elasticsuite.io
Open Software License 3.0
761 stars 341 forks source link

Disable the layered navigation #474

Closed sinamiandashti closed 7 years ago

sinamiandashti commented 7 years ago

Hi Can u please provide the solution for using only engine part of this module as magento search !????

if u preserve modularity while writing this module it would be possible !

if u can but u are not allowed to do that so maybe i can fork this module and makes it only for using as a search engine !

afoucret commented 7 years ago

Hi,

The bad news : It is not possible since the layered navigation features (facets) is built using the search engine aggregation feature. We added some specific features (multi-select navigation, show more, ...) that are not compatible with Magento standard filter blocks and template (and third party modules). It is a design decision that have been made to propose more features.

The good news is that you have the ability to override facet rendering using blocks in the layout as you can see in the layout :

<referenceBlock name="catalog.leftnav" template="Smile_ElasticsuiteCatalog::layer/view.phtml">
            <block class="Smile\ElasticsuiteCatalog\Block\Navigation\FilterRenderer"
                   name="catalog.navigation.renderer"
                   as="renderer">

                    <block class="Smile\ElasticsuiteCatalog\Block\Navigation\Renderer\Attribute"
                           name="catalogsearch.navigation.renderer.attribute"
                           template="Smile_ElasticsuiteCatalog::layer/filter/attribute.phtml"
                           after="-" />

                   <block class="Smile\ElasticsuiteCatalog\Block\Navigation\Renderer\Category"
                           name="catalogsearch.navigation.renderer.category"
                           template="Smile_ElasticsuiteCatalog::layer/filter/default.phtml" />

                    <block class="Smile\ElasticsuiteCatalog\Block\Navigation\Renderer\Slider"
                           name="catalog.navigation.renderer.slider"
                           template="Smile_ElasticsuiteCatalog::layer/filter/slider.phtml" />

                   <block class="Smile\ElasticsuiteCatalog\Block\Navigation\Renderer\PriceSlider"
                          name="catalog.navigation.renderer.price.slider"
                          template="Smile_ElasticsuiteCatalog::layer/filter/slider.phtml" />
            </block>
        </referenceBlock>
    </body>
</page>

BR,

rajesh-rathod-magento commented 5 years ago

Hi Team,

Hope you are doing great!

I want to disable price slider from the layered navigation only, could you please help me.

And also, Smile Elastic search layered navigation is breaking category filter, It is directly redirecting to the category page and not doing the filter. URL generates by smile for category filter: http://demo.magento-elastic-suite.io/index.php/men/tops-men/jackets-men.html URL generates by Magento category filter: http://local.m2ee.com/men/tops-men.html?cat=15

  1. I want to disable price slider in layered navigation. Enable default Magento price filter by range.
  2. I want to enable the category filter in Magento OOTB.