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

    Default HTML include in header

    My cart is basically ready to go, but I haven't been able to get my header to work properly. It looks great on Safari, but in firefox it gets all blown out of place, and on a PC in different versions of IE certain colors are missing or different. I have been working on it for two weeks with no luck, so I would like to go back to what I know so I can quickly finish it. I already have the HTML header setup and ready to go, I am just having problems getting it into my cart.

    I have tried <?php include 'header.php';?> to pull it in, but when I do my page goes blank from the point after the include. I don't get any errors just a blank page after the include statement loads, before the include everything is there? I'm looking for ideas on how this can be done, or why my page is going blank?

  2. #2
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: HTML include in header

    I have tried <?php include 'header.php';?>
    In which EXACT file did you put that include?
    Url of your zencart site would also help

  3. #3
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: HTML include in header

    Dealing with blank pages, or portions thereof:
    https://www.zen-cart.com/tutorials/index.php?article=82 (esp step 2a)
    .

    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.

  4. #4
    Join Date
    Jan 2008
    Posts
    67
    Plugin Contributions
    0

    Default Re: HTML include in header

    The site is currently on our companies local intranet server and not accessible to the outside web just yet. I have run the debugger but it has not given any errors.

    I have placed the 'include' in the tpl_header.php file for my template, and I have tried it in multiple places. Each time the same thing happens, the page loads to the point of the 'include' and then stops, no errors, nothing, it just stops.

    I'm using zen cart 1.3.8 if that makes any difference? Any advice would be appreciated, maybe another way to call an html file into the header?

  5. #5
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: HTML include in header

    I have placed the 'include' in the tpl_header.php file for my template
    Correct file
    I have tried <?php include 'header.php';?>
    INCORRECT php
    Rename your html file, mytopheader.php as header.php may conflict
    with zencart coding.
    Then in tpl_header.php, add following code, marked red
    Code:
    <?php
    if (!isset($flag_disable_header) || !$flag_disable_header) {
    ?>
    <?php
    include('mytopheader.php');
    ?>
    Your new php file should have css associated with it..
    i.e.
    Code:
    <div id="headerWrapper">
    your html/php code here
    </div>

  6. #6
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: HTML include in header

    If the debug logging tool isn't logging any errors, it could be that your permissions on the folder it's trying to store the logs in are preventing it from writing the logs.

    Further, you will probably need to specify at least a partial path to the file you're trying to include. The error logs should tell you what it's looking for but not finding, and from there you can either set the path or relocate the file you're trying to include.
    .

    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
    Jan 2008
    Posts
    67
    Plugin Contributions
    0

    Default Re: HTML include in header

    I think I have decided to go back and try the CSS in my header, I'm just going around in circles with the html. There were no errors logging, I tried using php includes in all sorts of different places and nothing worked. But then again I'm having just as many problems with CSS. I got everything working in Safari and Firefox on macs, and firefox on PC's but still having a bit of problems getting it to look right on IE. Thanks for the assistance

 

 

Similar Threads

  1. Can the header include an HTML table?
    By bluealice in forum Templates, Stylesheets, Page Layout
    Replies: 27
    Last Post: 25 Nov 2009, 08:41 AM
  2. HTML E-mail sending but does not include text
    By scottrdj in forum General Questions
    Replies: 0
    Last Post: 30 Jan 2008, 05:25 PM
  3. Include an html page in a product description? (server side includes)
    By jwoodall in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 29 Jan 2008, 03:48 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