Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2011
    Posts
    32
    Plugin Contributions
    0

    Default Double Main Content above header and navigation

    I am in process of upgrading my zen cart install from 1.1 to 1.5.1. It's also in japanese. I was able to upgrade and have special characters display properly. I am almost finished rebuilding the template but I am stuck on one error.

    The main content shows up twice, once where it should be, and another at the very top of the page. I created a workaround by using a counter in <theme>/templates/tpl_index_default.php and an if block so it will only show once. But it is also occurring on other pages like product category pages.

    I did a grep to search for instances of $tpl_page_body, and only found it once in /includes/modules/pages/index/main_template_vars.php. Commenting it out caused me to loose both the wrong content on top of the page, and the right one.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Double Main Content above header and navigation

    1. The most common error people make is in the /includes/modules/pages/ subdirectories. They often rename header_php.php to header_php1.php and main_template_vars.php to main_template_vars1.php. The problem with that is they are keeping the ".php" on the end, and Zen Cart is built to load ALL *.php files from certain folders.
    So, instead of renaming to header_phpxxxxxx.php for a backup, rename to header_phpxxxxx.bak (using .bak instead of .php)

    2. Do a fresh compare of all the files in /includes/template/your_template/common against /includes/templates/template_default/common and make sure that you don't have unnecessary code in your customized files.
    .

    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.

 

 

Similar Threads

  1. how to add an image *between* header text and above content??
    By tlyczko in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 2 Mar 2013, 09:54 PM
  2. Adding content to main page above and below "Featured" products???
    By aly22 in forum Templates, Stylesheets, Page Layout
    Replies: 13
    Last Post: 12 Sep 2010, 07:52 PM
  3. Gap between header and main content...Help!
    By andreadesigns in forum Templates, Stylesheets, Page Layout
    Replies: 23
    Last Post: 4 Jan 2009, 07:35 PM
  4. Double Main Content
    By Kitty in forum General Questions
    Replies: 0
    Last Post: 21 May 2008, 05:03 PM
  5. How / where to place my own custom PHP header and navigation, above Zen Cart
    By zimbla3 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 17 May 2008, 01:29 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