Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / A little help with a back button needed

A little help with a back button needed

Locked

Views: 1,053

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
13 Jun 2007, 12:45 AM
#1
red8ii8 avatar

red8ii8

New Zenner

Join Date:
Feb 2007
Posts:
38
Plugin Contributions:
0

A little help with a back button needed

Hi, I'm building my first cart and not fluent in code of any kind, could someone help me with a back button? I don't want the prev/next bar on the product info page, just a back button. When I paste just the first line of the code that calls for the three buttons I get nothing, so I tried to use the code for the back button that shows on many other pages but it just takes you to the home page.

Here's the section I want to change to a plain old "back" button that will take the user to where they were:

<!--bof Prev/Next bottom position -->
<?php if (PRODUCT_INFO_PREVIOUS_NEXT == 2 or PRODUCT_INFO_PREVIOUS_NEXT == 3) { ?>
<?php
/**
 * display the product previous/next helper
 */
 require($template->get_template_dir('/tpl_products_next_previous.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_products_next_previous.php'); ?>
<?php } ?>
<!--eof Prev/Next bottom position -->
```This is what i tried that takes them to the home page instead:
```php
<div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></div>
</div>
```An example page is:

<http://www.thepearltrader.com/index.php?main_page=product_info&cPath=15&products_id=72>

thanks for any help!
13 Jun 2007, 6:24 PM
#2
red8ii8 avatar

red8ii8

New Zenner

Join Date:
Feb 2007
Posts:
38
Plugin Contributions:
0

Re: A little help with a back button needed

Got it. Turned off the other and pasted just this on tpl_product_info_display underneath

<!--bof back button -->
<div class="navNextPrevList"><a href="<?php echo zen_href_link(FILENAME_DEFAULT, "cPath=$cPath"); ?>"><?php echo zen_image_button(BUTTON_IMAGE_RETURN_TO_PROD_LIST, BUTTON_RETURN_TO_PROD_LIST_ALT); ?></a></div>
<!--eof back button -->

Not so hard :blush: