Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Manufacturer URL Redirect broken.


Mighty Mike

Recommended Posts

Posted

Hi All,

 

I have just noticed a problem with my manufacturers url redirect in the manufacturer_info.php info box. I am thinking this may have been caused by the osCommerce 2.2 Milestone 2 Update 051112.

 

At the moment the link is displayed like this http://www.websitename.com/redirect.php?ac...facturers_id=19

which of course causes an error

 

This is the code change which i think might have caused the problem

Lines 27-29 in catalog/redirect.php must be changed from:
if (isset($HTTP_GET_VARS['goto']) && tep_not_null($HTTP_GET_VARS['goto'])) {
 tep_redirect('http://' . $HTTP_GET_VARS['goto']);
}

to:

if (isset($HTTP_GET_VARS['goto']) && tep_not_null($HTTP_GET_VARS['goto'])) {
 $check_query = tep_db_query("select products_url from " . TABLE_PRODUCTS_DESCRIPTION . " where products_url = '" . tep_db_input($HTTP_GET_VARS['goto']) . "' limit 1");
 if (tep_db_num_rows($check_query)) {
tep_redirect('http://' . $HTTP_GET_VARS['goto']);
 }
}

 

Now the next function under that is the manufacturer url code which has not been changed

	case 'manufacturer':
  if (isset($HTTP_GET_VARS['manufacturers_id']) && tep_not_null($HTTP_GET_VARS['manufacturers_id'])) {
	$manufacturer_query = tep_db_query("select manufacturers_url from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and languages_id = '" . (int)$languages_id . "'");
	if (tep_db_num_rows($manufacturer_query)) {
// url exists in selected language
	  $manufacturer = tep_db_fetch_array($manufacturer_query);

 

Now does this code also need changing, or could it be something else causing this?

 

Any help appreciated.

 

Thanks

Mike

Archived

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

×
×
  • Create New...