Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2007
    Posts
    26
    Plugin Contributions
    0

    Default Code displays in the header of my webpage

    I followed the steps in FAQ to create a new Custom Template, https://www.zen-cart.com/tutorials/i...hp?article=142. It worked okay but now I have some code in my header section starting with " // Display all header alerts via messageStack:"

    Below is the code from template_info.php where this is coming from. Can someone tell me why this code is displayed on my website? Unfortunately, I saved the changes in the /template_default directory by mistake before I saved again to /custom.

    <?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
    $template_name = 'CUSTOM';$template_version = 'Version 1.0';$template_author = Thunbug';$template_description = 'This is my own template, created for my site at www.xxxxx.com/shop';$template_screenshot = '';?>
    // 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 {
    }
    ?>

  2. #2
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: Code displays in the header of my webpage

    Uh ... you have modified the wrong file.

    the file you have change is the tpl_header.php.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    Mar 2007
    Posts
    26
    Plugin Contributions
    0

    Default Re: Code displays in the header of my webpage

    Mmm. I see...wonder how I got those mixed up. I've looked at a number of FAQ topics on customization and I guess I got myself all mixed up. Thank you Kim.

 

 

Similar Threads

  1. Defined Pages displays raw code
    By jeking in forum General Questions
    Replies: 3
    Last Post: 18 Oct 2010, 03:34 AM
  2. Error Code text displays all over my header!?
    By Cookiepus in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 21 Feb 2010, 12:45 AM
  3. What's the url code of "webpage".
    By jackyhu in forum General Questions
    Replies: 0
    Last Post: 13 May 2008, 04:21 AM
  4. Funny code at top of webpage
    By paws4pets in forum Installing on a Linux/Unix Server
    Replies: 12
    Last Post: 3 Apr 2008, 05:44 PM
  5. strange code at top of webpage
    By IncrediBody in forum General Questions
    Replies: 1
    Last Post: 30 Mar 2007, 03:54 PM

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