Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2004
    Posts
    2,365
    Plugin Contributions
    2

    Default Back button that does not take you back

    I'm embarrassingly ignorant this eve.

    Privacy Policy has a "back" button on it which works correctly by default when clicking on Privacy Policy links located in various Zen Cart menus.

    But when I hard code a link to the privacy policy (/shop/index.php?main_page=privacy), for instance on top of the create_account page (https), the back button on privacy page does not direct the browser back to the create_account page. Just redirects browser to home page.

    There must be a simple trick to make this work. Any clues? Thanks.

    Woody

  2. #2
    Join Date
    Aug 2005
    Posts
    26,012
    Plugin Contributions
    9

    Default Re: Back button that does not take you back

    Add a referer to your hard code
    Zen-Venom Get Bitten
    Get Your Business Found

  3. #3
    Join Date
    Aug 2005
    Posts
    26,012
    Plugin Contributions
    9

    Default Re: Back button that does not take you back

    Slippy fingers meant a return code
    Zen-Venom Get Bitten
    Get Your Business Found

  4. #4
    Join Date
    Sep 2004
    Posts
    2,365
    Plugin Contributions
    2

    Default Re: Back button that does not take you back

    Quote Originally Posted by kobra View Post
    Slippy fingers meant a return code
    Example please?

  5. #5
    Join Date
    Aug 2005
    Posts
    26,012
    Plugin Contributions
    9

    Default Re: Back button that does not take you back

    As you are working in Zen Cart - here is some code from the checkout_process.php file -
    This is the check if they are logged in and if not sends them to login and then returns them to the checkout
    the snapshot is what you want and this has to be set from whence they came
    Code:
       // validate customer
        if (zen_get_customer_validate_session($_SESSION['customer_id']) == false) {
          $_SESSION['navigation']->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_SHIPPING));
          zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
        }
      }
    Zen-Venom Get Bitten
    Get Your Business Found

  6. #6
    Join Date
    Sep 2004
    Posts
    2,365
    Plugin Contributions
    2

    Default Re: Back button that does not take you back

    Quote Originally Posted by kobra View Post
    As you are working in Zen Cart - here is some code from the checkout_process.php file -

    This is the check if they are logged in and if not sends them to login and then returns them to the checkout the snapshot is what you want and this has to be set from whence they came
    Code:
       // validate customer
        if (zen_get_customer_validate_session($_SESSION['customer_id']) == false) {
          $_SESSION['navigation']->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_SHIPPING));
          zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
        }
      }
    Thanks Kobra,

    I should have been looking for code like that on the login page in the first place.

    Instead I was looking at tpl_privacy_default:

    PHP Code:
    <div class="buttonRow back">
    <?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACKBUTTON_BACK_ALT) . '</a>'?>
    </div>
    I was having trouble understanding how zen_back_link function works with sessions and SSL. A complex subject I know. But now that you pointed out the zen_redirect code above I don't have to dig any further or know much more...for now. Thanks!

    BTW your last post did not show up in my forum User CP subscription list (I am subscribed to all threads which I post). And the thread was not listed when I searched the forum on my username. Strange.

    Woody

  7. #7
    Join Date
    Aug 2005
    Posts
    26,012
    Plugin Contributions
    9

    Default Re: Back button that does not take you back

    BTW your last post did not show up in my forum User CP subscription list (I am subscribed to all threads which I post). And the thread was not listed when I searched the forum on my username. Strange.
    Hummmm...I do not have control over this?? Maybe I am banned or something?
    Zen-Venom Get Bitten
    Get Your Business Found

 

 

Similar Threads

  1. Back button for product pages
    By Scarlet in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 17 Apr 2007, 02:12 AM
  2. 'back' button gets changed once you sign in
    By Radish in forum Bug Reports
    Replies: 4
    Last Post: 18 Oct 2006, 05:50 AM
  3. Replies: 3
    Last Post: 14 Sep 2006, 07:58 AM
  4. Payment Button in order history
    By dmarrero in forum General Questions
    Replies: 2
    Last Post: 28 Aug 2006, 09:24 PM
  5. Hit Back Button now Cart is giving Errors
    By mlm2005 in forum General Questions
    Replies: 5
    Last Post: 3 Jul 2006, 07:57 PM

Bookmarks

Posting Permissions

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