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.
Re: multi lingual banners
i think it could be very helpful for all users, so does anyone have the answer?
Re: multi lingual banners
problem solved.
the same staps works sure also for three banners!
:clap:
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
}
}
?>
Re: multi lingual banners
Quote:
Originally Posted by
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.
Code:
$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
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
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.
Quote:
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.
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?
Re: multi lingual banners
Quote:
Originally Posted by
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?
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