What's New
Tagged: category search
- AuthorPosts
Hi,
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.Thanks,
SergiyAttachments:
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.Attachments:
Hi Jonny,
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):
https://addons.prestashop.com/en/search-filters/26218-search-by-category.htmlThanks,
SergiyThanks 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.Just back to the search module. Thanks again for all your suggestions, I will take them. The module will be possible to show out search box on mobile version, check these demos http://transformer2.sunnytoo.com/thirteenth/en/ http://transformer2.sunnytoo.com/fifteenth/en/
Hi Jonny,
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
https://pointfindertheme.com/demo/home-page-mini-search/Regards,
SergiyAttachments:
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.HI Jonny,
I installed the new search by category module on my site and tested with op-cache turned off. Please see my review.
Issues:
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.Sugessions:
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 categoryI deactivated the new search module from my site and is going to wait for your feed back.
Regards,
SergiyAttachments:
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);
To
$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.Regards,
JonnyAttachments:
HI Jonny,
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/.. 🙂Bugs:
1) I changed “Placeholder:” value, but do not see it on the search input box. I see “Search our catalog” insteadQuestions:
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)?:
Background:
Text color:
Placeholder color:
Border color: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 searchSuggestions:
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.
Desired logic:
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
==Code improvements:
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.
Thanks,
SergiyHI Jonny,
I found a new issue in addition to previous issues/questions.
issue:
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?here some findings:
https://stackoverflow.com/questions/46199371/session-cookies-expire-way-sooner-on-mobile-than-on-desktopThanks.
Sergiy- AuthorPosts
You must be logged in to reply to this topic.