Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

"Add a BACK button in the product_info"


Guest

Recommended Posts

I installed "Add a BACK button in the product_info" for MS2.2 and button shows up perfectly but when you click on it it takes you to the Events Calendar current months page. I have included the code here as it is now, along with the install instructions I followed. Any help would be greatly appreciated.

 

Code;

                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

                <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>

<?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

    }

?>

               

                <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>

 

Instructions;

"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.

Link to comment
Share on other sites

  • 7 months later...

i added the back button code to product_info.php from the "Add_BACK_button.zip" contribution but when I do the "Pricing Retail Ezier New Fields 5.0_1" pricing info disappears (ie Retail Price, Your Price, etc).

 

Anyone know how to fix this or add 'back button' without the ezier pricing info vanishing?

 

 

cheers

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...