Page 1 of 1

Developers : Using anohter filed for SEO ?

Posted: Sun Jun 08, 2008 8:37 am
by sacards.com
Hello,
i have a question for developers ...
for categories and products , instead of having the product name or category name appears in the URL Rewrite , i would like the SKU to appear instead of product name , and Description instead of the category name .

Any idea how can i do that ?

Regards,

Re: Developers : Using anohter filed for SEO ?

Posted: Wed Jun 11, 2008 3:15 pm
by sacards.com
any help would be appreciated ... basically where can i find in the code what tells the url re-write to use product name and alter it with SKU for example
thanks

Re: Developers : Using anohter filed for SEO ?

Posted: Fri Jun 27, 2008 10:25 pm
by sacards.com
i hope someone answers this question
this is very important , because if you have non-english name for your product/catrgory , it wouldn't appear right in the url name

Re: Developers : Using anohter filed for SEO ?

Posted: Sat Jun 28, 2008 3:12 am
by sohaib
URLs are generated using UrlGenerator class.

UrlGenerator.GetBrowseUrl is called in various places in ASPX files. You need to update these calls and pass SKU instead of Product name as parameter.

For example you can replace this

Code: Select all

string url = UrlGenerator.GetBrowseUrl(product.ProductId, CatalogNodeType.Product, product.Name);
with this

Code: Select all

string url = UrlGenerator.GetBrowseUrl(product.ProductId, CatalogNodeType.Product, product.Sku);