Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OSC 2.3.1 product_info back button


blr044

Recommended Posts

I took this mod and did edit it some so as to install it into osc ver 2.3.1. The code is below before any changes:

 

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

 

After changes:

 

    <?php $referer = $_SERVER['HTTP_REFERER']; if (!$referer == '') {
       echo '<a href="' . $referer . '">' . tep_draw_button(IMAGE_BUTTON_BACK) . '</a>';
       } else {
       echo '<a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_path($current_category_id = '')) . '">' . tep_draw_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>';} ?>

 

It is working for most part, except a few minor items.

1. mouse over the back button, it displays an underline under the text, which I do not want.

2. I tried float right, but then the Add to Cart - Reviews - Back buttons align up on right side right under the product images.

 

As in this snapshot:

back.gif

What I want is so the three buttons is evenly spaced out in the content area. I am getting them on the right or left. Have tried adding a class, but still the reviews and back buttons align next to each other on the left. So am looking for a tip on which file I am to look into?

 

Thank you.

Link to comment
Share on other sites

I took this mod and did edit it some so as to install it into osc ver 2.3.1. The code is below before any changes:

 

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

 

After changes:

 

    <?php $referer = $_SERVER['HTTP_REFERER']; if (!$referer == '') {
       echo '<a href="' . $referer . '">' . tep_draw_button(IMAGE_BUTTON_BACK) . '</a>';
       } else {
       echo '<a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_path($current_category_id = '')) . '">' . tep_draw_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>';} ?>

 

It is working for most part, except a few minor items.

 

 

As in this snapshot:

back.gif

What I want is so the three buttons is evenly spaced out in the content area. I am getting them on the right or left. Have tried adding a class, but still the reviews and back buttons align next to each other on the left. So am looking for a tip on which file I am to look into?

 

Thank you.

<code>

I have tried this. It works if coming back from the reviews page but not the product_info page.

<div class="buttonSet">

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

if (!$referer == '') {

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

} else {

echo tep_draw_button(IMAGE_BUTTON_BACK, 'triangle-1-w', tep_href_link(FILENAME_DEFAULT, tep_get_path($current_category_id = '')), 'primary'); }

?>

</code>

Link to comment
Share on other sites

This works, may need some styling but it operates correctly

<code>

<div class="buttonSet">

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

if (!$referer == '') {

echo tep_draw_button(IMAGE_BUTTON_BACK, 'triangle-1-w', $referer, 'primary');

} else {

echo tep_draw_button(IMAGE_BUTTON_BACK, 'triangle-1-w', tep_href_link(FILENAME_DEFAULT, tep_get_path($current_category_id = '')), 'primary'); }

?>

<span class="buttonAction"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span>

<?php echo tep_draw_button(IMAGE_BUTTON_REVIEWS . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : ''), 'comment', tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params())); ?>

</div>

</code>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...