Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2010
    Posts
    9
    Plugin Contributions
    0

    Default How can I return to my Home page, when I switch my language's icons.

    Hi.
    I use 2 languages.
    How can I return to my Home page, when I switch my language's icons.
    Where can I change the code?
    Thank you.

  2. #2
    Join Date
    Nov 2010
    Posts
    9
    Plugin Contributions
    0

    Default Re: How can I return to my Home page, when I switch my language's icons.

    Hello everybody.
    Does anyone have an idea?
    When I switch languages, I need return to main (home) page.
    Best regards...

  3. #3
    Join Date
    Jan 2004
    Posts
    66,363
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: How can I return to my Home page, when I switch my language's icons.

    Why?

    If I'm looking at a particular product in one language, and I want to view *that* product in another language, and click the language link, if you return me to the home page, then I have to go find that product all over again. I'll probably close your site and go find another that's more friendly and usable.

    What specific business problem are you thinking you'll solve by changing the way it's designed to work?
    .

    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.

  4. #4
    Join Date
    Nov 2010
    Posts
    9
    Plugin Contributions
    0

    Default Re: How can I return to my Home page, when I switch my language's icons.

    Thank you for your reply.
    I do not have the same products (categories) in both languages. Different products for different languages (countries).
    When a customer uses one language, switch language to another, he returns to the home page on another language with other products.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,363
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: How can I return to my Home page, when I switch my language's icons.

    /includes/init_includes/overrides/init_languages.php
    add a new line as shown:
    Code:
      if (isset($_GET['language']) && zen_not_null($_GET['language'])) {
        $lng->set_language($_GET['language']);
        zen_redirect(zen_href_link(FILENAME_DEFAULT, '', $request_type));
      } else {
    .

    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.

  6. #6
    Join Date
    Nov 2010
    Posts
    9
    Plugin Contributions
    0

    Default Re: How can I return to my Home page, when I switch my language's icons.

    Thank you. I add new line.
    I can return to home page, but...
    Now I can use only one language and I can open my store only on one language. And how about second language?
    My site :www.bookpolka.com

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

    Default Re: How can I return to my Home page, when I switch my language's icons.

    Try this instead:
    Code:
    if (!isset($_SESSION['language']) || isset($_GET['language'])) {
      $lng = new language();
      if (isset($_GET['language']) && zen_not_null($_GET['language'])) {
        $lng->set_language($_GET['language']);
        $redir = ($_SESSION['language'] != $_GET['language']);
      } else {
        if (LANGUAGE_DEFAULT_SELECTOR=='Browser') {
          $lng->get_browser_language();
        } else {
          $lng->set_language(DEFAULT_LANGUAGE);
        }
      }
      $_SESSION['language'] = (zen_not_null($lng->language['directory']) ? $lng->language['directory'] : 'english');
      $_SESSION['languages_id'] = (zen_not_null($lng->language['id']) ? $lng->language['id'] : 1);
      $_SESSION['languages_code'] = (zen_not_null($lng->language['code']) ? $lng->language['code'] : 'en');
      if ($redir) {
        zen_redirect(zen_href_link(FILENAME_DEFAULT, '', $request_type));
      }
    }
    .

    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.

  8. #8
    Join Date
    Nov 2010
    Posts
    9
    Plugin Contributions
    0

    Default Re: How can I return to my Home page, when I switch my language's icons.

    Now my store is OK!!!
    DrByte . Thanks for all your help!!!

 

 

Similar Threads

  1. How do I add language icons on title (page's right top)?
    By mdivk in forum Addon Language Packs
    Replies: 3
    Last Post: 19 Nov 2011, 06:44 AM
  2. Nothing to process. Please return to home page. when using paypal express checkout
    By DickTurpin in forum PayPal Express Checkout support
    Replies: 14
    Last Post: 13 Jun 2011, 10:43 AM
  3. Replies: 1
    Last Post: 26 Nov 2010, 07:02 AM
  4. Home links return to default language
    By MeltDown in forum Addon Language Packs
    Replies: 4
    Last Post: 26 Dec 2008, 12:04 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