You are here:  » Changing CATEGORY, BRAND & MERCHANT naming


Changing CATEGORY, BRAND & MERCHANT naming

Submitted by speak2daryl on Mon, 2016-10-10 01:35 in

Hi,

Is there any easy way to change the naming of CATEGORY, BRAND & MERCHANT on the index page and if possible on the other area's of the site? I.E keep the functionality the same but just change the naming.

Thanks

Submitted by support on Mon, 2016-10-10 09:11

Hi,

Sure - there is now a central function where all rewrite links (slugs) are generated. First, edit includes/tapestry.php and look for the following code at lines 309, 313 and 317 respectively;

    $indexHREF["merchant"][TRUE] = "merchant/";

    $indexHREF["category"][TRUE] = "category/";

    $indexHREF["brand"][TRUE] = "brand/";

Make changes as required here, and then make the corresponding changes in .htaccess at lines 11-13, 15-17 and 19-21. For example, changing from merchant/ to store/, lines 11-13 would be changed as follows;

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

Cheers,
David.
--
PriceTapestry.com

Submitted by speak2daryl on Mon, 2016-10-10 12:05

Hi David,

Done that successfully. Just one final question, how do I change the names on the menu at the top of the homepage, the one that says "Catagory A-Z Brand A-Z Merchant A-Z"

Thanks,

Daryl

Submitted by support on Mon, 2016-10-10 12:12

The links are generated in html/menu.php - see lines 33, 37 and 39 respectively. The Category / Merchant / Brand parts are contained in translate() calls so you could either edit in-situ, or add to includes/translate.php for example:

  $translate["Category"] = "Store";

Cheers,
David.
--
PriceTapestry.com