You are here:  » Change Merchant into Shop, Category into nothing

Support Forum



Change Merchant into Shop, Category into nothing

Submitted by Al on Fri, 2008-08-08 19:49 in

I know there is already a topic about this issue. But hat topic is quite old, the files have changed in the mean time, so I am lost... ;-)

My question: How can I change the printed word Merchant into Shop? And the printed word Category into either nothing or if that is not possible, into some other word?

The search results line ("search results for merchant: ") is also printed in BIG BOLD letters. How can I make this a smaller font?

Thank you for your help.

With regards,
Al

Submitted by support on Sat, 2008-08-09 07:36

Hello Al,

Changing merchant into "shop" (and either of the other sort types - "category" and "brand") is basically just a case of changing each reference to the word you want to use. Taking merchant > shop as an example, start with your .htaccess and change the following section:

RewriteRule ^merchant/$ merchants.php
RewriteRule ^merchant/(.*)/$ search.php?q=merchant:$1:&rewrite=1%{QUERY_STRING} [L]
RewriteRule ^merchant/(.*)/(.*).html$ search.php?q=merchant:$1:&page=$2&rewrite=1%{QUERY_STRING} [L]

...to use "shop" instead as follows:

RewriteRule ^shop/$ merchants.php
RewriteRule ^shop/(.*)/$ search.php?q=shop:$1:&rewrite=1%{QUERY_STRING} [L]
RewriteRule ^shop/(.*)/(.*).html$ search.php?q=shop:$1:&page=$2&rewrite=1%{QUERY_STRING} [L]

Then, in search.php, look for the following section of code:

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

...and change this as follows:

      case "shop":
        // pass through to category
      case "category":
        // pass through to brand
      case "brand":
        // change the modified names back to the database names
        if ($parts[0]=="shop") $parts[0] = "merchant";
        $where = " ".$parts[0]."='".database_safe($parts[1])."' ";

Finally, the places where "/merchant/" or "merchant:" are generated by the script need to be changed to "shop". These are:

index.php
merchants.php
products.php
reviews.php

In these files, simply use your your text editor's search and replace tool to change (without the quotes):

"merchant:" > "shop:"

and

"merchant/" > "shop/"

Cheers,
David.

Submitted by Al on Wed, 2008-08-13 20:06

It worked!!! I did not expect anything else... ;-)

Thank you for your help.