Forums / Basic Configuration / multi lingual banners

multi lingual banners

Views: 32,644

Results 41 to 60 of 70
18 Aug 2010, 9:09 PM
#41
manya avatar

manya

New Zenner

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

multi lingual banners

All right, back to normal again.. would you like to share the phpmyadmin id's cause I couldn't find them.. thanks

18 Aug 2010, 9:13 PM
#42
balihr avatar

balihr

Totally Zenned

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

Re: multi lingual banners

what do you mean by "share phpmyadmin ids" ??? these ids are unique to your install... And I don't understand why you couldn't find the ids??? Can you access your database from phpmyadmin?

My site - Pro ZC Help
My portfolio | My plugins

19 Aug 2010, 2:12 AM
#43
vadimzven avatar

vadimzven

New Zenner

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

Re: multi lingual banners

Maybe somebody knows, how to show different product images depending from language? Thanks.

3 Sep 2010, 10:41 PM
#44
karapus avatar

karapus

New Zenner

Join Date:
Jan 2010
Location:
Chicago, IL
Posts:
4
Plugin Contributions:
0

Re: multi lingual banners

clydejones:

goto

admin -> tools -> banner manager

click the "new banner" button

enter your Banner Title:
enter your Banner URL:

create your new Banner Group: (do this by entering the information in the text box which is below the dropdown menu.

for your english language version name it mybanner1
for your other language version name it mybanner2

click the insert button to save your new banner.

goto

admin -> configuration -> layout settings -> Banner Display Groups - Side Box banner_box

click the edit button

enter your new banner group designations in the text box

SideBox-Banners:mybanner1:mybanner2

click the update button

follow the instructions provided at the beginning of this thread in order to change the appropriate sidebox.

In my case for making my main banner changeable the only thing I need to do is to set Multiple Banner Group:

Banner Display Groups - Header Position 2 to Wide-Banners2:Wide-Banners3

...that is it !!! nothing else.. no need of replacing:

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

with:

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

...but I still have a problem with making it compatible with the language selected. If I klick few time the english flag it displayed almost every time a different language...

somebody needs to explain clearly step by step how to fix it, PLEASE !!! :blink:

Thank you in advance!!!

3 Sep 2010, 10:41 PM
#45
karapus avatar

karapus

New Zenner

Join Date:
Jan 2010
Location:
Chicago, IL
Posts:
4
Plugin Contributions:
0

Re: multi lingual banners

In my case for making my main banner changeable the only thing I need to do is to set Multiple Banner Group:

Banner Display Groups - Header Position 2 to Wide-Banners2:Wide-Banners3

...that is it !!! nothing else.. no need of replacing:

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

with:

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

...but I still have a problem with making it compatible with the language selected. If I klick few time the english flag it displayed almost every time a different language...

somebody needs to explain clearly step by step how to fix it, PLEASE !!! :blink:

Thank you in advance!!!

21 Oct 2010, 8:47 PM
#46
dramacydril avatar

dramacydril

New Zenner

Join Date:
Jul 2010
Posts:
18
Plugin Contributions:
0

Re: multi lingual banners

I followed all instructions in this thread, no success. Still getting different language banners randomly and not ordered on language id.

Can someone post the right solution for this, because i think many people have this problem and dont know how to fix this.

Thanks in advance!

27 Oct 2010, 2:59 PM
#47
fred_artemis avatar

fred_artemis

New Zenner

Join Date:
Dec 2006
Posts:
17
Plugin Contributions:
0

Re: multi lingual banners

For me it did not work either. Would it be possible to show the steps with screenprints?
This would be very helpful.
Thanks in advance!

13 Nov 2010, 4:59 AM
#48
wisehoot avatar

wisehoot

Inactive

Join Date:
Jan 2010
Location:
New Jersey
Posts:
9
Plugin Contributions:
0

Re: multi lingual banners

After strugling for over 2 hours with the convoluted suggestions for multilingual banners I think I got a better solution:
In my English/Spanish site:
Assign includes/modules/your_template/banner_box.php to language 1 (English by Default) by changing the following code:
*// test if box should display

$show_banner_box = true;

to

*// test if box should display
if ($_SESSION['languages_id'] == 1) {
$show_banner_box = true;
}
*

then do the same for banner_box2.php but now

*// test if box should display
if ($_SESSION['languages_id'] == 2) {
$show_banner_box = true;
}
*

Now in Banner Manager Assign your english banners to SideBox-Banners
Leave Layout Banner Display Group Side box banner_box as SideBox-Banners (the default)
Change:
Layout Banner Display Group Side box banner_box2 to WHATEVER
In Banner Manager assign your new banners with language id 2 to the same WHATEVER name you assign to banner_box2 in Layout.
Good luck

13 Nov 2010, 5:14 AM
#49
wisehoot avatar

wisehoot

Inactive

Join Date:
Jan 2010
Location:
New Jersey
Posts:
9
Plugin Contributions:
0

Re: multi lingual banners

:clap:> 27gerd27:

Hi,
i made your changes in the php-file, but what i have to do with fred1, fred2?
Could you be so kind and give me any hint?

Thank you very match

Gerd

See post #48 in this thread, I think I found an easier method to display multilingual banners.

Good luck!

13 Nov 2010, 6:46 PM
#50
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: multi lingual banners

That will work fine for two languages, but not for more.
Balihr's directions in post 22 are the correct answer, if followed exactly. I reproduce them here, with red highlighting on the points that people seem to be missing:

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']))
  1. Go to Configuration->Layout Settings and change Banner Display Groups - Header Position 2 to show Wide-Banners (write that in the field)

  2. Go to Tools->Banner Manager. Edit your banner for your first language and manually assign it to banner group Wide-Banners1. Edit your banner for your second language and manually assign it to banner group Wide-Banners2. 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!
(end of balihr's instructions)

3 Mar 2011, 7:24 PM
#51
hubert123 avatar

hubert123

New Zenner

Join Date:
Feb 2011
Posts:
14
Plugin Contributions:
0

Re: multi lingual banners

thanks!
on my site it works fine for one banner!
but i have three!

Banner Display Groups - Header Position 1 banner-1
Banner Display Groups - Header Position 2 banner-2
Banner Display Groups - Header Position 3 Wide-Banners (now called)

so i have tested out different ways, but with no success.

when i am doing the same steps with the other banners they are mixed.

any suggestions?
thanks.

4 Mar 2011, 10:48 AM
#52
hubert123 avatar

hubert123

New Zenner

Join Date:
Feb 2011
Posts:
14
Plugin Contributions:
0

Re: multi lingual banners

i think it could be very helpful for all users, so does anyone have the answer?

4 Mar 2011, 6:59 PM
#53
hubert123 avatar

hubert123

New Zenner

Join Date:
Feb 2011
Posts:
14
Plugin Contributions:
0

Re: multi lingual banners

problem solved.
the same staps works sure also for three banners!
:clap:

12 Mar 2011, 8:37 PM
#54
hubert123 avatar

hubert123

New Zenner

Join Date:
Feb 2011
Posts:
14
Plugin Contributions:
0

Re: multi lingual banners

damn, i don't know what has happenend, but i have a new problem with my three multilanguage-banners.

everything worked fine, but when i am now in the english version of my shop, only the banners in the middle and right are fine, the left banner is smaller then the others!

when i am in the german version all three german banners are too small! where is the problem???

i have checked the tpl_header.php, the bannermanager and the layout settings, but havent found anything...

can anyone help please???

here are my settings:
layout settings:
Banner Display Groups - Header Position 1 Links-Banners
Banner Display Groups - Header Position 2 Mitte-Banners
Banner Display Groups - Header Position 3 Wide-Banners

bannergroups:
Links-Banners4
Links-Banners1
Wide-Banners1
Mitte-Banners1
Mitte-Banners4
Wide-Banners4

and here the part of the tpl_header.php:

<div class="banners"> <!-- BOF- BANNER #1 display --> <?php if (SHOW_BANNERS_GROUP_SET1 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET1 . $_SESSION['languages_id']))

{
if ($banner->RecordCount() > 0) {
?>

			<div id="bannerOne"><?php echo zen_display_banner('static', $banner); ?></div>
		<?php
			}
		  }
		?>
		<!-- EOF- BANNER #1 display -->
		 <!-- BOF- BANNER #2 display -->
		<?php
			if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2 . $_SESSION['languages_id']))

{
if ($banner->RecordCount() > 0) {
?>
<div id="bannerTwo"><?php echo zen_display_banner('static', $banner);?></div>
<?php } } ?>
<!-- EOF- BANNER #2 display -->
<!-- BOF- BANNER #3 display -->
<?php if (SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3 . $_SESSION['languages_id'])) { if ($banner->RecordCount() > 0) { ?>
<div id="bannerThree"><?php echo zen_display_banner('static', $banner);?></div>
<?php } } ?>
<!-- EOF- BANNER #3 display -->
</div>
<?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) { if (HEADER_SALES_TEXT != '') { ?>
<div id="tagline"><?php echo HEADER_SALES_TEXT;?></div>
<?php } } ?>

13 Apr 2011, 7:55 PM
#55
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: multi lingual banners

gjh42:

That will work fine for two languages, but not for more.
Balihr's directions in post 22 are the correct answer, if followed exactly. I reproduce them here, with red highlighting on the points that people seem to be missing:
All thanks go to Ajeh!
(end of balihr's instructions)
Hi I am looking for having multilingual banner in the side boxes.
Therefore coupling the above concept I mod the tpl_banner_box_all.php and set the layout to show in side banner box all, the group bannersAll.

$banner_cnt = 0;
  while (!$banners_all->EOF) {
    $banner_cnt++;
    $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET_ALL . $_SESSION['languages_id']);
    $content .= zen_display_banner('static', $banners_all->fields['banners_id'] . $_SESSION['languages_id']);

I found in the db the languages id of my languages that are 2 for italian and 4 for english. I then assigned the localized banners to bannersAll2 and bannersAll4 but, unfortunately the result is no banners shown!
I am stuck now, because my knowledge is limited.
Can someone help?
Thanks
Enzo

3 Jan 2012, 5:41 PM
#56
jadn79 avatar

jadn79

New Zenner

Join Date:
Dec 2011
Location:
Lisbon, Portugal
Posts:
7
Plugin Contributions:
0

Re: multi lingual banners

Hi all zenners;

I´m trying to display banners, according to language as it its a essencial feature for a multilanguage ecommerce, and i´m not getting the expected results.

I did exactly as zen cart forum instructions on post 22 on this thread.

I edited the tpl_header.php under the template_default, and not my template32900 root, as no such code appeared on 32900. Could this be the problem?

I emailed my tech help and this was the answer;

Please note that the template that you are using (template32900) might not be compatible with the changes that you wish to apply. However, we are sorry to inform you that this is not a hosting-related issue and the best option for you is to contact a local web developer as he might be able to help you fixing this issue. You can also contact the template's developers as they might be able to assist you further with editing their product.

Any idea if this template is compatible?

Thanks in advance

3 Jan 2012, 6:07 PM
#57
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: multi lingual banners

As you have a Template Monster template, the answer is "probably not". TM is known for disabling stock Zen Cart functionality if they think you don't need it for their template layout.

I edited the tpl_header.php under the template_default, and not my template32900 root, as no such code appeared on 32900. Could this be the problem?This will definitely not work. When there is a custom template version of a /template_default/ file, that will be used and the default version ignored.

13 Feb 2012, 3:38 PM
#58
wookie avatar

wookie

New Zenner

Join Date:
Aug 2011
Posts:
17
Plugin Contributions:
0

Re: multi lingual banners

I have this problem, when i have this on mytpl_header

<?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) { if (HEADER_SALES_TEXT != '') { ?>

if i add the language id ..... not show nothing in my website !!
why?

13 Feb 2012, 10:16 PM
#59
balihr avatar

balihr

Totally Zenned

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

Re: multi lingual banners

wookie:

I have this problem, when i have this on mytpl_header

<?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) { if (HEADER_SALES_TEXT != '') { ?>

if i add the language id ..... not show nothing in my website !!
why?

Are you getting a blank page or you're not seeing any banners?

My site - Pro ZC Help
My portfolio | My plugins

13 Feb 2012, 10:34 PM
#60
cinziapdl avatar

cinziapdl

New Zenner

Join Date:
Nov 2011
Location:
Harrogate, UK
Posts:
16
Plugin Contributions:
0

Re: multi lingual banners

Hi there,
I've followed the steps listed in post #22
and it works fine,
But I've got 4 banners in a row and as you can see on my site here
the second one doesn't show, it copies the first one. If I activate the 4 of them they will be all same as the first one.
I think it is because in configuration/layout settings I put 4 times wide-banners, but how else could I name them. If I try to number them there it doesn't work!
Any idea how to solve this?
Thanks