Post by Jamienz » Wed Feb 17, 2016 9:17 am

Hi Guys i would like to change the search function to also search "Search in product descriptions" & "Search in subcategories" by default is there any way to do this like have them always checked?
Any help would be much appreciated :)

Newbie

Posts

Joined
Wed Feb 17, 2016 9:13 am

Post by villagedefrance » Wed Feb 17, 2016 8:19 pm

Ok, there are two things here:

ONE : You cannot search "in sub-categories" unless you have selected a specific Category.

TWO : You can set "search in product description" like this:

The current code is as follow:

Code: Select all

<?php if ($description) { ?>
  <input type="checkbox" name="description" value="1" id="description" checked="checked" />
<?php } else { ?>
  <input type="checkbox" name="description" value="1" id="description" />
<?php } ?>
Change it to:

Code: Select all

<input type="checkbox" name="description" value="1" id="description" checked="checked" />
... in "catalog/view/theme/default (or customtheme)/template/product/search.tpl"

Not tested but that should work.

OpenCart custom solutions @ https://villagedefrance.net


User avatar
Active Member

Posts

Joined
Wed Oct 13, 2010 10:35 pm
Location - UK

Post by Jamienz » Thu Feb 18, 2016 5:24 am

Thanks mate will give it a go and let you know if it works, cheers

Newbie

Posts

Joined
Wed Feb 17, 2016 9:13 am

Post by Jamienz » Thu Feb 18, 2016 10:39 am

Ok Thanks that worked but does not work off the main seach at the top of the page? any suggestions?

Newbie

Posts

Joined
Wed Feb 17, 2016 9:13 am
Who is online

Users browsing this forum: No registered users and 28 guests