![]() |
Remove 'SKU' etc. from subcategory search bar
My client wanted me to remove the 'SKU' 'Product' (which means 'title') and 'Default' search options, from the category and subcategory pages, just leaving 'Price', as he only has a few items in each category.
I thought this was going to be really difficult, but a simple Google search directed me to another post on this forum, where Balinor explained which PHP file actually performs the search command. Edit include/search.php and from line 41 you should see: Code:
$sort_fields = array( Simply put a # symbol at the start of the line of each of the search functions you want to temporarily remove - the # symbol at the start of a line means 'comment out this line' - i.e. don't run those commands. (This is only in PHP files, for Smarty templates, you need to use {* and *} to comment out sections.) So I did the following: Code:
$sort_fields = array( Took me two minutes, and now only the 'Price' search shows up, but I can easily uncomment any of the others, at any time in the future. |
All times are GMT -8. The time now is 06:35 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.