jtr24 Posted August 22, 2005 Posted August 22, 2005 When I click a link it will pop up but will not go to the right URL. My problem is this is what my redirect.php file looks like: <?php header ('Location: order_info.php?osCsid='.$HTTP_GET_VARS['osCsid']); ?> In the Read Me file it says to add this code to your catalog/redirect.php file: ------------------------------------/catalog/redirect.php ------------------------------------ after this, (around line 30) 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); if (tep_not_null($manufacturer['manufacturers_url'])) { tep_db_query("update " . TABLE_MANUFACTURERS_INFO . " set url_clicked = url_clicked+1, date_last_click = now() where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and languages_id = '" . (int)$languages_id . "'"); tep_redirect($manufacturer['manufacturers_url']); } } else { // no url exists for the selected language, lets use the default language then $manufacturer_query = tep_db_query("select mi.languages_id, mi.manufacturers_url from " . TABLE_MANUFACTURERS_INFO . " mi, " . TABLE_LANGUAGES . " l where mi.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and mi.languages_id = l.languages_id and l.code = '" . DEFAULT_LANGUAGE . "'"); if (tep_db_num_rows($manufacturer_query)) { $manufacturer = tep_db_fetch_array($manufacturer_query); if (tep_not_null($manufacturer['manufacturers_url'])) { tep_db_query("update " . TABLE_MANUFACTURERS_INFO . " set url_clicked = url_clicked+1, date_last_click = now() where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and languages_id = '" . (int)$manufacturer['languages_id'] . "'"); tep_redirect($manufacturer['manufacturers_url']); } } } } break; add, // VJ Links Manager v1.00 begin case 'links': require(DIR_WS_FUNCTIONS . 'links.php'); $links_query = tep_db_query("select links_url from " . TABLE_LINKS . " where links_id = '" . (int)$HTTP_GET_VARS['goto'] . "'"); if (tep_db_num_rows($links_query)) { $link = tep_db_fetch_array($links_query); tep_update_links_click_count($HTTP_GET_VARS['goto']); tep_redirect($link['links_url']); } break; // VJ Links Manager v1.00 end Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.