Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding a Back Button to Item description pages


Guest

Recommended Posts

Posted

Hi.. is there any way I can add a back button to the item description page, so it will take the user back to the category page?

Posted

Search the contributions for "back button"

Installed Contributions: CCGV, Close Popup, Dynamic Meta Tags, Easy Populate, Froogle Data Feeder, Google Position, Infobox Header Entire Row, Live Support for OSC, PayPal Seal with CC images, Report_m Sales, Shop by Price Revised, SQL Updater, Who's Online Enhancement, Footer, GNA EP Assistant and still going.

Posted

I just stick this in the english files:

 

<CENTER><A href="java script:history.go(-1)">

<IMG src="images/button_back.gif" border="0"></A>

 

Not sure if its technically correct but seems to work for me!

 

Sarah

Posted

This is from the Add_BACK_Button Contribution. Real simple and works great.

 

"Add a BACK button in the product_info" 
for MS2.2

This is a small modification in order to alow costumers to go back when they are in the product info page.


Step 1:
Open the file catalog/product_info.php

Step 2:
Find this:
it is about line 212

<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>

And after add this:

<?php
   $back = sizeof($navigation->path)-2;
   if (isset($navigation->path[$back])) {
?>
               <td class="main" align="center"><?php echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
<?php
   }
?>


You are done it.

I wish this to be usefull to some people.

_____________
Dimitris Behtsis

Installed Contributions: CCGV, Close Popup, Dynamic Meta Tags, Easy Populate, Froogle Data Feeder, Google Position, Infobox Header Entire Row, Live Support for OSC, PayPal Seal with CC images, Report_m Sales, Shop by Price Revised, SQL Updater, Who's Online Enhancement, Footer, GNA EP Assistant and still going.

  • 1 year later...
Posted

I was having a bit of trouble with this as I use the Search Engine Friendly URLs 'ON' option. So I came up with this bit of code (I've styled the button using adtional CSS but you could work this into any site). This takes you back to the last category or sub category you looked at.

 

Add this where ever you want in the products_info.php page:

 

<a href="' . tep_href_link(FILENAME_DEFAULT . '/cPath/' . $current_category_id) . '" class="continue">Continue shopping</a>

 

I've totally hacked OSCommerce so I'm not sure you have the $current_category_id variable set. Let me know if you do.

Archived

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

×
×
  • Create New...