Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to make OSC display items/product name in URL?


grace819

Recommended Posts

Hi,

 

I've been searching the message boards regarding this but couldn't find anything which is why I'm posting this. I've noticed that for whenever you create a certain new product/category, OSC generates the URL something similar to this:

 

http://www.yoursite.com/catalog/product_in...products_id=101

 

I would like to know if its possible to have OSC generate the title in the URL automatically. For example, if I create a new product titled Finding Nemo DVD, the url will reflect the title as such like:

 

http://www.yoursite.com/catalog/product_in...inding_nemo_dvd

 

The reason for this change is I hope that this will improve my product ranking as such in search engines. Is there a way to go about doing this in OSC? Thanks.

Link to comment
Share on other sites

find in product listing the following about line 90

 

 

switch ($column_list[$col]) {

case 'PRODUCT_LIST_MODEL':

$lc_align = '';

$lc_text = ' ' . $listing['products_model'] . ' ';

break;

case 'PRODUCT_LIST_NAME':

$lc_align = '';

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>';

} else {

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

break;

 

 

and make it like this:

 

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

 

 

Odiseas

TheGreekWeb

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...