Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Not Getting Correct Return to Page


surrfman

Recommended Posts

Atempted to use the following code placing a "back" button on the product_info.php page. Code was from an old addon using a back button.gif, instead of drawing a button. It worked great, taking buyer back to product_listing.php or if buyer was at checkout page, clicked to look at the product_info.php ,then back again to checkout.php, it worked famously! With the changes I was successful to get a button to draw, but all I can get is for the back button to take buyer to the shopping_cart.php page.

 

What have I done???

 

The first code snippet below is the add-on before modification, second snippet is the modified add-on;

 

 

<td class="main">

<?php $referer = $_SERVER['HTTP_REFERER'];

if (!$referer == '') {

echo '<a href="' . $referer . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>';

} else {

echo '<a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_path($current_category_id = '')) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; }

?></td>

 

<td class="main">

<?php $referer = $_SERVER['HTTP_REFERER'];

if (!$referer == '') {

echo '<a href="' . $referer . '">' . tep_draw_button(IMAGE_BUTTON_BACK, 'triangle-1-w') . '</a>';

} else {

echo '<a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_path($current_category_id = '')) . '">' . tep_draw_button(IMAGE_BUTTON_BACK, 'triangle-1-w') . '</a>'; }

?></td>

 

I can't figure how changing the button method changed the re-direct?

 

Thanks for any help possible,

 

Timmy C

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...