Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Specific Product - Redirect HELP lol


jamyers79

Recommended Posts

Posted

Please help.

I have a product bundle that I've created. And I would like to have it so when the product comes up in a search that on the click, rather than going to the standard product_info.php page, I'd like it to go to a separate page. But it's only for this specific product.

 

How would I even go about doing this?

 

again, please help... I'm kind of desperate.

thx

:'(

Posted
Please help.

I have a product bundle that I've created. And I would like to have it so when the product comes up in a search that on the click, rather than going to the standard product_info.php page, I'd like it to go to a separate page. But it's only for this specific product.

 

How would I even go about doing this?

 

again, please help... I'm kind of desperate.

thx

:'(

Check the product id and in the php page place some lines at the start that checks if the product id has been posted and its value is what you want if thats the case just get it redirected

<?

if

{ HTTP_POST_VARS['product_id] = '101' redirect to www.site.com/page.php

}

?>

 

Hope this does

Just check the page you want and please place proper syntax.

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Posted
Check the product id and in the php page place some lines at the start that checks if the product id has been posted and its value is what you want if thats the case just get it redirected

<?

if

{ HTTP_POST_VARS['product_id] = '101' redirect to www.site.com/page.php

}

?>

 

Hope this does

Just check the page you want and please place proper syntax.

 

 

 

This is what I've done to try to get this to work...

 

in filenames.php

 

define('FILENAME_GAME_BUNDLE', gamingpackage . '.php');

 

 

then at the top of the product_info.php page:

 

<?php if (($product_info['products_id']) == '598') {

tep_redirect(tep_href_link(FILENAME_GAME_BUNDLE)); }

?>

<?php

 

 

It reads through the statement and takes it to: /product_info.php?products_id=598

 

I want it to just go to my gamingpackage.php file...

 

What am I doing wrong here?

 

I tried your way with the

 

<?

if

{ HTTP_POST_VARS['product_id] = '101' redirect to www.site.com/page.php

}

?>

 

but I can't get the syntax right in that at all.

Posted

I have the redirect working now. However, it won't work for any other product now like it did before. This is what I have at the top of the page...

 

  require('includes/application_top.php');

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);


$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, 
p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, 
p.products_date_added, p.products_date_available, p.manufacturers_id, p.products_bundle from " . TABLE_PRODUCTS . " p, " . 
TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' 
and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
   $product_info = tep_db_fetch_array($product_info_query);

if ($HTTP_GET_VARS['products_id'] == '598') { tep_redirect(tep_href_link(FILENAME_GAME_BUNDLE)); } ?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

 

I'm thinking of course that I need an else statement of some kind to tell it to go thru the rest of the page...

 

Any suggestions?

Archived

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

×
×
  • Create New...