Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21
  1. #11
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Adding new element to main or other page

    If you want to add elements to the product listing page (and not to other pages) try /includes/templates/your_template/templates/tpl_index_product_list.php.

    Adding elements in tpl_header.php will not affect the banners unless you are doing something wrong. It's not possible to say what without seeing the edited file.

  2. #12
    Join Date
    May 2012
    Posts
    38
    Plugin Contributions
    0

    Default Re: Adding new element to main or other page

    Actually, I want to turn the banners off - sorry if I misled you.

    I want to put an image, with links I control, either above or below the existing HEADER_LOGO_IMAGE. That I can put text links in the tpl_header seems to imply that I can put such an image where I want it. Then, I want to put more linked images below the part that displays the product boxes. I thought tpl_footer would permit that, but I can't seem to control anything with that file, and I'm wondering why.

  3. #13
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Adding new element to main or other page

    You can add elements with tpl_footer.php, as long as you code them right. Thus, you have some error which we cannot advise on without seeing your copy of the file.

    If you want the new elements on all pages, tpl_footer.php is the right file to edit; if not, use tpl_index_product_list.php or whatever other file controls the particular page content.

  4. #14
    Join Date
    May 2012
    Posts
    38
    Plugin Contributions
    0

    Default Re: Adding new element to main or other page

    Here's my tpl_footer. The only changes are the <h3>xping*</h3> lines added, looking for where they might show up:

    <?php
    /**
    * Common Template - tpl_footer.php
    *
    * this file can be copied to /templates/your_template_dir/pagename<br />
    * example: to override the privacy page<br />
    * make a directory /templates/my_template/privacy<br />
    * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_footer.php<br />
    * to override the global settings and turn off the footer un-comment the following line:<br />
    * <br />
    * $flag_disable_footer = true;<br />
    *
    * @package templateSystem
    * @copyright Copyright 2003-2010 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: tpl_footer.php 15511 2010-02-18 07:19:44Z drbyte $
    */
    require(DIR_WS_MODULES . zen_get_module_directory('footer.php'));
    ?>

    <?php
    if (!isset($flag_disable_footer) || !$flag_disable_footer) {
    ?>
    <h3>xping_tpl_footer_1</h3>

    <!--bof-navigation display -->
    <div id="navSuppWrapper">
    <div id="navSupp">
    <ul>
    <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>
    <?php if (EZPAGES_STATUS_FOOTER == '1' or (EZPAGES_STATUS_FOOTER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
    <li><?php require($template->get_template_dir('tpl_ezpages_bar_footer.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_footer.php'); ?></li>
    <?php } ?>
    </ul>
    </div>
    </div>
    <!--eof-navigation display -->
    <h3>xping_tpl_footer_2</h3>
    <!--bof-ip address display -->
    <?php
    if (SHOW_FOOTER_IP == '1') {
    ?>
    <div id="siteinfoIP"><?php echo TEXT_YOUR_IP_ADDRESS . ' ' . $_SERVER['REMOTE_ADDR']; ?></div>
    <?php
    }
    ?>
    <!--eof-ip address display -->
    <h3>xping_tpl_footer_3</h3>
    <!--bof-banner #5 display -->
    <?php
    if (SHOW_BANNERS_GROUP_SET5 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET5)) {
    if ($banner->RecordCount() > 0) {
    ?>
    <div id="bannerFive" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
    <?php
    }
    }
    ?>
    <!--eof-banner #5 display -->
    <h3>xping_tpl_footer_4</h3>
    <!--bof- site copyright display -->
    <div id="siteinfoLegal" class="legalCopyright"><?php echo FOOTER_TEXT_BODY; ?></div>
    <!--eof- site copyright display -->

    <?php
    } // flag_disable_footer
    <h3>xping_tpl_footer_5</h3>
    ?>

  5. #15
    Join Date
    May 2012
    Posts
    38
    Plugin Contributions
    0

    Default Re: Adding new element to main or other page

    Also, a similar set of changes produced visible results in tpl_header.

  6. #16
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Adding new element to main or other page

    Those edits will work if you have saved the edited file to the right location. Where is it now, and are the edits in it?

  7. #17
    Join Date
    May 2012
    Posts
    38
    Plugin Contributions
    0

    Default Re: Adding new element to main or other page

    It's in (((store)))/includes/templates/barebones/common

    I did a diff -wis of the original and modified footers:
    24a25
    > <h3>xping_tpl_footer_1</h3>
    38c39
    <
    ---
    > <h3>xping_tpl_footer_2</h3>
    48c49
    <
    ---
    > <h3>xping_tpl_footer_3</h3>
    60c61
    <
    ---
    > <h3>xping_tpl_footer_4</h3>
    66a68
    > <h3>xping_tpl_footer_5</h3>

  8. #18
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Adding new element to main or other page

    I don't know what to say. It sounds like you have the right location (you are using barebones template, right?) and there is nothing wrong with those edits. You're sure that the copy on the server now has the edits?

  9. #19
    Join Date
    May 2012
    Posts
    38
    Plugin Contributions
    0

    Default Re: Adding new element to main or other page

    Futher observations: at one point I lost the entire page, even when the main, header and footer files in barebones/common were renamed to e.g. 1.tpl_header.php. Blank grey screen. Does zencart see and act on files of such nonstandard names?

    Deleting everything in barebones/common brought the page back. Putting the modified tpl_footer back in makes the banners disappear (all predefined banners are turned on via the admin). Also the "Your IP Address is", copyright, and "powered by zen cart" material at the bottom disappears. Is that a clue, maybe?

    Looking further, with all banners off, and no tpl_header, I get the IP Address, copyright, and zen-cart bottom material. If I then add tpl_header, the bottom matter goes away.

  10. #20
    Join Date
    May 2012
    Posts
    38
    Plugin Contributions
    0

    Default Re: Adding new element to main or other page

    I should have said: in the previous post, tpl_footer is the only file in barebones/common, I deleted the tpl_header.

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Adding new element to header menu
    By GabyWalker in forum Basic Configuration
    Replies: 5
    Last Post: 5 Dec 2013, 09:52 PM
  2. Replies: 1
    Last Post: 17 Oct 2009, 11:50 PM
  3. Main page display other than New Products?
    By ddye in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 12 May 2007, 03:53 PM
  4. Adding flash element to product page
    By wcjmproducer in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 2 Nov 2006, 10:53 PM
  5. Adding Category Name to the New Products/Featured/Specials Boxes on Main Page
    By chinchilla2 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 21 Aug 2006, 09:05 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR