Tagged: category search
Do you know how to add an additional Search filter (category) on header beside of the keyword search component?
I would like to have multi search on the header of each page.
I found that some new themes from ThemeForest already have this filter, but could not find how to do it in Transformer theme.
See attached samples from ThemeForest.
it is good to hear.
Does it show multi-level categories (see attached screen shot)?
I would need drop down module with the following functionality:
1) FRONT-END: to show multi-level (up to 3 levels) of categories
2) BACK-END: possibility to pre-select the category that will be used on front-end
3) MOBILE FRONT-END: it is become visible once user clicks the “…” oh the top right corner.
When should I expect to see the new module?
I hope it will have a nice design.
As an example: I do not like how the following module shows the categories sub-levels (ugly):
Thanks for your information and suggestions, I will take them. Could you please further explain the #3 MOBILE FRONT-END?
I worked on the module for two days latest week, but I found it would take several days to make the module be compatible with all popular themes, so I moved to another module, I will be back to the search by categories module several days later.
I do not see drop-down lists on your examples. You demo sites contain regular input search box.
I expected to see two elements: searchable drop-down list and regular searchable input box.
For my site I need to show 2 search controls:
1) searchable drop-down list: the list of Cities/regions in drop-down list (one of the Categories and all it children’s sub-categories). The selection should be stored in cookies.
2) regular input box
The City/Region selection should filter the search inside of the regular search box (input box).
The ideal drop-down list could reuse the following “Select2” jQuery library: https://select2.org/getting-started/basic-usage or any similar.
I found WordPress sample with the combined search: input box(#1) + drop-down list(#2) – see attached screenshot
I just released the module, check it here https://www.sunnytoo.com/product/search-category-auto-suggestion-module-prestashop-1-7
It has two demos, let me know what do you think of it. If you have other suggestions, I am all ears.
Thanks for your feature suggestions.
I installed the new search by category module on my site and tested with op-cache turned off. Please see my review.
1) The Search Icon is missing (see screen shot)
2) The new Search module is not visible on mobile. I didn’t find how to hook it using “Sidebar and mobile header bar” module. I had to hook it to the “displayMobileBarBottom” hook to make it visible (is it a right way of doing it?).
3) The Category Drop-down list shows as classical one with 0,5 second delay before switching to “modern” style. It is a big delay and annoying for end-users. Is it possible to apply jQuery style prior to rendering the page (apply CSS to drop-down html tag before executing Jquery function,……)? The desired behavior – to see the modern style immediately during the page load.
1) “Remember the selected category:” option remembers the selected category only after executing the search. It better to remember the selected category immediately after selection without executing the search.
2) Admin: when selecting the category – it would be nice to automatically select all it’s sub-categories (all children levels). And otherwise: deselect children categories when deselecting parent category
I deactivated the new search module from my site and is going to wait for your feed back.
1. You probably changed your theme’s name.
2. YES. The module will be hooked to the displayMobileBarBottom default if you are running on Transformer theme, but because of you changed theme name, so values for the Classic theme got applied to your site, all hooks for transformer theme are also not showing out, see attached pic.
To fix 1 and 2, you can change this code in the /modules/stadvancedserach/stadvancedserach.php
$this->_st_themes = $this->theme_name=='panda' ? 2 : ($this->theme_name=='transformer' ? 1 : false);
$this->_st_themes = 1;
3. I am working on it.
1) Good point.
2）I will see if it’s possible to add a button for that.
Thanks again for you suggestions.
I didn’t change the transformer theme name. I just created a child theme (parent:transformer) to add my own customization.
Should I apply the same changes ? Or is another way without the module modification?
- This reply was modified Dec '18 by sbordun.
I re-installed the search module to my site. Looks promising and impressive. I played with it and decided to live your module on my site.
Here is the next list of my suggestions/bugs/.. 🙂
1) I changed “Placeholder:” value, but do not see it on the search input box. I see “Search our catalog” instead
2) I need to change the style of the Category elements (visible, not drop down part) by changing the background and text colors of visible combo-box part.
Is it possible to add the following properties for Combo-box ( visible, not drop-down part)?:
3) What is the following configuration doing? I do not see any difference when switching.
“How to display search box on mobile header:”
– A search icon
– An input file. This is easy for customers to search
4) new parameter: “Search Children Categories: YES/NO”. If YES -> search logic will search products inside selected category and all children categories of all levels. if NO -> search logic will search products inside the selected category only.
5) “What to do when the category is changed:” == “Execute search”. This configuration should work as the best Canadian listing portal (https://www.kijiji.ca): selecting the new category should trigger the search immediately. Currently your module automatically executes the search only when the search was executed manually before.
a) Conditions: Input Box: empty, Combo-box: selected new catalog. Action: automatically show products in this catalog on catalog page (the same way as you clicked on this catalog from menu)
b) Conditions: Input Box: not empty, Combo-box: selected new catalog. Action: automatically search this word in selected catalog (and children catalogs)
c) Conditions: Combo-box: empty (not selected), Input box: not empty, User clicked “Enter” key or Search icon. Action: search across all inventory
d) Conditions: Combo-box: not empty (selected), Input box: not empty, User clicked “Enter” key or Search icon. Action: search this word inside selected catalog (and children catalogs)
e) Conditions: Input Box: empty, Combo-box: empty (not selected). Action: current behavior is good
To simplify: every time when drop-down selection changed => execute the search:
– if input box is empty => open the category page for the selected category
– if input box is not empty => search for the text inside of the selected category
6) Fix in your module to take the Parent theme name and add it into ST-THEMES validation logic.
Code change in /modules/stadvancedserach/stadvancedserach.php
//$this->theme_name = preg_replace("/(_?child)$/", '', Tools::strtolower(Context::getContext()->shop->theme->getName())); //$this->_st_themes = $this->theme_name=='panda' ? 2 : ($this->theme_name=='transformer' ? 1 : false); $this->theme_name = Tools::strtolower(Context::getContext()->shop->theme->getName()); $parent_theme_name = Tools::strtolower(Context::getContext()->shop->theme->get("parent","")); $this->_st_themes = ($this->theme_name=='panda' || $parent_theme_name=='panda') ? 2 : (($this->theme_name=='transformer' || $parent_theme_name=='transformer') ? 1 : false);
I tested it – this code is working as for child theme, as for Transformer theme without child theme.
- This reply was modified Dec '18 by sbordun.
I found a new issue in addition to previous issues/questions.
9) “Remember the selected category: YES”. The saved selection is working on desktop only. The selection on mobile browser is not stored for a less then 10 hours. I tested it on two different mobile android phones with help of Chrome and Firefox. The category was saved but when I visit my site in half of the day – the selected category was not selected any more. Could you investigate and fix it?
- This reply was modified 22d by sbordun.
You must be logged in to reply to this topic.