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
Views: 32,644
New Zenner
All right, back to normal again.. would you like to share the phpmyadmin id's cause I couldn't find them.. thanks
Totally Zenned
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
New Zenner
Maybe somebody knows, how to show different product images depending from language? Thanks.
New Zenner
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 mybanner2click 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!!!
New Zenner
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!!!
New Zenner
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!
New Zenner
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!
Inactive
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
Inactive
: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!
Black Belt
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:
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']))
Go to Configuration->Layout Settings and change Banner Display Groups - Header Position 2 to show Wide-Banners (write that in the field)
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)
New Zenner
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.
New Zenner
i think it could be very helpful for all users, so does anyone have the answer?
New Zenner
problem solved.
the same staps works sure also for three banners!
:clap:
New Zenner
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
}
}
?>
Zen Follower
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
New Zenner
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
Black Belt
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.
New Zenner
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?
Totally Zenned
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
New Zenner
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
Tell staff why this post should be reviewed.