Jump to content
kymation

[Addon] Banner Box for 2.3

Recommended Posts

Jim, thank you for your reply.

 

Maybe I should clarify what addon I installed: it's called banner_box_1.2.2 http://addons.oscommerce.com/info/8144

 

Before installing this addon, there was no drop-down menu in the banner manager. After installing there is a drop-down menu with all languages I installed.

 

I re-installed it twice using my sql-backup and deleting/restoring the added/altered files.

 

Regards

stefan

Share this post


Link to post
Share on other sites

Apparently I've forgotten some of the changes that were made to this old module. The module does use the banner language, but only when Rotate Banners is set to True. The static banner function is the stock osCommerce banner function, and that does not pay attention to language. Sorry if that doesn't meet your needs.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hello Jim,

 

no problem at all ;)  We're only humans :lol:

 

Anyway - I'd like to work with this addon. Is there a way to alter it that for every language a static banner is displayed? I mean, what sense does it make to display f.e. a bulgarian or finnish banner for the italien language? Nobody would understand this in Italy.

 

Regards

stefan

Share this post


Link to post
Share on other sites

In the module file, line 63 calls tep_display_banner('static', $banner). You would need to change the tep_display_banner() function to recognize the language, or replace the call here with the SQL to retrieve a banner. The latter will be similar to the code in line 72 and following of the module.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hello Jim,

 

thank you for your answer.

 

As I'm not a programmer your hints are beyond my knowledge.

 

I understand that the following lines should be changed:

 

$module_contents .=  tep_display_banner('static', $banner);

 

 

But I don't know what exactly has to be copied from line 72:

 

$banner_query_raw = "
            select
              banners_id,
              banners_url,
              banners_image,
              banners_html_text,
              status
            from
              " . TABLE_BANNERS . "
            where
              banners_group = '" . MODULE_BOXES_BANNER_ROTATOR_GROUP_NAME . "'
              and language_id = '" . ( int )$languages_id . "'
              and status = 1
            order by
              " . MODULE_BOXES_BANNER_ROTATOR_ORDER . "
            limit
              " . MODULE_BOXES_BANNER_ROTATOR_MAX_DISPLAY
          ;

 

and how much?

 

I'm sorry, I don't want to bother you but could you point me in the right direction? Thank you in advance.

 

Regards,

stefan

Share this post


Link to post
Share on other sites

Sorry, but I don't have time to design this for you right now.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Tried this meanwhile:

 

$module_contents .=  tep_display_banner('static', ( int )$languages_id, $banner);

 

Not working.

 

Right now there are two groups and three banners. Two banners are in the same group which matches also the group in the banner box rotator module. Rotate banners is set to false. Interesting thing: the banner which is in another group (I defined it as "footer", which is not the group in the box rotator module) is now also showing up in the box.

 

I have no idea.

Edited by stefan21

Share this post


Link to post
Share on other sites

Crossposting - sorry.

 

That's o.k. Jim, I understand. Thank you anyway for your time.

 

Regards,

stefan

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×