Developers : Using anohter filed for SEO ?

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
sacards.com
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 28
Joined: Wed Jun 04, 2008 1:45 am

Developers : Using anohter filed for SEO ?

Post by sacards.com » Sun Jun 08, 2008 8:37 am

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,

sacards.com
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 28
Joined: Wed Jun 04, 2008 1:45 am

Re: Developers : Using anohter filed for SEO ?

Post by sacards.com » Wed Jun 11, 2008 3:15 pm

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

sacards.com
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 28
Joined: Wed Jun 04, 2008 1:45 am

Re: Developers : Using anohter filed for SEO ?

Post by sacards.com » Fri Jun 27, 2008 10:25 pm

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

User avatar
sohaib
Developer
Developer
Posts: 1079
Joined: Fri Jan 23, 2004 1:38 am

Re: Developers : Using anohter filed for SEO ?

Post by sohaib » Sat Jun 28, 2008 3:12 am

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);

Post Reply