Results 1 to 7 of 7
  1. #1
    Join Date
    May 2006
    Posts
    64
    Plugin Contributions
    3

    [DONE1.3.5] Logoff Bug!!, Please help

    it might be a repeated question, but I found no answer for it.

    I am building a 2 language store, when I use lang number 2, then log off, it takes me to the log off page of lang 1 (default lang) , not the logoff page of lang 2.

    the log off link:
    index.php?main_page=logoff

    while I think it should be:
    index.php?main_page=logoff&language=?? <-- ?? is the code for lang number 2.

    can you help please?

  2. #2
    Join Date
    May 2006
    Posts
    64
    Plugin Contributions
    3

    Idea or Suggestion Re: Logoff Bug!!, Please help

    it is strange if this is not a known problem?

    can any one help please.

    Yabora

  3. #3
    Join Date
    Jun 2006
    Posts
    18
    Plugin Contributions
    0

    Default Re: Logoff Bug!!, Please help

    Hi I have the same problem. Nobody knows how to solve this?

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Logoff Bug!!, Please help

    This is because all the user's preferences have been cleared out during logoff, including their language selection.

    I haven't tested this yet ... perhaps you would test and give feedback:
    includes/modules/pages/logoff/header_php.php
    starting around line 18, you have:
    PHP Code:
    /**
      * Check if there is still a customer_id
      * If so, kill the session, and redirect back to the logoff page
      * This will cause the header logic to see that the customer_id is gone, and thus not display another logoff link
      */
    if (!empty($_SESSION['customer_id'])) {
      
    zen_session_destroy();
      
    zen_redirect(zen_href_link(FILENAME_LOGOFF));

    replace that with:
    PHP Code:
    /**
     * Check what language should be used on the logoff screen
     */
      
    $logoff_lang = ($_SESSION['languages_code'] != DEFAULT_LANGUAGE) ? 'language=' $_SESSION['languages_code'] : '';

    /**
      * Check if there is still a customer_id
      * If so, kill the session, and redirect back to the logoff page
      * This will cause the header logic to see that the customer_id is gone, and thus not display another logoff link
      */
    if (!empty($_SESSION['customer_id'])) {
      
    zen_session_destroy();
      
    zen_redirect(zen_href_link(FILENAME_LOGOFF$logoff_lang));

    Last edited by DrByte; 20 Jul 2006 at 07:11 PM.
    .

    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.

  5. #5
    Join Date
    May 2006
    Posts
    64
    Plugin Contributions
    3

    Re: [DONE] Logoff Bug!!, Please help

    DrByte, thanks it is working for me

    CzechBoy, how come it didn't work for you.

    my log off problem is solved

    however, if leave the computer logged in for a long time, when I click any link in the website, it takes me to main screen of the lang 1.

    I think we are not far away from the permenant solution.

    Yabora.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: [DONE] Logoff Bug!!, Please help

    Quote Originally Posted by yabora
    if leave the computer logged in for a long time, when I click any link in the website, it takes me to main screen of the lang 1.
    That's how it's designed to work. After 24 minutes, all the previous settings are discarded.

    I think we are not far away from the permenant solution.
    You could always change lang 2 to be your default...


    Why is this a problem?
    .

    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
    Jun 2006
    Posts
    76
    Plugin Contributions
    0

    Default Re: [DONE] Logoff Bug!!, Please help

    Thanks Ajeh to tell me this thread had the solution I wanted. It works for me.

 

 

Similar Threads

  1. bug in the product page or just me - please help
    By Mistica in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 31 May 2008, 04:04 PM
  2. Logoff bug???? If 2 more languages
    By amopro in forum Bug Reports
    Replies: 0
    Last Post: 11 Jul 2007, 07:26 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