Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    May 2008
    Posts
    6
    Plugin Contributions
    0

    Default Login redirection question

    Hmmm let's see if I can make sence of what I'm trying to do here ;) I am using hidecategories_1-10 so I can hide my categories and use a direct link. In addition to that I have added a new field to the table categories (I know I should make a table on it's own ;) ) so I can force a login to a specific category.

    Like this:
    Code:
    $login_on_off_query = "SELECT login_on_off FROM categories WHERE categories_id = " . $cPath;
    $login_on_off_query = $db->bindVars($login_on_off_query, ':languageID', $_SESSION['languages_id'], 'integer');
    $login_on_off = $db->Execute($login_on_off_query);
    And
    Code:
    if(empty($_SESSION['customer_id']) && $login_on_off->fields['login_on_off'] == 1){
    echo header('Location: index.php?main_page=login');
    Everything works but the problem is the login part. I want the visitor to be redirected back to where the visitor came from. In other words if the visitor is in directory x and got a login box I want the visitor to be redirected to directory x after he or she logged in.

    Thanks for a great script!

    Best regards

    ChrisL

  2. #2
    Join Date
    May 2008
    Posts
    6
    Plugin Contributions
    0

    Default Re: Login redirection question

    Let me know if I am unclear on what I am trying to do. If possible I really need Your help!

    Thanks

    ChrisL

  3. #3
    Join Date
    May 2008
    Posts
    6
    Plugin Contributions
    0

    Default Re: Login redirection question

    Found my anwser in post http://www.zen-cart.com/forum/showthread.php?t=37330 .

    Just added:
    Code:
    $_SESSION['navigation']->set_snapshot();
    Cheers

    ChrisL

 

 

Similar Threads

  1. htaccess redirection question.
    By retched in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 9 Dec 2011, 06:32 AM
  2. Replies: 2
    Last Post: 5 Aug 2011, 01:49 PM
  3. login redirection
    By saxtuplet in forum General Questions
    Replies: 2
    Last Post: 26 Jun 2011, 09:20 PM
  4. Login redirection
    By alexious in forum General Questions
    Replies: 2
    Last Post: 13 May 2011, 03:37 PM
  5. Login Redirection
    By VladTepis in forum General Questions
    Replies: 4
    Last Post: 3 Sep 2008, 06:52 PM

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