Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

different banners for different languages


avalyani

Recommended Posts

Hi everyone

 

I have gone through the site, i have found one article regarding the subject but it did not work on my site

 

Here is what i need.

 

I have 11 different languages on my oscommerce website. I would like all languages to have a different banners ( for each langage more than one banner if possible.

 

At the moment i have about 7 different banners with different languages, But they are showing randomly and not macting the language i am in

I need someone to help me and go through with me to sort this problem out

 

I am waiting for your replies

 

Thanks

regards

 

Huseyin

Link to comment
Share on other sites

thinking about it now logically, it wouldnt work, because, on the header.php we only state if ($banner = tep_banner_exists('dynamic', BANNER_GROUP_1)) {

and every time banner comes up it only reads banner group 1,

how can i add more banner groups in header.php according to the languages

Please help

Thanks

Link to comment
Share on other sites

Have you thought of making the language part of the name

 

 

english_banner_1

farsi_banner_1

spanish_banner_1

english_banner_2

farsi_banner_2

spanish_banner_2

etc

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Have you thought of making the language part of the name

 

 

english_banner_1

farsi_banner_1

spanish_banner_1

english_banner_2

farsi_banner_2

spanish_banner_2

etc

 

i named the banners as follows first

 

banner_turkce

banner_english

.

.

.

.

 

but did not work

because on the header we are only stating to show BANNER_GROUP_1

that is why only banner 1 group is displayed

 

here is how the line looks like

<tr><td align="center"><?php if ($banner = tep_banner_exists('dynamic', 'BANNER_GROUP_1')) { echo tep_display_banner('static', $banner); } ?></td></tr>

 

 

i am fairly new in php and just guessing things

so i have added a new switch just incase it swicthes the languaes

as follows

<?php

switch ($_GET['banner'])

{

case 'turkish': $banner = 'banner_tr'; break;

case 'english': $banner = 'banner_en'; break;

case 'greece': $banner = 'banner_en'; break;

case 'german': $banner = 'banner_de'; break;

case 'french': $banner = 'banner_en'; break;

case 'espanol': $banner = 'banner_en'; break;

}

?>

 

<tr><td align="center"><?php if ($banner = tep_banner_exists('dynamic', 'BANNER_GROUP_1')) { echo tep_display_banner('static', $banner); } ?></td></tr>

 

 

</table>

 

 

but now thinking about it again, still header is only directed to show BANNER_GROUP_1

THERE IS SOMETHING MISSING IN THE HEADER PHP

 

i think somehow we must state all the banner groups

like

BANNER_GROUP_1

BANNER_GROUP_2

BANNER_GROUP_3

BANNER_GROUP_4

BANNER_GROUP_5

BANNER_GROUP_6

etc

Link to comment
Share on other sites

  • 2 weeks later...
anybody can give me a clue?

 

That's an old posting but as someone who struggled with banners in different languages, I have to share this add-on I found. It worked perfectly, though for me the file I had to edit for my banner was panel_top.php in a boxes folder under include. This is really a lifesaver if you're doing a multiple languages site.

http://addons.oscommerce.com/info/1937

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...