File tree 4 files changed +40
-2
lines changed
view/frontend/templates/search
4 files changed +40
-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,8 @@ 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 =
25
+ self ::WIZZY_SEARCH_FACETS_CONFIGURATION . "/left_facets_has_to_display_in_drawer " ;
24
26
const WIZZY_FACET_CATEGORY_DISPLAY = self ::WIZZY_SEARCH_FACETS_CONFIGURATION . "/category_facet_display_method " ;
25
27
const WIZZY_LEFT_FACETS_COLLAPSIBLE = self ::WIZZY_SEARCH_FACETS_CONFIGURATION . "/left_facets_has_to_collapsible " ;
26
28
const WIZZY_LEFT_FACETS_DEFAULT_COLLAPSIBLE_BEHAVIOUR =
@@ -102,6 +104,15 @@ public function getFacetsConfiguration()
102
104
return json_decode ($ facetsConfig , true );
103
105
}
104
106
107
+ public function leftFacetsHasToDisplayAsDrawer ()
108
+ {
109
+ return $ this ->configManager ->getStoreConfig (
110
+ self ::WIZZY_FACETS_DISPLAY_AS_DRAWER ,
111
+ $ this ->storeId
112
+ );
113
+ }
114
+
115
+
105
116
public function getCategoryDisplayMethod ()
106
117
{
107
118
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,9 @@ $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}}
12
+ {{/displayFacetsInDrawer}}">
11
13
12
14
<div class="wizzy-search-summary-wrapper">
13
15
{{#summary}}
@@ -47,7 +49,16 @@ $addMoveToTopWidget = $configs['search']['configs']['pagination']['moveToTopWidg
47
49
<div class="wizzy-search-results-container">
48
50
49
51
<div class="wizzy-search-filters-top">
50
-
52
+ {{#displayFacetsInDrawer}}
53
+ <div class="wizzy-search-filters-drawer">
54
+ <div class="wizzy-search-filters-drawer-button">
55
+ <a href="#" class="wizzy-filters-desktop-entry">
56
+ <span class="wizzy-filters-button"></span>
57
+ <span>Filters</span>
58
+ </a>
59
+ </div>
60
+ </div>
61
+ {{/displayFacetsInDrawer}}
51
62
<div class="search-filters-top-wrapper">
52
63
<div class="wizzy-search-filters-list-top">
53
64
{{#topFacets}}
You can’t perform that action at this time.
0 commit comments