Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2004
    Posts
    2,420
    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
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Back button that does not take you back

    Add a referer to your hard code

  3. #3
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Back button that does not take you back

    Slippy fingers meant a return code

  4. #4
    Join Date
    Sep 2004
    Posts
    2,420
    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
    Location
    Arizona
    Posts
    27,755
    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'));
        }
      }

  6. #6
    Join Date
    Sep 2004
    Posts
    2,420
    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
    Location
    Arizona
    Posts
    27,755
    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?

 

 

Similar Threads

  1. v151 How to link "Back to Product List" button back to last page history
    By sports guy in forum General Questions
    Replies: 3
    Last Post: 28 Feb 2015, 11:11 AM
  2. Replies: 4
    Last Post: 14 Feb 2013, 09:33 PM
  3. back in stock notification - buttons 'back' and 'update' not working
    By flix in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 24 Mar 2010, 10:02 PM
  4. Confirm order button sends you back to the start
    By Crin in forum PayPal Express Checkout support
    Replies: 3
    Last Post: 8 Feb 2007, 04:33 PM
  5. 'back' button gets changed once you sign in
    By Radish in forum Bug Reports
    Replies: 4
    Last Post: 18 Oct 2006, 05:50 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