Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

remove category number in the URL of product page


shenbo

Recommended Posts

Hi there,

 

I was just wondering how I can get rid of the category number in the url of a product page.

 

I want to change from

 

www.mysite.com/product_info.php?cPath=11&products_id=25

 

to

 

www.mysite.com/product_info.php?products_id=25

 

Not sure if this can be set in the admin panel or not. Can anyone help?

 

it looks like my product pages are indexed by MSN, but not by google or yahoo. Maybe having the category number on the url is a reason?

 

thanks a lot.

 

Bo

Link to comment
Share on other sites

Hi there,

 

I was just wondering how I can get rid of the category number in the url of a product page.

 

I want to change from

 

www.mysite.com/product_info.php?cPath=11&products_id=25

 

to

 

www.mysite.com/product_info.php?products_id=25

 

Not sure if this can be set in the admin panel or not. Can anyone help?

 

it looks like my product pages are indexed by MSN, but not by google or yahoo. Maybe having the category number on the url is a reason?

 

thanks a lot.

 

Bo

 

so you want to change your system on a hunch ?

 

well, it is possible but it does have consequences.

 

in many places there are lines like this:

 

<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>

 

strip out the $cpath inclusion so it becomes :

 

<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id'] . '">' . $listing['products_name'] . '</a>

 

 

this one is from the module product_listing.php

Treasurer MFC

Link to comment
Share on other sites

thanks for the help.

 

if I don't change the code, is there a way to do that through administration panel?

 

 

No

 

Charles

A kite flies highest AGAINST the wind !

 

"Life should NOT be a journey to the grave with the intention of arriving safely in an attractive and well preserved body, but rather to skid in sideways, a lover in one hand, martini in the other, body thoroughly used up, totally worn out and screaming ~ WOO HOO!! What a ride!"

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...