Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2004
    Location
    Fountain Hills, AZ
    Posts
    515
    Plugin Contributions
    1

    Default Issue with back button not returning

    I created a new page to hold a video to demonstrate a customer's upcoming product using a small flash module. That works perfectly, but the back button on the video's page returns you to the home page, not the page previously visited.

    I've double checked and the back button code is correct, but again, it will only return to the index page.
    PHP Code:
    <div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACKBUTTON_BACK_ALT) . '</a>'?></div>
    You can see the issue by clicking here

    Any suggestions? All my other back buttons work fine.

  2. #2
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: Issue with back button not returning

    Ruth-

    Which page did you clone to make that one? I think it is not setting the snapshot and is "lost" and so only goes home.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    Aug 2004
    Location
    Fountain Hills, AZ
    Posts
    515
    Plugin Contributions
    1

    Default Re: Issue with back button not returning

    I used the latest version of "about us" here's the tpl_new_product_info_default.php that I created
    PHP Code:
    <?php
    /**
     * Page Template
     *
     * Loaded automatically by index.php?main_page=new_product_info.<br />
     * Displays New Product Info page.
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_new_product_info_default.php  v1.0 $
     */
    ?>
    <div class="centerColumn" id="new_product_info">
    <h1 id="newProductInfoHeading"><?php echo HEADING_TITLE?></h1>

    <div id="newProductInfoHeading" class="content">
    <?php
    /**
     * require the html_define for the new_product_info page
     */
      
    require($define_page);
    ?>
    </div>

    <div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACKBUTTON_BACK_ALT) . '</a>'?></div>

  4. #4
    Join Date
    Feb 2008
    Posts
    129
    Plugin Contributions
    0

    Default Re: Issue with back button not returning

    I have the same problem--back button goes to index page for my new define pages.

    So to fix it, I just replaced the button code in tpl_page_8_default.php
    Code:
    <div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></div>
    with this:

    Code:
    <div class="buttonRow back"><a href="javascript:history.go(-1);return true;" alt="back"><?php echo zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT); ?></a></div>

  5. #5
    Join Date
    Feb 2008
    Posts
    129
    Plugin Contributions
    0

    Default Re: Issue with back button not returning

    Correction, that code works fine on Safari, but on IE7 the button doesn't work and I get an error on the page. Instead remove the "return true;" :

    Code:
    <div class="buttonRow back"><a href="javascript:history.go(-1);" alt="back"><?php echo zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT); ?></a></div>
    That seems to work on both.

 

 

Similar Threads

  1. "Back To List" button on product detail returning to page 1
    By smythmikey in forum General Questions
    Replies: 1
    Last Post: 3 Feb 2009, 07:18 AM
  2. Back Button on product info page returning to previous category page ex. page 5
    By dharma in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 19 Mar 2008, 10:51 PM
  3. Back button that does not take you back
    By Woodymon in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 12 Aug 2007, 04:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg