giwrgos88 Posted August 8, 2017 Share Posted August 8, 2017 Hello, I want to make the Faceted search available not only on categories but also available on new products and search page. Does anyone knows what I have to do? thanks Link to comment Share on other sites More sharing options...
chirag_0110 Posted December 28, 2017 Share Posted December 28, 2017 Hi giwrgos88, Did you find any solution? I also want to add a filter to new product page & price drop page. Thanks, Chirag Link to comment Share on other sites More sharing options...
selectshop.at Posted December 28, 2017 Share Posted December 28, 2017 Use the native module "block layered navigation". How to configure: https://www.prestashopmanager.com/useful-articles/tips-tricks/let-your-customers-make-product-search-precise-with-layered-navigation/ Also on YouTube you will find some tutorials. Link to comment Share on other sites More sharing options...
selectshop.at Posted December 28, 2017 Share Posted December 28, 2017 There is no native solution for to show the filter on page "new products" and "drop price page". This is as for other lower Prestashop versions a customized work. If you want I move your question to the job offer forum section. A good filter with flexible customization that I know you will find here: https://www.prestashop.com/forums/topic/179001-module-filter-products-pro-filter-and-search-advanced-of-products/ Ask the developer if the filter is also shown on new products and drop price page. For PS 1.6. you will find here a solution: https://www.prestashop.com/forums/topic/297566-display-the-layered-navigation-block-in-new-products-prices-drop-and-best-sales/ Link to comment Share on other sites More sharing options...
Dan1 Posted August 28, 2019 Share Posted August 28, 2019 On 8/8/2017 at 7:10 AM, giwrgos88 said: Hello, I want to make the Faceted search available not only on categories but also available on new products and search page. Does anyone knows what I have to do? thanks I would like to do this also. Is there any information about it? Faceted Search module doesn't show on search pages. Link to comment Share on other sites More sharing options...
afshop Posted March 6, 2020 Share Posted March 6, 2020 On 8/28/2019 at 2:06 AM, Dan1 said: I would like to do this also. Is there any information about it? Faceted Search module doesn't show on search pages. Hello, Do you have find a solution to show the Faceted Search module on search pages? Thanks Angela Link to comment Share on other sites More sharing options...
Estian Posted June 15, 2020 Share Posted June 15, 2020 (edited) On 3/6/2020 at 8:35 PM, afshop said: Hello, Do you have find a solution to show the Faceted Search module on search pages? Thanks Angela I've been looking into this and it seems possible if you edit the following line in "/modules/ps_facetedsearch/src/Hook/ProductSearch.php (line #54)" (PrestaShop 1.7.6.5): if ($query->getIdCategory()) { And update it to: if ($query->getIdCategory() || $query->getSearchString()) { Seems to do the trick of adding the ps_facetedsearch module to the search page. You need to of course make sure that the ps_facetedsearch module is hooked into the appropriate display hook (displayLeftColumn for me), and that the search page uses your theme template that makes use of the left column. Still investigating this, unsure if there are better solutions. This seems to be the easiest. Edited June 15, 2020 by Estian (see edit history) 2 Link to comment Share on other sites More sharing options...
Jluis Posted June 26, 2020 Share Posted June 26, 2020 Hello , i would like to show faced search for best-sellers page , i add Quote if ($query->getIdCategory() || $query->getQueryType() == 'best-sales' || $query->getQueryType() == 'new-products' ) it shows but the number of products shown in 'best-sales' are more than 'best-sales' before adding the condition. Any idea ? 1 Link to comment Share on other sites More sharing options...
Estian Posted July 7, 2020 Share Posted July 7, 2020 On 6/26/2020 at 6:00 PM, Jluis said: Hello , i would like to show faced search for best-sellers page , i add it shows but the number of products shown in 'best-sales' are more than 'best-sales' before adding the condition. Any idea ? Hi Jluis, I'm also having the issue of the products not showing correctly when I apply the change as per my previous comment. At first I had not noticed that by changing the condition it also seems to have changed the query for fetching the actual products. So I am not so sure - but I feel like we are close to a solution. Link to comment Share on other sites More sharing options...
Isu Posted July 7, 2020 Share Posted July 7, 2020 Also looking for solution how to do it Link to comment Share on other sites More sharing options...
snqzox Posted July 26, 2020 Share Posted July 26, 2020 Hi, here is the answer. If you want to include Faceted search module on Manufacturer (Brand) detail page. Just modify file ""/modules/ps_facetedsearch/src/Hook/ProductSearch.php - line: 54" from: if ($query->getIdCategory()) { to: if ($query->getIdCategory() || $query->getIdManufacturer()){ If you want to display Faceted search module also on the Search page (as Estian said): if ($query->getIdCategory() || $query->getSearchString() || $query->getIdManufacturer()){ ✌️ Link to comment Share on other sites More sharing options...
Estian Posted July 27, 2020 Share Posted July 27, 2020 11 hours ago, snqzox said: Hi, here is the answer. If you want to include Faceted search module on Manufacturer (Brand) detail page. Just modify file ""/modules/ps_facetedsearch/src/Hook/ProductSearch.php - line: 54" from: if ($query->getIdCategory()) { to: if ($query->getIdCategory() || $query->getIdManufacturer()){ If you want to display Faceted search module also on the Search page (as Estian said): if ($query->getIdCategory() || $query->getSearchString() || $query->getIdManufacturer()){ ✌️ Unfortunately this solution does not work for me - as when you add "$query->getSearchString()" to this conditional DOES add the filter to the search page, but it also "hijacks" the results of the page - making the actual search results incorrect. Link to comment Share on other sites More sharing options...
snqzox Posted July 27, 2020 Share Posted July 27, 2020 Actualy, you are right. It's not working - sorry for my comment. Adding this code will display Faceted search module on search/manufacturer page, but it will also display all the products from your database in the product list. Link to comment Share on other sites More sharing options...
ipublivoro Posted September 12, 2020 Share Posted September 12, 2020 Any news? 1 Link to comment Share on other sites More sharing options...
Estian Posted September 16, 2020 Share Posted September 16, 2020 @ipublivoro Unfortunately no news. We have not yet been able to solve this. Link to comment Share on other sites More sharing options...
byronpk Posted December 15, 2020 Share Posted December 15, 2020 I was recently faced with a similar issue and made a very janky modification to the ps_facetedsearch module to allow it to function on the search results page of a store I was working on for a client. Bare in mind, it's hella jank, but it seems to work just fine. I also enabled it to work on the "brands" pages. I'm sure it can be made to work in other places, but it's a very janky and involved set of mods that need to be made to work as required. Feel free to run through the files, I'm sure a simple diff will show where changes needed to be made to make it work ps_facetedsearch.zip 1 1 Link to comment Share on other sites More sharing options...
Dupflo Posted December 15, 2020 Share Posted December 15, 2020 Hey @Byronpk, was just looking for this ! I will test your module and let you know how it works since I am looking to implement it on new product, best sales and promotions Link to comment Share on other sites More sharing options...
byronpk Posted December 15, 2020 Share Posted December 15, 2020 1 minute ago, Dupflo said: Hey @Byronpk, was just looking for this ! I will test your module and let you know how it works since I am looking to implement it on new product, best sales and promotions I'm unsure if it could be made to work on the new product, best sales and promotions pages, mostly because those pages use their own SearchAdaptors and the entire basis of getting this to work was in modifying the SearchProvider, Converter and SearchAdaptor classes to support the extra "fields" that it's fed from those pages. I'm sure there is a way, but given how it took me literal hours of reverse engineering and pouring over the code to get it to work in the fashion that it is right now, I'm not really sure how much more can be done to it, but in theory, anything should be possible if you can make the right mods to the SearchAdaptor. The least I can do at this point is showing that it does in fact work well enough on my local test platform. Link to comment Share on other sites More sharing options...
Alecs_run Posted April 18, 2021 Share Posted April 18, 2021 (edited) Hello @byronpk, I tried your solution, it works quite well on the Search Page. But I cannot display result when searching "Brand name" or "Parent-Categorie" for example. Do you know any way to do so please ? Regards, Alex Edited April 18, 2021 by Alecs_run (see edit history) Link to comment Share on other sites More sharing options...
Eutanasio Posted June 2, 2021 Share Posted June 2, 2021 interested! still no clue how to include faceted search on "drop price page"? Link to comment Share on other sites More sharing options...
Coach G Posted November 26, 2021 Share Posted November 26, 2021 I've been recently tasked by a client to modify filters module to work in manufacturer pages, these are the changes I made, it works pretty well: 1. In file modules/ps_facetedsearch/src/Hook/ProductSearch.php replace this line if ($query->getIdCategory()) { With this line if ($query->getIdCategory() || $query->getIdManufacturer()) { 2. In file modules/ps_facetedsearch/src/Filters/Converter.php below this line $facetAndFiltersLabels = $this->urlSerializer->unserialize($query->getEncodedFacets()); Add these lines // on manufacturer pages we make sure that manufacturer filter is selected if (!isset($facetAndFiltersLabels['manufacturer']) && ($idManufacturer = $query->getIdManufacturer())) { $searchFilters['manufacturer'][] = $idManufacturer; } 3. In file /modules/ps_facetedsearch/src/Filters/Block.php below this line case 'manufacturer': Add these lines // On manufacturer pages, "manufacturer" filter should be skipped if ($this->context->controller->php_self == 'manufacturer') { continue; } Make sure to clear faceted search cache in order to see the change. One thing though, I haven't tested this solution when "manufacturer" filter is not present in filters template. In case it doesn't work for you, try adding it to your template 1 1 Link to comment Share on other sites More sharing options...
Giuseppe D'Onofrio Posted November 30, 2021 Share Posted November 30, 2021 Hi Coach G, i've tested on my prestashop 1.7.8.0 this mod. It's show correctly on my manufacturer page but when i select any value of filter ex. subcategory of specific manufacturer there's not filter the products. In Category page it's work correctly This is a manufacturer page with different subcategory product. Work only price and available filters but does not work category. https://mamasmusicstore.it/brand/51-proel Thanks Link to comment Share on other sites More sharing options...
Coach G Posted December 1, 2021 Share Posted December 1, 2021 14 hours ago, Giuseppe D'Onofrio said: Hi Coach G, i've tested on my prestashop 1.7.8.0 this mod. It's show correctly on my manufacturer page but when i select any value of filter ex. subcategory of specific manufacturer there's not filter the products. In Category page it's work correctly This is a manufacturer page with different subcategory product. Work only price and available filters but does not work category. https://mamasmusicstore.it/brand/51-proel Thanks Hey, now when I think about it, "subcategory" filter wouldn't work indeed with this solution (the problem is that on non category pages, query will default to "Home" category and any category selections will be ignored). In order to make it work, there would have to be some additional changes made to the code Link to comment Share on other sites More sharing options...
Giuseppe D'Onofrio Posted December 1, 2021 Share Posted December 1, 2021 Can you help me to keep work on brand page? Link to comment Share on other sites More sharing options...
luke.lukas Posted December 2, 2021 Share Posted December 2, 2021 On 12/15/2020 at 1:23 PM, byronpk said: I was recently faced with a similar issue and made a very janky modification to the ps_facetedsearch module to allow it to function on the search results page of a store I was working on for a client. Bare in mind, it's hella jank, but it seems to work just fine. I also enabled it to work on the "brands" pages. I'm sure it can be made to work in other places, but it's a very janky and involved set of mods that need to be made to work as required. Feel free to run through the files, I'm sure a simple diff will show where changes needed to be made to make it work ps_facetedsearch.zip 357.22 kB · 107 downloads Great mods, have you noticed it doesn't work with the category filter. It simply doesn't show any available categories to filter by. Link to comment Share on other sites More sharing options...
El Patron Posted December 8, 2021 Share Posted December 8, 2021 we use this module on all client shops https://addons.prestashop.com/en/search-filters/18575-amazzing-filter.html#overview supports several non category pages Link to comment Share on other sites More sharing options...
Antonio Monti Posted March 7, 2022 Share Posted March 7, 2022 @byronpk Hi, I tested the module you edited, it is on its way. The thing that doesn't work well is that the array generated from the site's main search result should be passed to the module you edited. Because I have seen that the products visible as soon as the search is started are right, then the search values for aspects are not correct, in the search curtains there must be the attributes of the array that comes from the main search of the site. I don't know if you've been able to refine this aspect in the meantime. Thank you very much for the work done. Link to comment Share on other sites More sharing options...
markseinto Posted March 24, 2023 Share Posted March 24, 2023 Hi. I would like to have this filter on the homepage. Is there any customization to make it possible? Link to comment Share on other sites More sharing options...
daninapoli Posted May 8, 2023 Share Posted May 8, 2023 On 30/11/2021 at 7:31 PM, Giuseppe D'Onofrio dice: Ciao Coach G, ho testato sul mio prestashop 1.7.8.0 questa mod. Viene visualizzato correttamente sulla mia pagina del produttore, ma quando seleziono qualsiasi valore del filtro ex. sottocategoria del produttore specifico non è possibile filtrare i prodotti. Nella pagina Categoria funziona correttamente Questa è una pagina del produttore con diverse sottocategorie di prodotti. Funziona solo per prezzo e filtri disponibili ma non funziona per categoria. https://mamasmusicstore.it/brand/51-proel Grazie Hai risolto il problema ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now