You are here:  » How to change the search term "brand" to something else?

Support Forum



How to change the search term "brand" to something else?

Submitted by urmyworld on Fri, 2012-02-17 12:43 in

Hi David,

I have looked elsewhere in this forum for the solution for this but am missing it.

All I would like to do is change the word "brand" that appears beneath the search box,

for example merchant, category, brand, .... would appear as merchant, category, xyz,

Your advice is always appreciated.

David S

Submitted by support on Sun, 2012-02-19 08:51

Hi David,

No problem, first of all edit search.php and look for the following code at line 77:

      case "brand":
        $fields = array("merchant","category","brand");

...and REPLACE with:

      case "xyz":
        $fields = array("merchant","category","xyz");

Then the following code at line 103:

        $where .= " ".$field." = '".database_safe($parts[$i])."' ";

...and REPLACE with:

        if ($field=="xyz") $field = "brand";
        $where .= " ".$field." = '".database_safe($parts[$i])."' ";

With that in place, if using clean URLs edit your .htaccess file and simply replace each instance of "brand" with "xyz" (4 occurrences). Finally, the link to /brand/ generated by index.php at line 22:

  print "<a href='".($config_useRewrite?"brand/":"brands.php")."'>".translate("brand")."</a>";

...should be replaced with:

  print "<a href='".($config_useRewrite?"xyz/":"brands.php")."'>".translate("brand")."</a>";

If not using clean URLs, brands.php could be renamed as xyz.php, and then edit the file and look for the following code at line 24:

  $item["href"] = "search.php?q=brand:".urlencode($product["brand"]).":";

...and REPLACE with:

  $item["href"] = "search.php?q=xyz:".urlencode($product["brand"]).":";

Hope this helps!

Cheers,
David.
--
PriceTapestry.com