Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2008
    Location
    San Diego, CA
    Posts
    45
    Plugin Contributions
    0

    Default set_session_login=true

    After login the page redirects to: index.php?main_page=index&set_session_login=true

    If I log out and click on Login then the page redirects as expected to the product page.
    However, if Logout and then click on the home page (which goes to the login page) if goes to set_session_login=true.

    Customer Shop status is set to 1 (from another posting I found, this seems to matter) and is a requirement for this store.

    There is only 1 product per Customer Price Group. So, all customers in group 1 will see product A, those in Group 2 will see product B, etc.

    Accomplished this in includes/modules/pages/login/header_php.php
    Code:
    $path = "index&cPath=".$_SESSION['customers_group_pricing'];
              zen_redirect(zen_href_link( $path, '', $request_type));
    When the customer logs in, they need to be directed to the product. Is there a way to correct/work around the page going to set_session_login=true?

    Appreciate any help or insight anyone can provide.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: set_session_login=true

    The redirect you're observing with set_session_login only happens with Customer Shop Status set to 1 as you said you've done. That behavior is normal and expected, and has existed for a long time ... (at least since v1.3.0). And the subsequent redirect back to the page the customer came from is also intended behavior.

    What you're describing goes further than that where you're specifically trying to intercept and override that normal behavior and instead redirect them to a specific category, rather than taking them back to the page they came from.

    The normal behavior of taking them back to the page they came from is a result of the system setting a snapshot of the page they were on before taking them to the login page, and then the login/header_php reads that snapshot and sends them back to that previous page. So apparently your custom code isn't firing before the snapshot redirect fires. ... ie you've put it too late in the code.
    .

    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.

  3. #3
    Join Date
    Jul 2008
    Location
    San Diego, CA
    Posts
    45
    Plugin Contributions
    0

    Default Re: set_session_login=true

    Thanks for the great explanation. Really appreciate the help.
    Yes, I now see (and understand better) the if statement in the header_php.php file that redirects to the snapshot.

    Another workaround (just for those that might find this in later searches):
    I've set Customer Shop status to 2.
    Since I have multiple categories, but only allow access to the appropriate category per the customers assigned Price Group, the browsing has been restricted by checking if Price Group is set (modified product_listing.php). If a customer is not logged in, then the price group is not set and the categories can't be browsed. End results seems to be suitable. Testing continues, but this appears to be working.

 

 

Similar Threads

  1. What's 'set_session_login' ?
    By lat9 in forum Upgrading to 1.5.x
    Replies: 3
    Last Post: 6 Sep 2011, 08:58 PM
  2. Is it true? No category search?
    By dmfelder in forum General Questions
    Replies: 15
    Last Post: 20 Aug 2009, 09:52 PM
  3. $flag_show_pulldown_states set to true
    By doug949 in forum Bug Reports
    Replies: 1
    Last Post: 12 Oct 2008, 09:08 PM
  4. True is not defined
    By dejavu in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 4 May 2008, 05:13 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