Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2010
    Posts
    64
    Plugin Contributions
    0

    Default Banner System Number Assignments in Code

    Thank you in advance for taking the time to read or respond to this thread.

    So I am trying to have 4 banners on the main page of my site.

    1 2 3 4

    each would take up 25% of the display on the page. I have Assigned 4 banners in the banner admin.

    I have created Groups Front1 front2 Front3 Front4 in the banner Manager

    This is where I am a little confused. The Code Below Shows Group Set 6 through 9 and a few of the banners show up except one.

    What I Don't Understand is how the banners are assigned to the code numbers?

    I went to Layout Settings in Configuration and where the banners are I changed the Verbage

    Banner Display Groups - Footer Position 3 front3
    Banner Display Groups - Side Box banner_box front2
    Banner Display Groups - Side Box banner_box2 front1
    Banner Display Group - Side Box banner_box_all front4


    Again I don't understand how the numbers in the code are assigned to a specific group or how I can control those numbers. based on the groups and the banner assignments.


    HTML Code:
      <!--bof- banner #6 display -->
            <?php
              if (SHOW_BANNERS_GROUP_SET6 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET6)) {
                if ($banner->RecordCount() > 0) {
            ?>
           
            <div class="frontcontainer">
              <div id="bannerSix" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
            </div>
            <?php
                }
              }
            ?>
            
              <?php
              if (SHOW_BANNERS_GROUP_SET7 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET7)) {
                if ($banner->RecordCount() > 0) {
            ?>
          
            <div class="frontcontainer">
              <div id="bannerSix" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
            </div>
            <?php
                }
              }
            ?>
            
             <?php
              if (SHOW_BANNERS_GROUP_SET8 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET8)) {
                if ($banner->RecordCount() > 0) {
            ?>
         
            <div class="frontcontainer">
              <div id="bannerSix" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
            </div>
            <?php
                }
              }
            ?>
             <?php
              if (SHOW_BANNERS_GROUP_SET5 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET5)) {
                if ($banner->RecordCount() > 0) {
            ?>
           
            <div class="frontcontainer">
              <div id="bannerSix" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
            </div>
            <?php
                }
              }
            ?>
            <!--eof- banner #6 display -->

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Banner System Number Assignments in Code

    Have you taken a look at this (he said, modestly)?

    https://www.zen-cart.com/downloads.php?do=file&id=1817

  3. #3
    Join Date
    Sep 2010
    Posts
    64
    Plugin Contributions
    0

    Default Re: Banner System Number Assignments in Code

    I am less concerned about the code since it is pretty straight forward and more about how the numbers are assigned in the manager .. What makes one banner a six and one a 3 if I assign a new "name" to a group etc. How do I find out where or what they are?

  4. #4
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Banner System Number Assignments in Code

    I'm having a little trouble understanding the question.

    You've created four banners in Banner Manager.

    You've assigned the unique Group Names, Front1, Front2, Front3 and Front4 to the banners

    You went to Admin - Configuration - Layout Settings and you've associated your created Group Names so:

    Banner Display Groups - Footer Position 3 front3
    Banner Display Groups - Side Box banner_box front2
    Banner Display Groups - Side Box banner_box2 front1
    Banner Display Group - Side Box banner_box_all front4

    Which would place the Front3 banner below the footer, and the other three in sideboxes. Is that what you want, and exactly how isn't it working? (BTW, Group Names may be case-sensitive. I'm not sure.)

  5. #5
    Join Date
    Sep 2010
    Posts
    64
    Plugin Contributions
    0

    Default Re: Banner System Number Assignments in Code

    Basically I want to be able to Place a Banner where I want to and I need to know how the
    HTML Code:
    if (SHOW_BANNERS_GROUP_SET6 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET6)) {
    is assigned in the database. it has nothing to do with footer or header it has more to do with I need to know how to Control Which banner shows up with which code.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Banner System Number Assignments in Code

    This FAQ article by Ajeh may help, as it gives the information you're asking for to identify how to call the content for each of those banner positions wherever you desire within your template: https://www.zen-cart.com/content.php...-up-banner-ads
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Banner System Number Assignments in Code

    Do you mean these?

    Banner Display Groups - Header Position 1 Info
    Banner Display Groups - Header Position 2 Info
    Banner Display Groups - Header Position 3 Info
    Banner Display Groups - Footer Position 1 Info
    Banner Display Groups - Footer Position 2 Info
    Banner Display Groups - Footer Position 3

    Those positions are defined in the various tpl_files, and moving them is done by moving blocks of code in/among those files.

    I'll recommend again that you take a look at http://stevesh.com/bannerdemo, and if it looks like anything resembling what you're trying to do, download the mod and look through the files and check the readme to see how I accomplished the layout.
    Last edited by stevesh; 25 Jun 2015 at 09:14 PM.

  8. #8
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,488
    Plugin Contributions
    88

    Default Re: Banner System Number Assignments in Code

    In addition, if you're looking for the locations of those various banner positions, check out my blog posting (http://vinosdefrutastropicales.com/blog/?p=230) which illustrates where each of those banners live.

 

 

Similar Threads

  1. AdSense code as a banner ad?
    By kb9k in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 23 Oct 2010, 12:02 AM
  2. AuthorizeNet ARB module product assignments?
    By kaylala in forum Addon Payment Modules
    Replies: 4
    Last Post: 13 Feb 2009, 05:45 PM
  3. Session variables assignments
    By race1 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 12 Aug 2008, 05:18 AM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR