Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2006
    Posts
    197
    Plugin Contributions
    1

    help question Redirect from the Login Page

    Hi,

    Currently on my website: When customers login they are redirected to my main page.

    What I would like: For customers to be redirected to their shopping cart after loging in.

    Is this possible? I realize it probably only requires changing a link in some file, but I don't know the file or the code to look for.

    Thanks for any help!

    Nate

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Redirect from the Login Page

    Actually, the login will take you to many places depending on where you were when you tried to login ... providing that location is "known" based on navigation history ...

    You can make it that when the location is not known that you go to the shopping_cart or that you go to the shopping_cart when there is something in the shopping_cart to see ...

    You would need to edit the:
    /includes/modules/pages/login/header_php.php

    NOTE: there is NO override for this ... so you should backup the original file and your changes for when you upgrade ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Jul 2006
    Posts
    496
    Plugin Contributions
    0

    Default Re: Redirect from the Login Page

    Quote Originally Posted by Ajeh View Post
    Actually, the login will take you to many places depending on where you were when you tried to login ... providing that location is "known" based on navigation history ...

    You can make it that when the location is not known that you go to the shopping_cart or that you go to the shopping_cart when there is something in the shopping_cart to see ...

    You would need to edit the:
    /includes/modules/pages/login/header_php.php

    NOTE: there is NO override for this ... so you should backup the original file and your changes for when you upgrade ...
    Can you make it so that once they login, it ALWAYS takes them to the "My Account" page, no matter where they were before they logged in and even if they are on the way to checking out? (i have my reasons)

    Thank You.

  4. #4
    Join Date
    Jul 2006
    Posts
    496
    Plugin Contributions
    0

    Default Re: Redirect from the Login Page

    Sorry, I have it working now.

  5. #5
    Join Date
    Feb 2007
    Location
    Dallas area
    Posts
    76
    Plugin Contributions
    0

    Default Re: Redirect from the Login Page

    craftzombie,

    Can you post your solution to this problem because I am wanting to do the same thing, but for some reason can't seem to figure it out.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Redirect from the Login Page

    Quote Originally Posted by bgroup99 View Post
    What I would like: For customers to be redirected to their shopping cart after loging in.
    Quote Originally Posted by Ajeh View Post
    You would need to edit the:
    /includes/modules/pages/login/header_php.php
    Quote Originally Posted by bradymc View Post
    craftzombie,

    Can you post your solution to this problem because I am wanting to do the same thing, but for some reason can't seem to figure it out.
    As Ajeh said. you'll need to edit:
    /includes/modules/pages/login/header_php.php

    Find this:
    Code:
            $_SESSION['cart']->restore_contents();
    add this below it:
    Code:
                  zen_redirect(zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'));
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Feb 2007
    Location
    Dallas area
    Posts
    76
    Plugin Contributions
    0

    Default Re: Redirect from the Login Page

    Dr Byte,

    I tried that and it still takes me to /index.php?main_page=index. I'm wanting it to take them to the "My Account" page. I assume that's probably a simple variable switch, but I wasn't sure if that code put in that location would help my situation.

  8. #8
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Redirect from the Login Page

    Use FILENAME_MY_ACCOUNT instead then.

    If that's not working, then please list *all* contributions you've installed, as well as all customizations you've made to your site.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #9
    Join Date
    Feb 2007
    Location
    Dallas area
    Posts
    76
    Plugin Contributions
    0

    Default Re: Redirect from the Login Page

    Hmmm... strange things are happening. Because now everything works as it should. Maybe it heard your footsteps coming! :)

    Do those files take time to update on the servers or something? I had flushed my cache and cookies and just about everything else that I could from memory so that it was forced to get fresh info everytime, but it seems like it just needed some time.

 

 

Similar Threads

  1. v151 Redirect from login process still ssl
    By AlainC in forum General Questions
    Replies: 12
    Last Post: 15 Aug 2014, 08:07 PM
  2. Replies: 3
    Last Post: 15 May 2014, 05:35 PM
  3. Replies: 5
    Last Post: 16 Feb 2014, 05:37 PM
  4. Replies: 1
    Last Post: 16 Apr 2011, 07:24 PM
  5. How to redirect customer to their account page from login?
    By memerson in forum Basic Configuration
    Replies: 2
    Last Post: 19 Feb 2009, 09:32 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR