Latest News: (loading..)
kymation

[Addon] Banner Box for 2.3

208 posts in this topic

This module allows you to add a banner to the left or right column of your store. This can be a credit card image, a Paypal button. or an advertising banner for your products. The banner can be linked to a page in your store.

 

You can have more than one banner assigned to the box, and have one selected at random every time a visitor loads the page. Banners are controlled by your Banner Manager.

 

The box header is optional, and can also be linked to a page if it is shown.

 

Download it here.

 

Regards

Jim

Edited by kymation

Share this post


Link to post
Share on other sites

Hi,

 

I installed this & my box isn't showing. It states in the instructions:

 

You can assign one or more banners to this box. If more than one banner is assigned, the

module will pick one at random to show on each page when that page is viewed by a customer.

You must assign your banner(s) to the box_module class for them to show in this box.

 

How do I do this?

 

Thanks :)

Share this post


Link to post
Share on other sites

From the last paragraph in that section:

Use the Banner Manager that comes with osCommerce to upload and configure your banners.

See the instructions that came with your copy of osCommerce to learn how to use the Banner

Manager.

 

Regards

Jim

Share this post


Link to post
Share on other sites

I know what I did, I was assigning a size to the banner group when if fact you need to assign box_module as the Banner Group :)

ssfcsv likes this

Share this post


Link to post
Share on other sites

works a treat, many thanks

only issue i found is with the pixel width

the accompanying users manual states 237pixels in width will fit with std oscommerce boxes

as far as i am aware my site is standard, but had to reduce to 130ish to make fit, more likely the problem is with me, but i thought i would mention incase

Share this post


Link to post
Share on other sites

You are right; that's a typo. It should be 137 pixels wide. I'll fix that in the manual.

 

Thanks for reporting a bug.

 

Regards

Jim

Share this post


Link to post
Share on other sites

Hi kymation,

 

Thank you for this Add-On, it was just what I needed. Quick question though... any idea why, even though I've got the box set to the right with an image in it, IE stubbornly refuses to place it anywhere but the bottom left? It's fine in FF and Chrome.

 

I've tried:

FF 3+ ( up to 6)

Chrome 12+

and IE 8

 

I'm working on XP so can't try IE 9.

 

here's the link. http://www.rain-e-daze.co.uk/shop/

 

Any thoughts would be appreciated but bear in mind that I've only been using osC for about 12 hours. :s

 

Thank you,

Graham

Share this post


Link to post
Share on other sites

Try temporarily setting another box to the right column. If it also ends up in the left column, you have something wrong in your HTML code that is pushing the columns together.

 

Regrds

Jim

Share this post


Link to post
Share on other sites

Hi Jim,

 

Here is basic bannerRotator plugin with bm_banner. I'm not expert of english so someone could edit it would be appreciated.

 

Best regards,

Gergely

 

Share this post


Link to post
Share on other sites

Thanks for the code. I'll take a look at this a bit later; I have something that has to be done now, so I'm doing that first.

 

Regards

Jim

Share this post


Link to post
Share on other sites

OK, so now I look like a complete noob. It turns out that the image was fractionally over the 137px size limit. I dropped it to 130px and it's fine now in everything.I've got.

I wouldn't have got that it I hadn't checked the HTML, thank you JIm

 

Regards,

Graham

Share this post


Link to post
Share on other sites

I hadn't thought about the image size; I'll have to remember that. Glad to hear you got it working.

 

Regards

Jim

Share this post


Link to post
Share on other sites

hey guys i try to use your addon ..but it's not working ...i mean i upload the files in the right places like it's said in manual ..i go to admin i instal the box ....i set the box to right column i put a order number , title link empty i click save and when i go back ti my store ....the main / index page won't load at all just the site banner and the background nothing else ..when i disable the box ...site load normally !

 

so what it's wrong ?

 

and yes i upload 1 img size 137 pixels with banner manager but i don't see any link with banner box addon ?

Share this post


Link to post
Share on other sites

I might be able to tell by looking at the site. PM or email a link if you don't want to put it here.

 

Regards

Jim

Share this post


Link to post
Share on other sites

Installed as per your instructions - ERROR

 

Fatal error: Cannot redeclare class language in /home/content/g/e/o/georgefasal/html/FASAL/business/includes/classes/language.php on line 16

Share this post


Link to post
Share on other sites

I've never been able to duplicate this error. I suspect it has something to do with a server setting or the PHP version. I might be able to track it down given more information.

 

Regards

Jim

Share this post


Link to post
Share on other sites

Installed as per your instructions - ERROR

 

Fatal error: Cannot redeclare class language in /home/content/g/e/o/georgefasal/html/FASAL/business/includes/classes/language.php on line 16

 

Hi Gemma and Jim,

 

i had the same problem. See my previous post and install that my package attached there.

Edited by Gergely

Share this post


Link to post
Share on other sites

Hi Jim,

 

Here is basic bannerRotator plugin with bm_banner. I'm not expert of english so someone could edit it would be appreciated.

 

Best regards,

Gergely

Sorry it took me so long to get to this. I've made a few minor changes to the instructions, plus I moved the install SQL into the module's install method to avoid having to manually modify the database. Please test this out and see what you think. It works on my test server, but I've never been able to see the language bug, so yours is clearly different. Here's the file.

 

Regards

Jim

Share this post


Link to post
Share on other sites

Sorry it took me so long to get to this. I've made a few minor changes to the instructions, plus I moved the install SQL into the module's install method to avoid having to manually modify the database. Please test this out and see what you think. It works on my test server, but I've never been able to see the language bug, so yours is clearly different. Here's the file.

 

Regards

Jim

 

 

Hi Jim,

 

no problem. Thanks. This will work. Two constant parameter missing.

 

I inserted plus defines for test working into execute() function and works without SQL errors.

 

	} else {
	  define('MAX_DISPLAY_BANNER_ROTATOR', 4);
	  define('BANNER_ORDER', 5);
	  //banner rotator

 

It would be appreciate to insert these parameters into database install. I don1t do it because if others like to use the same banner rotator JS code in modular frontpage or header footer modules can be conflict. I think we have to rename this constant names before.

 

MAX_DISPLAY_BANNER_ROTATOR to MODULE_BOXES_BANNER_ROTATOR_MAX_DISPLAY

BANNER_ORDER to MODULE_BOXES_BANNER_ROTATOR_ORDER

 

This prevents conflicts with other modules and can set in module box by admin configurations.

 

Regards,

Gergely

Edited by Gergely

Share this post


Link to post
Share on other sites

I agree that they should be renamed. They should be set in the module as you suggest.

 

Thanks for all the work you've done on this.

 

Regards

Jim

Share this post


Link to post
Share on other sites

I agree that they should be renamed. They should be set in the module as you suggest.

 

Thanks for all the work you've done on this.

 

Regards

Jim

 

 

What do you say if I make a simple SQL module pack for second part installations? This banner box package need banner table alter with language_id. We forgot this.

 

SQL modules using for other problems can be safer too.

Share this post


Link to post
Share on other sites

I already took care of that. Look at the install method of the module:

 

	 // Check whether the banners table has been altered and add the language field if it has not
  $check_structure_query_raw = "describe " . TABLE_BANNERS;
  $check_structure_query = tep_db_query( $check_structure_query_raw );
  $banners_language = false;
  while( $check_structure_data = tep_db_fetch_array( $check_structure_query ) ) {
    if( $check_structure_data['Field'] == 'language_id' ) {
	  $banners_language = true;
    }
  }
  // Now insert the language field if we need to
  if( $banners_language == false ) {
    // ALTER TABLE `banners` ADD `language_id` INT( 11 ) NOT NULL DEFAULT '1' AFTER `banners_id` ;
    tep_db_query( "alter table " . TABLE_BANNERS . " add column `language_id` INT( 11 ) NOT NULL default '1' after `banners_id`" );
  }

Regards

Jim

Share this post


Link to post
Share on other sites

I already took care of that. Look at the install method of the module:

Regards

Jim

 

Thanks I was careless. Here is new bm_banner.php for banner box:

I optimized header tags uploading when not set another language banners and add new variables to install for sql. http://oscom.hu/phocadownload/banner_box_rotator_edited.zip

 

I have made sql modules package. It is good for review secondary contributions if used. One new version number row insert into configuration table.

 

 

Regards,

Gergely

Share this post


Link to post
Share on other sites

That looks good to me. I think it's ready to upload, whenever you're ready.

 

Regrds

Jim

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