Page 3 of 7 FirstFirst 12345 ... LastLast
Results 21 to 30 of 70
  1. #21
    Join Date
    Jul 2007
    Posts
    110
    Plugin Contributions
    0

    Default Re: multi lingual banners

    Same issue for me... How could the language know which banner to get?
    Really need help with this, I followed this tutorial and read it 4-5 times, but dont get any wiser.
    What are we missing?

  2. #22
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,617
    Plugin Contributions
    19

    Default Re: multi lingual banners

    OK, been working on this for a few hours until i realised how simple it is... I wanted my header's Wide-Banners to be multi-lingual.

    So, for all those still looking for the answer, here we go:

    1. Locate your tpl_header.php file and find this line:
    Code:
    if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))
    and replace it with
    Code:
    if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2 . $_SESSION['languages_id']))
    2. Go to Configuration->Layout Settings and change Banner Display Groups - Header Position 2 to show Wide-Banners (write that in the field)

    3. Go to Tools->Banner Manager. Edit your banner and manually assign it to banner group Wide-Banners1. Notice the number 1 - this number represents your language id. Therefore, if you have english (1), german (2) etc, Wide-Banners1 will show when english language is selected and Wide-Banners2 when german is selected. Note: language ids are related to your installed languages, not a general code - if you don't know what id you want to use, simply try different numbers 1,2,3,4,5...

    And that's it! If you want to use it on a different position, change the GROUP_SET number accordingly.

    Could it be any easier?

    This also works with Flash banners (if you previously set up Flash to run). If you want a Flash banner, use the HTML banner version...

    All thanks go to Ajeh!

  3. #23
    Join Date
    Nov 2005
    Posts
    51
    Plugin Contributions
    0

    Default Re: multi lingual banners

    thank you for your modification, but it is not always working as it should.

    When i refresh the page it sometimes loads the wrong banner. Do ou have this problem as well?

  4. #24
    Join Date
    Nov 2005
    Posts
    51
    Plugin Contributions
    0

    Default Re: multi lingual banners

    after running some more tests, it seems like it is using the different language banners randomly and not by the languagenumber ID

  5. #25
    Join Date
    May 2010
    Location
    Athens, Greece
    Posts
    292
    Plugin Contributions
    0

    Default Re: multi lingual banners

    Well, I'm very new to Zen Cart but I did it in a different way and it seems to work fine.

    My site is in English and Greek. I installed the Greek language pack and now have two header.php files:

    /includes/languages/english/my_template/header.php
    /includes/languages/greek/my_template/header.php

    I created two banners, placed them in /includes/templates/my_template/images and named them logo_english.gif and logo_greek.gif.

    In the /includes/languages/english/my_template/header.php file I changed the line

    define('HEADER_LOGO_IMAGE', 'logo.gif'); to

    define('HEADER_LOGO_IMAGE', 'logo_english.gif');

    and in the /includes/languages/greek/my_template/header.php file I changed the line

    define('HEADER_LOGO_IMAGE', 'logo.gif'); to

    define('HEADER_LOGO_IMAGE', 'logo_greek.gif');

    That was all. You can see it in action at http://athenscollectibles.info (the text on the right side of the logo changes with the language).

    As I said at the beginning, I'm very new to Zen Cart and I'm still not confident. If one of the many experts reads this, I would appreciate an advice if this was correctly done or whether I should expect something nasty to happen.

  6. #26
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,617
    Plugin Contributions
    19

    Default Re: multi lingual banners

    What you did has nothing to do with banners. You just changed your logo image.

    Under Admin, you can go to your Tools->Banner Manager to see what banners are about.

  7. #27
    Join Date
    May 2010
    Location
    Athens, Greece
    Posts
    292
    Plugin Contributions
    0

    Default Re: multi lingual banners

    Thank you Balihr, that was really my intention. Being new at Zen Cart, I thought that this was the discussion about. Where I come from (an ecommerce hosting site), we called the top logo "banner".

    Now I see that banners in Zen Cart are something different. I have already used the Tools > Banner Manager to get rid of the advertising banners appearing at the bottom of the page when I installed Zen Cart. Obviously, I need to do a lot more reading!

    Your understanding will be much appreciated.

  8. #28
    Join Date
    Aug 2009
    Posts
    26
    Plugin Contributions
    0

    Default Re: multi lingual banners

    I don't know what is wrong, but I can't receive banner for second language.
    OK, been working on this for a few hours until i realised how simple it is... I wanted my header's Wide-Banners to be multi-lingual.

    What I did:
    1. Changed tpl_header.php file for my template
    /public_html/includes/templates/my_template/common/tpl_header.php

    if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))

    was changed to

    if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2 . $_SESSION['languages_id']))

    2. Go to Configuration->Layout Settings and changed Banner Display Groups - Header Position 2 to
    "Wide-Banners:Wide-Banners1:Wide-Banners10" ( I have 2 language_id, which is 1 and 10).

    3. Go to Tools->Banner Manager. Manually assigned name banner group Wide-Banners1 and Wide-Banners10


    Nothing happening. Site still show only banner for language_id 1.

  9. #29
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,617
    Plugin Contributions
    19

    Default Re: multi lingual banners

    Quote Originally Posted by vadimzven View Post

    2. Go to Configuration->Layout Settings and changed Banner Display Groups - Header Position 2 to
    "Wide-Banners:Wide-Banners1:Wide-Banners10" ( I have 2 language_id, which is 1 and 10).
    No! Set this field to Wide-Banners - don't add any numbers or anything.
    3. Go to Tools->Banner Manager. Manually assigned name banner group Wide-Banners1 and Wide-Banners10

    Nothing happening. Site still show only banner for language_id 1.
    How do you know your language_id is 1 and 10? How did you determine the ids? Maybe a silly question, but humor me...

  10. #30
    Join Date
    Aug 2009
    Posts
    26
    Plugin Contributions
    0

    Default Re: multi lingual banners

    I found language_id in MySQL database.

 

 
Page 3 of 7 FirstFirst 12345 ... LastLast

Similar Threads

  1. multi lingual banners
    By jfl_saudi in forum Basic Configuration
    Replies: 2
    Last Post: 29 Nov 2010, 11:41 AM
  2. I'd like to make my site multi-lingual...
    By joyjoy in forum Addon Language Packs
    Replies: 8
    Last Post: 4 Nov 2010, 07:36 AM
  3. Replies: 2
    Last Post: 27 Apr 2010, 06:25 PM
  4. Multi lingual ez-pages link to more information sidebox.
    By juza123 in forum Basic Configuration
    Replies: 0
    Last Post: 12 Mar 2007, 03:57 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