Results 1 to 10 of 10
  1. #1
    Join Date
    Aug 2009
    Posts
    59
    Plugin Contributions
    0

    Default redirect language to another domain

    Hello,

    The scenario is as follows: I have an english and a german version of my shop. And I have 2 domains: "myshop.de" and "myshop.net".

    For seo reasons I changed my parked .net domain to be an addon domain. Now I want my .de to be only german and my .net to be only english but still want the flags to be displayed in the shops on each site and to link to the respective site of the respective domain instead of to
    <myshop/index.php?any_site=index&language=de/en>
    avoiding making a rewrite rule for each site.

    Has anyone an idea how this can be done?

    Thank you

  2. #2
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,247
    Plugin Contributions
    58

    Default Re: redirect language to another domain

    Just hardlink them to the correct site

    ~Melanie
    PRO-Webs, Inc. since 2003 :: Zen Cart Hosting :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are not conducive to a helpful community.

  3. #3
    Join Date
    Aug 2009
    Posts
    59
    Plugin Contributions
    0

    Default Re: redirect language to another domain

    Thank you for your quick reply!
    I never created hardlinks.
    Do I have to use my cpanel for that?

  4. #4
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,247
    Plugin Contributions
    58

    Default Re: redirect language to another domain

    You will need to modify the sidebox or header file (wherever the links currently are)

    Something like this

    Code:
      $content = "";
      $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
    
      $lng_cnt = 0;
      while (list($key, $value) = each($lng->catalog_languages)) {
        $content .= '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . zen_image(DIR_WS_LANGUAGES .  $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a>&nbsp;&nbsp;';
        $lng_cnt ++;
        if ($lng_cnt >= MAX_LANGUAGE_FLAGS_COLUMNS) {
          $lng_cnt = 0;
          $content .= '<br />';
        }
      }
    $content .= '</div>';
    ?>
    TO+==========

    Code:
      $content = "";
      $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
    
      $lng_cnt = 0;
      while (list($key, $value) = each($lng->catalog_languages)) {
        $content .= '<a href="http://domain.com/">' . zen_image(DIR_WS_LANGUAGES .  $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a>&nbsp;&nbsp;';
        $lng_cnt ++;
        if ($lng_cnt >= MAX_LANGUAGE_FLAGS_COLUMNS) {
          $lng_cnt = 0;
          $content .= '<br />';
        }
      }
    $content .= '</div>';
    ?>
    If you cannot code, likely should get your designer to do it for you... Either way make a backup of the edited file first.

    ~Melanie
    PRO-Webs, Inc. since 2003 :: Zen Cart Hosting :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are not conducive to a helpful community.

  5. #5
    Join Date
    Aug 2009
    Posts
    59
    Plugin Contributions
    0

    Default Re: redirect language to another domain

    I changed the code. And the flag links to the other domain But I faced the problem that I get directed to the language version from where I came from.

    So now my idea is to remove the second language completely but I want the flags to be displayed nevertheless.
    Is this possible and how?

  6. #6
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,247
    Plugin Contributions
    58

    Default Re: redirect language to another domain

    Configuration >> My Store >>

    Switch To Default Language Currency - True
    Language Selector - Default

    ~Melanie
    PRO-Webs, Inc. since 2003 :: Zen Cart Hosting :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are not conducive to a helpful community.

  7. #7
    Join Date
    Aug 2009
    Posts
    59
    Plugin Contributions
    0

    Default Re: redirect language to another domain

    These are already my settings. I think the only solution is to remove the second languages and to find a way to make the flags shown up anyway. Maybe as a banner and direct them to the respective domain.

    Thank you for keeping on helping!

  8. #8
    Join Date
    Aug 2009
    Posts
    59
    Plugin Contributions
    0

    Default Re: redirect language to another domain

    .... I solved it now by creating banners for the language flags directing to the respective domain. And I removed the second language completely.

    However there is a little drawback: visitors will always be directed to the homepage of the other language. No matter in which page they click the flag.

  9. #9
    Join Date
    Dec 2009
    Posts
    7
    Plugin Contributions
    0

    Default Re: redirect language to another domain

    hi can you tell me how you did this.

    i have 5 language packs installed and dont like the way they work so I was wanting to link each flag icon to the relevant google translate link. I tried changing the code as mentioned above in tpl.header.php but I am only able to put one url in so each flag has the same external google trans link which is no good.

    any help will be greatly appreciated

  10. #10
    Join Date
    Aug 2009
    Posts
    59
    Plugin Contributions
    0

    Default Re: redirect language to another domain

    I created new banner in admin/tools/banner manager. But was not easy to get them to the place I wanted. I had to define them in my stylesheets.
    Not sure if you can do it this way with five language flags.

 

 

Similar Threads

  1. Redirect to a new domain
    By christymreed in forum General Questions
    Replies: 3
    Last Post: 5 Jun 2013, 02:48 PM
  2. bad domain sublinks redirect
    By Agent_KGB in forum Customization from the Admin
    Replies: 0
    Last Post: 3 Mar 2009, 10:23 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