Jump to content
kymation

jQuery Banner Rotator

Recommended Posts

Hi Jim,

 

I have added the banner rotator to my shopping cart and I have displayed it after the logo. I have added the code in the header.php. The banner is showing ok on the home page but not showing on any other pages eg contact us etc... I want to show this on all the pages, what should I do to show this on all the pages?

 

Thanks

Bharti

Share this post


Link to post
Share on other sites

To make the banner rotator work on other pages, you will need to add the Javascript code to the head of every page that you want it to work in. See catalog/index.php, lines 43-51 in the banner rotator distribution.

 

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

sorry to be a pain but 1 last thing, I have tried uploading 2 banners, the rotator works fine but images aren't showing, have i uploaded them wrong?

Share this post


Link to post
Share on other sites

Have you assigned them to the rotator category?

 

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

Yes, I think so..

 

I done the following.

 

- Admin>Tools>Banner Manager

 

- Banner Lang -English / Banner Group - Rotator / Image - Uploaded from my computer / Saved

 

Then just doesn't show :huh:

Share this post


Link to post
Share on other sites

You need at least two banners to rotate or it won't work.

 

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

- Admin>Tools>Banner Manager

 

- Banner Lang -English / Banner Group - Rotator / Image - Uploaded from my computer / Saved

 

I done this procedure twice^^^

Share this post


Link to post
Share on other sites

That's right. You said before that you had this working. If uploading two banners made it stop working, then there is a problem with one or both of those images.

 

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

hi, first of all thank you for this contribution, was looking for something like this. ok here goes, i have managed to add the banner group and the banner shows up on my homepage and as i have only added one it changes within itself.

 

I have now added another banner within banner manager, with the same title, group but just a different image and now the second banner shows up underneath the first one and this has also stopped playing. i have removed this one but the first one doesnt play anymore?

 

can any1 help me understand where i have gone wrong? any help would be really appreciated.

 

thanks in advance.

Share this post


Link to post
Share on other sites

hi, first of all thank you for this contribution, was looking for something like this. ok here goes, i have managed to add the banner group and the banner shows up on my homepage and as i have only added one it changes within itself.

 

I have now added another banner within banner manager, with the same title, group but just a different image and now the second banner shows up underneath the first one and this has also stopped playing. i have removed this one but the first one doesnt play anymore?

 

can any1 help me understand where i have gone wrong? any help would be really appreciated.

 

thanks in advance.

 

apologies, i have sorted it. reuploaded the stylesheet and it started working again! btw how can i control the alignment of the banner as it appears on the right side of the page whereas my website through sts is aligned to the centre of the page, any ideas?

Share this post


Link to post
Share on other sites

The banner alignment is designed to work with stock osCommerce, not STS. You can probably fix this by playing with the CSS for the Banner Rotator. Try changing the top and left settings under #bannerRotator ul li. You may have to add a container and align that instead.

 

Regards

Jim

 

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

kymation, thanks for your response. i have added a container within the stylesheet, and applied this to the banner_rotator.php file using the following code but this doesnt change anything.

 

<!-- banner_rotator -->
 <div id="container">
 <div id="bannerRotator">
   <ul>
<?php 
   while( $banner = tep_db_fetch_array( $banner_query ) ) {
     echo '      <li>';
     if( $banner['banners_url'] != '' ) {

 

The following is what i have added within the stylesheet:

 

#container {
position: relative;
width: 718px;
margin: auto;

 

thanks for all your help, really appreciate.

Share this post


Link to post
Share on other sites

I don't know how to fix problems with templates. That was just a general suggestion to get you started. I suggest that you ask for help in the STS support thread.

 

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

I don't know how to fix problems with templates. That was just a general suggestion to get you started. I suggest that you ask for help in the STS support thread.

 

Regards

Jim

 

kymation, i have managed to sort the issue as had a problem with my sts file. Btw another problem has popped up. The banner shows up on the Opera Browser in full, but when I check this on Internet Explorer only half the banner is shown. Any reason why this could be?

Share this post


Link to post
Share on other sites

I don't know. It works for me in Internet Explorer on a standard installation of osCommerce. I suspect that this is another conflict with STS.

 

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

Does this work with v2.3.1 please?

 

I'm wanting a rotator banner but not sure whether to go for this or the Modular front page contribution which has one in too. Trouble is I don't want all the modules so is this over kill?

 

I only have one column so can I adjust the size of the display so it is across the top of effectively grid_18 710px?

Is it determined by the image sizes or the css? What is the default with this?

 

Thanks

Share this post


Link to post
Share on other sites

This one is designed for 2.2RC2a, but could probably be made to work with 2.3.1 with a little modification. The one in the Modular Front Page addon is mostly the same code. I just built it into a module for ease of use with 2.3.1.

 

There's no need to shy away from Modular Front Page -- it's modular just so you can pick and choose the modules you want to use. If you only want the one, just install the one you want and leave the rest.

 

I'm currently using the modular version on a store design that only has the left column. You need to size the banner images accordingly, then make a couple of changes in the CSS to match your image sizes. I'm using images that are 790 pixels wide. The CSS properties that you need to change are marked in the files.

 

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

I installed the contribution, but it doesnt work for some reason. My banners appear the same as before it was installed. I have banners on the header. I followed all the steps many times over, but still nothing happens when I load my store.

 

I also saw somewhere in earlier posts that you must have this code, include( DIR_WS_MODULES . FILENAME_BANNER_ROTATOR );

Where do I put this because I tried on configure.php and it gae an error that the file doesnt exist.

 

I am using a template RC2a.

Share this post


Link to post
Share on other sites
I am using a template RC2a.

This is most likely your problem. Templates make changes to the core code of osCommerce that prevent standard Addons from functioning. You may need to change your template to make this work.

 

This Addon does not make any changes to your existing banners. It adds a new banner box with banners that change.

 

The code that you quoted adds the banner rotator to the location where you paste that code. This has to be a location that can display a banner. It's normally added to index.php but can be placed elsewhere. See the instructions for more information.

 

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

This is most likely your problem. Templates make changes to the core code of osCommerce that prevent standard Addons from functioning. You may need to change your template to make this work.

 

This Addon does not make any changes to your existing banners. It adds a new banner box with banners that change.

 

The code that you quoted adds the banner rotator to the location where you paste that code. This has to be a location that can display a banner. It's normally added to index.php but can be placed elsewhere. See the instructions for more information.

 

Regards

Jim

 

Thanks for your respond, thats probably the problem, eish would have loved to use the contribution. Will keep on trying it anyway.

Share this post


Link to post
Share on other sites

Hi kymation,

 

Hope all is excellent with you and thanks for the snazzy mod

 

Re Post #11

Problem completely solved with:

 

jQuery.noConflict();

 

Having similar symptoms - seeing dots (well, one large black one)

 

Not sure how to implement the cure (jQuery.noConflict();)

 

This didn't work:

 

<?php // Start Banner Rotator 1.2.1 20100628 Kymation 7641 ?>

<script type="text/javascript" src="includes/functions/jquery-1.4.2.min.js"></script>

<script type="text/javascript" src="includes/functions/bannerRotator.js"></script>

<script type="text/javascript">

 

jQuery.noConflict();

 

$(document).ready(function(){

bannerRotator('#bannerRotator', 500, 1000);

});

</script>

<?php // End Banner Rotator 1.2.1 20100628 Kymation 7641 ?>

 

Tried several variations, including: (in index.php)

var $j = jQuery.noConflict();

// Use jQuery via $j(...)

$j(document).ready(function(){

bannerRotator('#bannerRotator', 500, 1000);

});

 

along with renaming all the $( instances in bannerRotator.js to $j(

(yes, the desperation is running thick and heavy)

 

This caused the page to stop loading and no dot

(with both the original bannerRotator.js $( and the modified $j( version)

 

There are 3 banners in the rotator group and I put breakpoints in the function/banners.php

to make sure the queries are populated, (which the black dot might be confirming?)

 

Could you please elaborate on how to use: jQuery.noConflict();

 

Thanks for your insight (and mercy)

 

jk

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

×