Hi,
I'ma beginner regarding php coding, so i thought it would be a good ideea to ask for help in a small problem i encountered.
I downloaded the contribution Friendly URL's for Oscommerce and i must say it's wonderfull.
I tried to make a small modification regarding how page is interpreted... instead of writing the url:
www.site.com/category/page/1/
I want it to be like
www.site.com/category/pag1/
I modified the url_rewrite.php from includes/classes but even though it rewrites my url the url doesn't
work.
The modifications i made to the file are:
After
///////////////
case 'manufacturers_id':
$i++;
$manufacturer_query = ....
$manufacturer_name = tep_db_fetch_array($manufacturer_query);
$url_parts['path'] .= '/' . $this->prepare_url($manufacturer_name['manufacturers_name']);
break;
////////////
I added:
/////////////
case 'page':
$i++;
$pagina = 'pag' . (int)$url_array[$i];
$url_parts['path'] .= '/' . $this->prepare_url($pagina);
break;
///////////////
Deleted the:
//////
case 'page':
$i++;
$HTTP_GET_VARS['page'] .= $request_url_array[$i];
break;
//////
And finally added:
//////
// Adds the page to the URL array
for ($j = 1; $j <= 100; $j++) {
$pagina = 'pag' . (int)$j;
$url_array[$this->encrypt_url($pagina)] = array('key' => 'page', 'value' => (int)$i);
}
//////
before write cache...
Hope somebody can find the time to help me in this matter.