Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Apr 2011
    Posts
    5
    Plugin Contributions
    0

    Default Which FILE to modify ?

    I am completely new to Zen cart. I am editing one of my client's website to reflect navigation and phone number changes. 3 of his pages are created using Zen cart which DOES NOT have header and footer through Zen cart interface but it has this customized navigation bar as header and footer which is same as the entire website.

    My question is which files do I edit to reflect the header and footer changes on Zen cart pages and where to locate those files ?

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

    Default Re: Which FILE to modify ?

    They should be /includes/templates/your_template/common/tpl_header.php and tpl_footer.php, where your_template is the foldername of the active custom template.
    As this is apparently a highly modified installation, it could be something else entirely; we would have to see the file structure to be sure.

    Use FTP to access the Zen Cart installation, download the files, edit and re-upload them. Note: you cannot use Word to edit these files, as it will add extra formatting and junk that will damage the files. Use a good text/file editor like Notepad++.

  3. #3
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Which FILE to modify ?

    Where is the site?

    url to a page in the cart and one to other page
    Zen-Venom Get Bitten

  4. #4
    Join Date
    Apr 2011
    Posts
    5
    Plugin Contributions
    0

  5. #5
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Which FILE to modify ?

    gjh42 pointed you to the files and the overrides(do not edit core files) edited copies will be in your template structure
    includes/templates/circos/common/ for those 2 files

    You are half in ZenCart and half outside the html pages are no longer needed - just move content to ZenCart and move ZenCart from "/store" to "/"
    Zen-Venom Get Bitten

  6. #6
    Join Date
    Apr 2011
    Posts
    5
    Plugin Contributions
    0

    Default Re: Which FILE to modify ?

    I looked for the tpl_header.php and tpl_footer.php in includes/templates/circos/common/ I am not too sure what to edit in those files as I couldn't find any HTML code.

    You are correct by saying that the pages are half HTML and half Zen cart. I appreciate your advice of moving it completely to Zen Cart. But it would be much more benficial as of now.. to just modify the navigation and phone number. Can you help me figure out the HTML / PHP pages that would have header and footer that I need to modify ?

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

    Default Re: Which FILE to modify ?

    Perhaps due to the acrobatics of trying to have a site which is half HTML and half Zen Cart, you have some serious HTML errors:
    http://validator.w3.org/check?verbos...Dpage%26id%3D2
    Some of these are trivial, but some really need to be corrected before you can expect your site to work right in all browsers.

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

    Default Re: Which FILE to modify ?

    The HTML is built in bits and pieces in those files, unless the template creator put it all somewhere else. If you post the tpl_header.php between [php] and [/php] tags, we can tell you what the situation is and possibly how to fix it.

  9. #9
    Join Date
    Apr 2011
    Posts
    5
    Plugin Contributions
    0

    Default Re: Which FILE to modify ?

    PHP Code:
    <?php
    /**
     * Common Template - tpl_header.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_header.php<br />
     * to override the global settings and turn off the footer un-comment the following line:<br />
     * <br />
     * $flag_disable_header = true;<br />
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 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_header.php 4813 2006-10-23 02:13:53Z drbyte $
     */
    ?>

    <?php
      
    // Display all header alerts via messageStack:
      
    if ($messageStack->size('header') > 0) {
        echo 
    $messageStack->output('header');
      }
      if (isset(
    $_GET['error_message']) && zen_not_null($_GET['error_message'])) {
      echo 
    htmlspecialchars(urldecode($_GET['error_message']));
      }
      if (isset(
    $_GET['info_message']) && zen_not_null($_GET['info_message'])) {
       echo 
    htmlspecialchars($_GET['info_message']);
    } else {

    }
    ?>


    <!--bof-header logo and navigation display-->
    <?php
    if (!isset($flag_disable_header) || !$flag_disable_header) {
    ?>

    <div id="headerWrapper">
    <!--bof-navigation display-->
    <div id="navMainWrapper">
    <div id="navMain">
        <ul class="back">
        <li><?php echo '<a href="">'?><?php echo HEADER_TITLE_CATALOG?></a></li>
    <?php if ($_SESSION['customer_id']) { ?>
        <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF'''SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF?></a></li>
        <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT'''SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT?></a></li>
    <?php
          
    } else {
            if (
    STORE_STATUS == '0') {
    ?>
        <li><a href="<?php echo zen_href_link(FILENAME_LOGIN'''SSL'); ?>"><?php echo HEADER_TITLE_LOGIN?></a></li>
    <?php } } ?>

    <?php if ($_SESSION['cart']->count_contents() != 0) { ?>
        <li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART'''NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS?></a></li>
        <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING'''SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT?></a></li>
    <?php }?>
    </ul>
    </div>
    <div id="navMainSearch"><?php require(DIR_WS_MODULES 'sideboxes/search_header.php'); ?></div>
    <br class="clearBoth" />
    </div>
    <!--eof-navigation display-->

    <!--bof-branding display-->
    <div id="logoWrapper">
    <table border="0">
    <tr><td id="logoCell" height="98" colspan="6"></td></tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
    </table>

    <!-- <a href="../" style="display:block;width:100%;height:100%"> -->
        <!--<div id="logo"><?php echo '<a href="' HTTP_SERVER DIR_WS_CATALOG '">' zen_image($template->get_template_dir(HEADER_LOGO_IMAGEDIR_WS_TEMPLATE$current_page_base,'images'). '/' HEADER_LOGO_IMAGEHEADER_ALT_TEXT) . '</a>'?></div>-->
    <?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET2))) { ?>
        <div id="taglineWrapper">
    <?php
                  
    if (HEADER_SALES_TEXT != '') {
    ?>
          <div id="tagline"><?php echo HEADER_SALES_TEXT;?></div>
    <?php
                  
    }
    ?>
    <?php
                  
    if (SHOW_BANNERS_GROUP_SET2 != '' && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET2)) {
                    if (
    $banner->RecordCount() > 0) {
    ?>
          <div id="bannerTwo" class="banners"><?php echo zen_display_banner('static'$banner);?></div>
    <?php
                    
    }
                  }
    ?>
    </a>    </div>
    <?php // no HEADER_SALES_TEXT or SHOW_BANNERS_GROUP_SET2 ?>
    </div>
    <br class="clearBoth" />
    <!--eof-branding display-->

    <!--eof-header logo and navigation display-->

    <!--bof-optional categories tabs navigation display-->
    <?php require($template->get_template_dir('tpl_modules_categories_tabs.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_categories_tabs.php'); ?>
    <!--eof-optional categories tabs navigation display-->

    <!--bof-header ezpage links-->
    <?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE$_SERVER['REMOTE_ADDR'])))) { ?>
    <?php 
    require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
    <?php 
    ?>
    <!--eof-header ezpage links-->
    </div>
    <?php ?>

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

    Default Re: Which FILE to modify ?

    The first thing your copy of tpl_header.php does (after displaying any warnings or alerts) is to add an HTML comment
    <!--bof-header logo and navigation display-->
    even before deciding whether to output the header. This is absent from the output.
    It appears your /includes/templates/circos/common/tpl_main_page.php may have been hacked up to delete the call to the header entirely.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v152 Which file do I modify for checkout_payment page?
    By ZkullGraveAce in forum General Questions
    Replies: 0
    Last Post: 14 Jan 2014, 03:28 PM
  2. knowing which php file calls which?
    By joemind in forum General Questions
    Replies: 0
    Last Post: 15 Oct 2008, 08:28 PM
  3. Which File
    By cs_jono in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 29 Oct 2007, 04:28 PM
  4. modify which file? where is it?
    By humbll in forum General Questions
    Replies: 2
    Last Post: 29 May 2007, 05:50 PM
  5. Need to know what file to modify
    By [email protected] in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 18 Aug 2006, 01:05 AM

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