rhath127 Posted March 28 Share Posted March 28 hey all, Is there a way to display the the left side category links as part of the search results? ie: I have searched for a product and there are results, but I would like to show the category links on the left. I haven't been able to figure this out. Link to comment Share on other sites More sharing options...
juanrojas Posted March 28 Share Posted March 28 Hi, I'm not sure if I understood your request completely, but have you taken a look at the Category Tree Links module to see if it's what you're looking for? Link to comment Share on other sites More sharing options...
rhath127 Posted March 28 Author Share Posted March 28 On 3/28/2025 at 1:07 AM, juanrojas said: Hi, I'm not sure if I understood your request completely, but have you taken a look at the Category Tree Links module to see if it's what you're looking for? Expand Hi, when I click on products - see the categories appear on the left side. But when I search for an item, nothing is on the left. Is there a way to put the categories to appear on the left when a search is done? Please refer to image Link to comment Share on other sites More sharing options...
ps8modules Posted March 28 Share Posted March 28 (edited) Hi. The left category block is displayed assuming that the parent category id or the default category id in the product detail is available. The search page does not know the category id, so the left block is not displayed. It is not that easy a task as you request, you would have to create an extra module that would display the default category of the searched product in the left column. However, it would be quite simple to display a button under the price for each product in the list, for example (Show category). e.g. button in TPL ./themes/classic/templates/catalog/_partials/miniatures/product.tpl {if isset($page.page_name) && $page.page_name == 'search'} <a href="{url entity='category' id=$product.id_category_default id_lang=$language.id}" class="btn btn-default">Go to category</a> {/if} Edited March 28 by ps8modules (see edit history) Link to comment Share on other sites More sharing options...
dinesh badrukhiya Posted March 28 Share Posted March 28 Check Template Layout File: Look into your layout files like layouts/layout-both-columns.tpl Your search page might be using a layout like layout-full-width.tpl (which has no sidebar). Change it to a layout with a left column. Link to comment Share on other sites More sharing options...
ps8modules Posted March 28 Share Posted March 28 (edited) On 3/28/2025 at 4:32 AM, dinesh badrukhiya said: Check Template Layout File: Look into your layout files like layouts/layout-both-columns.tpl Your search page might be using a layout like layout-full-width.tpl (which has no sidebar). Change it to a layout with a left column. Expand Hi. What you advise can be done in the template administration Design -> Theme & Logo At the very bottom is the Choose Layouts option. In the list you can find Search and change it to two columns. But you will only see one category "Home" 😉 Edited March 28 by ps8modules added screenshot (see edit history) Link to comment Share on other sites More sharing options...
Knowband Plugins Posted March 28 Share Posted March 28 You need to modify the code of the ps_categorytree module. You need to modify the getWidgetVariables function, that have a condition to display the category tree only on the category pages. You can add a condition of the search controller and then set the category id to 0 to show the complete tree. Note: Clicking on the category tree, will take the user to the category page; No relation between the category tree and the search results. You need to code future if you are looking for search result filter etc. Link to comment Share on other sites More sharing options...
Prestashop Addict Posted March 28 Share Posted March 28 Please can you specify PS version, because in 8.x it's an experimental feature in faceted search Link to comment Share on other sites More sharing options...
rhath127 Posted March 28 Author Share Posted March 28 @ps8modules thank you that worked like a charm!! 1 Link to comment Share on other sites More sharing options...
rhath127 Posted March 28 Author Share Posted March 28 This 2nd issue, is a bit of a visual issue than a fucntional one. I downloaded the Tophorizontalmenu module and installed it, it works but I would like to change the so its not all uppercase and the drop down to show in alphabetical order. Pic for reference Link to comment Share on other sites More sharing options...
Knowband Plugins Posted March 29 Share Posted March 29 It's also a functional change. In the module code, I believe need to change the query to sort on the basis of the name. Link to comment Share on other sites More sharing options...
rhath127 Posted April 2 Author Share Posted April 2 Thank you all for your help! Got it displaying in Alphabetical order. Any tips on how I change the size of the font? 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