Forums / Basic Configuration / multi lingual banners

multi lingual banners

Views: 32,644

Results 21 to 40 of 70
1 Apr 2010, 10:59 AM
#21
jagge avatar

jagge

Zen Follower

Join Date:
Jul 2007
Posts:
110
Plugin Contributions:
0

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?

7 Apr 2010, 3:33 PM
#22
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,805
Plugin Contributions:
22

Re: multi lingual banners

OK, been working on this for a few hours :frusty: 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:if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2)) and replace it with ```
    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? :smile:

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!

My site - Pro ZC Help
My portfolio | My plugins

3 May 2010, 7:14 PM
#23
ilonka avatar

ilonka

New Zenner

Join Date:
Nov 2005
Posts:
51
Plugin Contributions:
0

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?

3 May 2010, 7:22 PM
#24
ilonka avatar

ilonka

New Zenner

Join Date:
Nov 2005
Posts:
51
Plugin Contributions:
0

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

30 Jul 2010, 7:40 PM
#25
athens_collectibles avatar

athens_collectibles

Zen Follower

Join Date:
May 2010
Location:
Athens, Greece
Posts:
293
Plugin Contributions:
0

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.

30 Jul 2010, 9:47 PM
#26
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,805
Plugin Contributions:
22

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. :smile:

My site - Pro ZC Help
My portfolio | My plugins

31 Jul 2010, 12:04 AM
#27
athens_collectibles avatar

athens_collectibles

Zen Follower

Join Date:
May 2010
Location:
Athens, Greece
Posts:
293
Plugin Contributions:
0

Re: multi lingual banners

:oops: 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! :bangin:

Your understanding will be much appreciated. :rolleyes:

16 Aug 2010, 3:12 PM
#28
vadimzven avatar

vadimzven

New Zenner

Join Date:
Aug 2009
Posts:
26
Plugin Contributions:
0

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']))

  1. 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).

  2. 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.

16 Aug 2010, 3:19 PM
#29
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,805
Plugin Contributions:
22

Re: multi lingual banners

vadimzven:

  1. 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.
  2. 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... :smile:

My site - Pro ZC Help
My portfolio | My plugins

16 Aug 2010, 6:23 PM
#30
vadimzven avatar

vadimzven

New Zenner

Join Date:
Aug 2009
Posts:
26
Plugin Contributions:
0

Re: multi lingual banners

I found language_id in MySQL database.

16 Aug 2010, 6:32 PM
#31
vadimzven avatar

vadimzven

New Zenner

Join Date:
Aug 2009
Posts:
26
Plugin Contributions:
0

Re: multi lingual banners

I got it. Thank you very much.

16 Aug 2010, 9:07 PM
#32
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,805
Plugin Contributions:
22

Re: multi lingual banners

Thank you for letting us now you got it.

However, for the benefit of those who might do the same mistake as you did, it would be nice if you told us what you did wrong in the first place... :smile:

My site - Pro ZC Help
My portfolio | My plugins

18 Aug 2010, 12:12 PM
#33
manya avatar

manya

New Zenner

Join Date:
May 2010
Posts:
23
Plugin Contributions:
0

Re: multi lingual banners

Yes! I've been waiting for a continuation on this thread for a while.. I have my banners in place and working only they do the whole random thing discussed here earlier so I disenabled them and I'm currently only using english but could you please specify, where to put the language id no? What script and whhere, please be as precise as possible with paths / aswell!

Thanks a lot in advance..

18 Aug 2010, 1:35 PM
#34
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,805
Plugin Contributions:
22

Re: multi lingual banners

Well, all the instructions you need are on the previous page... :smile:

I described it step by step here so take a look.

Language ID numbers are assigned automatically by ZenCart. You can take a look in your database to determine the ids, but you only need it for defining banner group under Banner Management.

Good luck and let us know if you got it running!

My site - Pro ZC Help
My portfolio | My plugins

18 Aug 2010, 5:28 PM
#35
manya avatar

manya

New Zenner

Join Date:
May 2010
Posts:
23
Plugin Contributions:
0

Re: multi lingual banners

Thanks for the response!

Yes I did follow the instructions and the banners are working except like someone else pointed out, it only works randomly so, once it's right, load page again and a banner from another language rolls and load again it's back again, load again it's the third language and.. you get it.. so there has to be a bug in that script or another way to write so that it gets it right each time, don't there? Don't want to confuse the customers..

Thanks again.. I'll wait for a response,,

18 Aug 2010, 5:34 PM
#36
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,805
Plugin Contributions:
22

Re: multi lingual banners

I'm sure you missed something...

Can you provide the site URL? It might help...

My site - Pro ZC Help
My portfolio | My plugins

18 Aug 2010, 7:40 PM
#37
manya avatar

manya

New Zenner

Join Date:
May 2010
Posts:
23
Plugin Contributions:
0

Re: multi lingual banners

Well I actually deactivated the other banners except the english ones, have them in spanish and swedish aswell.

I'll activate them again for a while so you can see for yourself..

http://www.bodymindelements.com

Thanks!

18 Aug 2010, 7:57 PM
#38
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,805
Plugin Contributions:
22

Re: multi lingual banners

OK, go to your includes/templates/premium7b/common/tpl_header.php

Follow steps 1 & 2 from my previous post.

Go to phpMyAdmin and locate languages table on the left. When you click on it, you will see a table on the right with language ids shown.

Now, go to step 3 from my post.

This really should work - I used it on several sites so far and never had any problems.

BTW, are you talking about the Flash banner or the one bellow Flash?

Added: just an advice - install Image Handler 2 asap. :smile:

My site - Pro ZC Help
My portfolio | My plugins

18 Aug 2010, 8:09 PM
#39
manya avatar

manya

New Zenner

Join Date:
May 2010
Posts:
23
Plugin Contributions:
0

Re: multi lingual banners

Ok, thanks for the quick response and extra tip! I'll let you know how it went! :smile:

18 Aug 2010, 8:12 PM
#40
manya avatar

manya

New Zenner

Join Date:
May 2010
Posts:
23
Plugin Contributions:
0

Re: multi lingual banners

Sorry, also it actually revolves both but only actived the flash banner right now..