Jump to content
Latest News: (loading..)
vampirehunter

Adding fluid / fixed width rotating banner to show only on Index/Home page?

Recommended Posts

I was wondering what is best method of adding a full width banner which shows only on the index/home page?

 

Do you guys recommend to code a new module and then activate this rather than edit the actual index php file?

 

 

 

many thanks

Share this post


Link to post
Share on other sites

@@vampirehunter

 

for now you could add it to the index.php and when the index page becomes modular you could create a module and contribute it back to the community :thumbsup:


Bootstrap 3 ROCKS!

(or it will if I ever get my head around it lol)

(and I think I have now (w00t) )

Share this post


Link to post
Share on other sites

@@vampirehunter

 

for now you could add it to the index.php and when the index page becomes modular you could create a module and contribute it back to the community :thumbsup:

 

Hi

thanks

yes.

I am looking at my old site which was non bootstrap, and I implemented a jquery slider on the index page.

 

I was basically pulling out each banner specifically for each div like below.

<?php
    
        if ($banner = tep_banner_exists('static', '3')) {
   $banners_info = tep_display_banner('static', $banner);
  }
	  echo $banners_info;
	  
?>

I'm assuming I can simply create the html for the bootstrap carousel in the index file and utilise the same code as above to pull out each banner?

And just create and upload each banner in the admin section.

 

This though seems to go against the idea of modularisation as its directly adding to core code.

 

I'm not sure how this could be modularised though.

Edited by vampirehunter

Share this post


Link to post
Share on other sites

@@vampirehunter

 

Create a content module similar to the modules in the checkout_success group, under a new group (folder) titled "index", then add a line in index.php "$page_content = $oscTemplate->getContent('index');" similar to how checkout_success.php has done with "$page_content = $oscTemplate->getContent('checkout_success');" then echo $page_content whever you want it to appear. 

 

cheers


My Add-ons
Advanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download Support
Ajax Product Listing for osC 2.3.4 (bootstrap) Download Support
Category New Products Carousel for osC 2.3.4 (bootstrap) Download Support
Category Popular Products Carousel for osC 2.3.4 (bootstrap) Download Support
Customer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download Support
Front Page New Products Carousel for osC 2.3.4 (bootstrap) Download Support

Index Nested - Product Listing for osC 2.3.4 (bootstrapDownload Support
Match Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download Support
Modular Category Page for osC 2.3.4 (bootstrap)
Download Support

NEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download Support
NEW Equal Height Module for osC 2.3.4 (bootstrapDownload Support
Products Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download Support
Twitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap)
Download Support

Upcoming Products Modules for osC 2.3.4 (bootstrap) Download Support

 
Assisted Add-ons
Scroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support
 
Bootstrap Add-ons created by other members
osCommerce Bootstrap Addons and Code

Share this post


Link to post
Share on other sites

@@vampirehunter

 

Create a content module similar to the modules in the checkout_success group, under a new group (folder) titled "index", then add a line in index.php "$page_content = $oscTemplate->getContent('index');" similar to how checkout_success.php has done with "$page_content = $oscTemplate->getContent('checkout_success');" then echo $page_content whever you want it to appear. 

 

cheers

 

thanks, yes ill do that.

Share this post


Link to post
Share on other sites

@@vampirehunter

 

for now you could add it to the index.php and when the index page becomes modular you could create a module and contribute it back to the community :thumbsup:

 

Hi,

ive created the module, but stuck on one thing.

 

not sure what the rand() line is doing when inserting a sort order into configuration.

 

Once thats sorted, the plugin is finished.

Share this post


Link to post
Share on other sites

Hi,

ive created the module, but stuck on one thing.

 

not sure what the rand() line is doing when inserting a sort order into configuration.

 

Once thats sorted, the plugin is finished.

 

@@vampirehunter

 

Did you get this sorted out?


My Add-ons
Advanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download Support
Ajax Product Listing for osC 2.3.4 (bootstrap) Download Support
Category New Products Carousel for osC 2.3.4 (bootstrap) Download Support
Category Popular Products Carousel for osC 2.3.4 (bootstrap) Download Support
Customer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download Support
Front Page New Products Carousel for osC 2.3.4 (bootstrap) Download Support

Index Nested - Product Listing for osC 2.3.4 (bootstrapDownload Support
Match Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download Support
Modular Category Page for osC 2.3.4 (bootstrap)
Download Support

NEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download Support
NEW Equal Height Module for osC 2.3.4 (bootstrapDownload Support
Products Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download Support
Twitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap)
Download Support

Upcoming Products Modules for osC 2.3.4 (bootstrap) Download Support

 
Assisted Add-ons
Scroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support
 
Bootstrap Add-ons created by other members
osCommerce Bootstrap Addons and Code

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

×