File tree 4 files changed +35
-2
lines changed
view/frontend/templates/search
4 files changed +35
-2
lines changed Original file line number Diff line number Diff line change @@ -311,6 +311,11 @@ public function getConfigs()
311
311
'sessions ' => '/wtrack/analytics/session ' ,
312
312
],
313
313
],
314
+ 'filters ' => [
315
+ 'configs ' => [
316
+ 'displayAsDrawer ' => ($ this ->storeSearchConfig ->leftFacetsHasToDisplayAsDrawer () == '1 ' ) ? true : false ,
317
+ ],
318
+ ],
314
319
];
315
320
316
321
return $ configs ;
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ class StoreSearchConfig
21
21
22
22
const WIZZY_SEARCH_FACETS_CONFIGURATION = self ::WIZZY_SEARCH_CONFIGURATION . "/search_results_facets_configuration " ;
23
23
const WIZZY_FACETS = self ::WIZZY_SEARCH_FACETS_CONFIGURATION . "/facets_configuration " ;
24
+ const WIZZY_FACETS_DISPLAY_AS_DRAWER = self ::WIZZY_SEARCH_FACETS_CONFIGURATION . "/left_facets_has_to_display_in_drawer " ;
24
25
const WIZZY_FACET_CATEGORY_DISPLAY = self ::WIZZY_SEARCH_FACETS_CONFIGURATION . "/category_facet_display_method " ;
25
26
const WIZZY_LEFT_FACETS_COLLAPSIBLE = self ::WIZZY_SEARCH_FACETS_CONFIGURATION . "/left_facets_has_to_collapsible " ;
26
27
const WIZZY_LEFT_FACETS_DEFAULT_COLLAPSIBLE_BEHAVIOUR =
@@ -102,6 +103,12 @@ public function getFacetsConfiguration()
102
103
return json_decode ($ facetsConfig , true );
103
104
}
104
105
106
+ public function leftFacetsHasToDisplayAsDrawer ()
107
+ {
108
+ return $ this ->configManager ->getStoreConfig (self ::WIZZY_FACETS_DISPLAY_AS_DRAWER , $ this ->storeId );
109
+ }
110
+
111
+
105
112
public function getCategoryDisplayMethod ()
106
113
{
107
114
return $ this ->configManager ->getStoreConfig (self ::WIZZY_FACET_CATEGORY_DISPLAY , $ this ->storeId );
Original file line number Diff line number Diff line change 580
580
</comment >
581
581
</field >
582
582
583
+ <field id =" left_facets_has_to_display_in_drawer" translate =" label" type =" select" sortOrder =" 2" showInDefault =" 0" showInWebsite =" 0" showInStore =" 1" >
584
+ <label >Display Inside Drawer?</label >
585
+ <source_model >Magento\Config\Model\Config\Source\Yesno</source_model >
586
+ <comment >
587
+ <![CDATA[
588
+ Choose Yes if you would like to display facets under drawer.
589
+ ]]>
590
+ </comment >
591
+ <validate >required-entry</validate >
592
+ </field >
593
+
583
594
<field id =" category_facet_display_method" translate =" label" type =" select" sortOrder =" 2" showInDefault =" 0" showInWebsite =" 0" showInStore =" 1" >
584
595
<label >Categories Rendering Method</label >
585
596
<source_model >Wizzy\Search\Model\Admin\Source\CategoriesRenderSelection</source_model >
Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ $addMoveToTopWidget = $configs['search']['configs']['pagination']['moveToTopWidg
7
7
<div class="wizzy-search-wrapper {{#inOnCategoryPage}}wizzy-category-page{{/inOnCategoryPage}}
8
8
{{#hasFacets}}has-facets{{/hasFacets}}
9
9
{{#hasLeftFacets}}has-left-facets{{/hasLeftFacets}}
10
- {{#hasTopFacets}}has-top-facets{{/hasTopFacets}}">
10
+ {{#hasTopFacets}}has-top-facets{{/hasTopFacets}}
11
+ {{#displayFacetsInDrawer}}has-facets-in-drawer facets-drawer-on-{{facetDrawerPosition}}{{/displayFacetsInDrawer}}">
11
12
12
13
<div class="wizzy-search-summary-wrapper">
13
14
{{#summary}}
@@ -47,7 +48,16 @@ $addMoveToTopWidget = $configs['search']['configs']['pagination']['moveToTopWidg
47
48
<div class="wizzy-search-results-container">
48
49
49
50
<div class="wizzy-search-filters-top">
50
-
51
+ {{#displayFacetsInDrawer}}
52
+ <div class="wizzy-search-filters-drawer">
53
+ <div class="wizzy-search-filters-drawer-button">
54
+ <a href="#" class="wizzy-filters-desktop-entry">
55
+ <span class="wizzy-filters-button"></span>
56
+ <span>Filters</span>
57
+ </a>
58
+ </div>
59
+ </div>
60
+ {{/displayFacetsInDrawer}}
51
61
<div class="search-filters-top-wrapper">
52
62
<div class="wizzy-search-filters-list-top">
53
63
{{#topFacets}}
You can’t perform that action at this time.
0 commit comments