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?
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?
OK, been working on this for a few hoursuntil 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:and replace it withCode:if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))2. Go to Configuration->Layout Settings and change Banner Display Groups - Header Position 2 to show Wide-Banners (write that in the field)Code:if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2 . $_SESSION['languages_id']))
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!
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?
after running some more tests, it seems like it is using the different language banners randomly and not by the languagenumber ID
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.
George
Athens Collectibles
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.![]()
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.![]()
George
Athens Collectibles
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.
No! Set this field to Wide-Banners - don't add any numbers or anything.
How do you know your language_id is 1 and 10? How did you determine the ids? Maybe a silly question, but humor me...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.![]()
I found language_id in MySQL database.
Bookmarks