how to create custom URL

Modules, Add-ons and custom code that's more than just a quick hack or Mod.
Post Reply
elyas
Posts: 2
Joined: Mon Aug 30, 2010 2:50 pm

how to create custom URL

Post by elyas »

how can i modify how the url is displayed.

currently on my store when i click on a category i get : http://www.testshop.com/categories/Shop-iPod/

i want to change the word ( categories) in the url to (city ). i want the url to look like http://www.testshop.com/city/Shop-iPod/

help would be greatly appreciated.

cheers
CharlieFoxtrot
Confirmed
Confirmed
Posts: 413
Joined: Sun Aug 09, 2009 1:23 pm

Re: how to create custom URL

Post by CharlieFoxtrot »

The word "categories" appears to be defined at the top of /lib/general.php and you may be able to make the change there.

This may be a good starting point... but it may not work properly if you've ALREADY created categories using the default "categories".

THIS IS JUST A GUESS on my part (and maybe someone can confirm or clarify for me) but if you change "general.php" and redefine the word "categories", it might break existing categories... and it may only be applied to newly created categories.

As always, keep backups of your work and your database before making changes.

In any case, this is ONLY a starting point and NOT a guaranteed solution. Everything here is at your own risk.

Good luck! Let us know how it goes.

Charlie
ISC 4.0.7

"... and let's be honest that whole "by design" thing is getting old too."
elyas
Posts: 2
Joined: Mon Aug 30, 2010 2:50 pm

Re: how to create custom URL

Post by elyas »

Hi charlie

thanks for you input and i did try to change the (define("CAT_LINK_PART", "categories"); ) in /lib/general.php file.

but i get this error. I deleted all categories and created a new one but still the same problem.

********************************
Not Found

The page you were looking for appears to have been moved, deleted or does not exist.

This is most likely due to:

* An outdated link on another site
* A typo in the address / URL
************************************************************************

i searched categories.php and products.php page to see if i can work out where the variable is declared. but had no luck.

any help or direction?
CharlieFoxtrot
Confirmed
Confirmed
Posts: 413
Joined: Sun Aug 09, 2009 1:23 pm

Re: how to create custom URL

Post by CharlieFoxtrot »

Soory, I'm at a loss. There must be other references to the word "categories" that must also be changed to match any edits that are made to general.php
ISC 4.0.7

"... and let's be honest that whole "by design" thing is getting old too."
Post Reply