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
    58,464
    Blog Entries
    3
    Plugin Contributions
    111

    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!
    Donations always welcome: www.zen-cart.com/donate

    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
    58,464
    Blog Entries
    3
    Plugin Contributions
    111

    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!
    Donations always welcome: www.zen-cart.com/donate

    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
    58,464
    Blog Entries
    3
    Plugin Contributions
    111

    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!
    Donations always welcome: www.zen-cart.com/donate

    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. Replies: 0
    Last Post: 12 Feb 2010, 07:10 PM
  2. return to shopping goes to home page
    By stitchnkitty in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 6 Nov 2009, 03:21 PM
  3. Home links return to default language
    By MeltDown in forum Addon Language Packs
    Replies: 4
    Last Post: 26 Dec 2008, 12:04 PM
  4. paypal :Nothing to process. Please return to home page
    By chenyun_ok in forum PayPal Express Checkout support
    Replies: 4
    Last Post: 23 Oct 2008, 04:43 AM
  5. Switch / Maestro / Solo card icons
    By mattys in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 6 Dec 2007, 08:17 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
  •