You are here:  » Change merchant into shop in search bar and search results text

Support Forum



Change merchant into shop in search bar and search results text

Submitted by Al on Sun, 2008-02-24 20:29 in

I found several topics on this, some from 2006.

I tried to change all merchant/ into shop/
in the following files:

product.php
index.php
htaccess.txt

This gave a parse error.

I changed in htaccess.php q=merchant: into q=shop:
Then it was all running fine again.
Except:

I did not see merchant changed into shop.... It was all the same as before the changes.
Do I overlook something? Do I need to import all feeds again, maybe to make changes work? (did not do that... :-x )

Submitted by support on Mon, 2008-02-25 09:28

Hello Al,

You will also need to make changes in search.php, however be careful as the instances of merchant, category and brand that are used to make the SQL statements must stay as they are, otherwise the SQL will break!

For example, where you have this code:

      case "merchant":
        // pass through to category
      case "category":
        // pass through to brand
      case "brand":
        $where = " ".$parts[0]."='".database_safe($parts[1])."' ";

...this actually constructs the SQL from the value in the query, so this would need to be changed as follows:

      case "shop":
        // pass through to category
      case "category":
        // pass through to brand
      case "brand":
        if ($parts[0]=="shop") $field = "merchant"; else $field = $parts[0];
        $where = " ".$field."='".database_safe($parts[1])."' ";

Cheers,
David.

Submitted by Al on Mon, 2008-02-25 10:25

In search.php I changed the code above.
In search.php products.php index.php htaccess.txt I changed all merchant/ into shop/

Result:
When I click on a merchant in the merchant list is does not show the results anymore. And it still comes back with merchant:TheShop in the search bar. Instead of shop:TheShop what I would like to see.
The text below the search bar: No search results for merchant:TheShop i.s.o shop:TheShop

Maybe you can have a look at it once more...

Submitted by support on Mon, 2008-02-25 11:10

Hello Al,

If you want to email me your modified search.php (reply to your reg code or forum registration email) i'll take a look for you!

Cheers,
David.