vampirehunter Posted January 22, 2015 Share Posted January 22, 2015 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 Link to comment Share on other sites More sharing options...
PupStar Posted January 22, 2015 Share Posted January 22, 2015 @@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: Link to comment Share on other sites More sharing options...
vampirehunter Posted January 22, 2015 Author Share Posted January 22, 2015 @@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. Link to comment Share on other sites More sharing options...
auzStar Posted January 22, 2015 Share Posted January 22, 2015 @@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-onsAdvanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download SupportAjax Product Listing for osC 2.3.4 (bootstrap) Download SupportCategory New Products Carousel for osC 2.3.4 (bootstrap) Download SupportCategory Popular Products Carousel for osC 2.3.4 (bootstrap) Download SupportCustomer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download SupportFront Page New Products Carousel for osC 2.3.4 (bootstrap) Download SupportIndex Nested - Product Listing for osC 2.3.4 (bootstrap) Download SupportMatch Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download SupportModular Category Page for osC 2.3.4 (bootstrap) Download SupportNEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download SupportNEW Equal Height Module for osC 2.3.4 (bootstrap) Download SupportProducts Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download SupportTwitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download SupportUpcoming Products Modules for osC 2.3.4 (bootstrap) Download Support Assisted Add-onsScroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support Bootstrap Add-ons created by other membersosCommerce Bootstrap Addons and Code Link to comment Share on other sites More sharing options...
vampirehunter Posted January 23, 2015 Author Share Posted January 23, 2015 @@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. Link to comment Share on other sites More sharing options...
vampirehunter Posted January 24, 2015 Author Share Posted January 24, 2015 @@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. Link to comment Share on other sites More sharing options...
auzStar Posted January 26, 2015 Share Posted January 26, 2015 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-onsAdvanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download SupportAjax Product Listing for osC 2.3.4 (bootstrap) Download SupportCategory New Products Carousel for osC 2.3.4 (bootstrap) Download SupportCategory Popular Products Carousel for osC 2.3.4 (bootstrap) Download SupportCustomer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download SupportFront Page New Products Carousel for osC 2.3.4 (bootstrap) Download SupportIndex Nested - Product Listing for osC 2.3.4 (bootstrap) Download SupportMatch Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download SupportModular Category Page for osC 2.3.4 (bootstrap) Download SupportNEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download SupportNEW Equal Height Module for osC 2.3.4 (bootstrap) Download SupportProducts Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download SupportTwitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download SupportUpcoming Products Modules for osC 2.3.4 (bootstrap) Download Support Assisted Add-onsScroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support Bootstrap Add-ons created by other membersosCommerce Bootstrap Addons and Code Link to comment Share on other sites More sharing options...
vampirehunter Posted January 26, 2015 Author Share Posted January 26, 2015 hi yes check this thread here http://www.oscommerce.com/forums/topic/399709-bootstrap-home-page-carousel-banner-slider-module-plugin-complete-testing-welcome/ i updated the code slightly and will post it in that thread. Works great, full carousel slider running off the banners in banner manager. 3 files to upload. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.