Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2008
    Posts
    67
    Plugin Contributions
    0

    Default Multiple Banners on Main page

    I would like to be able to display multiple banners at the same time on my 'main page' in the same way that the banners_all box in the column. I have already taken care of getting banners_group3 to only display on only the main page, but I have been trying to figure out this multiple banners at the same time for a few weeks now and I think I'm going crazy. Nothing I try has worked. I tried copying the core code from the banners_all template page and replacing my banners_group3 code. I have tried to copy and paste banners_group 1&4 and place those in the same area on my page as group3, hoping to get 3 banners, but nothing shows up. I thought I was having issues with configuring the banners so I bought the zen cart book but it has not helped me.

    I need them to be trackable so just embedding HTML into my main page won't work.

    I have combed this site hoping that somebody had figured this out and nothing.

    Does anybody know how to do this or can help as I'm lost at this point?

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,664
    Plugin Contributions
    6

    Default Re: Multiple Banners on Main page

    This would allow banners_all to run in the tpl_footer.php ...

    You could adapt this to a new group to do the same thing ...
    PHP Code:
    <!--eof-banner #5 display -->

    <?php
    // bof: make banners all run in the footer
        
    $bannerscontent '';
        
    $bannerscontent .= '<div id="' str_replace('_''-'$box_id 'Content') . '" class="sideBoxContent centeredContent">';
    // select banners_group to be used
      
    $new_banner_search zen_build_banners_group(SHOW_BANNERS_GROUP_SET_ALL);

      
    // secure pages
      
    switch ($request_type) {
        case (
    'SSL'):
          
    $my_banner_filter=" and banners_on_ssl= " "1 ";
          break;
        case (
    'NONSSL'):
          
    $my_banner_filter='';
          break;
      }

      
    $sql "select banners_id from " TABLE_BANNERS " where status = 1 " $new_banner_search $my_banner_filter " order by banners_sort_order";
      
    $banners_all $db->Execute($sql);



    // if no active banner in the specified banner group then the box will not show
      
    $banner_cnt 0;
      while (!
    $banners_all->EOF) {
        
    $banner_cnt++;
        
    $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET_ALL);
        
    $bannerscontent .= zen_display_banner('static'$banners_all->fields['banners_id']);
    // add spacing between banners
        
    if ($banner_cnt $banners_all->RecordCount()) {
          
    $bannerscontent .= '<br /><br />';
        }
        
    $banners_all->MoveNext();
      }
      
    $bannerscontent .= '</div>';

    echo 
    'TEST BANNER ALL:<br />' $bannerscontent '<br />';
    // eof: make banners all run in the footer
    ?>


    <!--bof- site copyright display -->
    Note: you would want to change the classes and such to keep them unique if needed as the variables are not defined ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

 

 

Similar Threads

  1. Only Show Wide-Banners On Main Page?
    By BarryLegal in forum Basic Configuration
    Replies: 0
    Last Post: 27 Jun 2008, 11:45 PM
  2. Main Page - Open with multiple Categories?
    By cyrusper in forum Basic Configuration
    Replies: 0
    Last Post: 1 Apr 2008, 02:01 AM
  3. Banners in index main page
    By derer in forum Basic Configuration
    Replies: 5
    Last Post: 15 Nov 2007, 01:09 AM
  4. Showing banners not on the main page?
    By JakubM in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 22 Feb 2007, 08:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •