Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2012
    Location
    California
    Posts
    21
    Plugin Contributions
    0

    Default Editing tpl_main_page.php problem

    I am trying to add content to all of my pages in the center column via the tpl_main_page.php file. I have added the content to the tpl_main_page.php file between

    <?php

    /**

    * prepares and displays center column

    *

    */

    require($body_code); ?>

    ADDED CONTENT HERE

    <?php

    if (SHOW_BANNERS_GROUP_SET4 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET4)) {

    if ($banner->RecordCount() > 0) {

    ?>

    The content is showing up on all of the pages like I want but the problem is on the main page. The content (whole div) is linking to a random product page. On the other pages the content shows as intended without linking to anything. I do not want the added content on the main page to link to a random product page like it is. This seems strange and is not intended.

    I have saved this file to the override folder templates/CUSTOM/common/tpl_main_page.php. I am using a custom template. I haven't had any problems like this before.

    I have searched the forum and the internet for anything relating to this problem and can't find a solution. Any help would be greatly appreciated. Thank you in advance.
    Last edited by jackolive; 18 Sep 2012 at 03:45 AM.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Editing tpl_main_page.php problem

    What's the URL where this can be seen?
    .

    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.

  3. #3
    Join Date
    Apr 2012
    Location
    California
    Posts
    21
    Plugin Contributions
    0

    Default Re: Editing tpl_main_page.php problem

    www. one f8 .com

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Editing tpl_main_page.php problem

    Looks like you've got 2 extra closing </div> tags on that page .... one between your ez-slider sections, and one above your satisfaction seal.
    I'm not sure what they're supposed to be "closing", or what content they're supposed to be part of, but those will be contributors to your odd symptoms.
    .

    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.

  5. #5
    Join Date
    Apr 2012
    Location
    California
    Posts
    21
    Plugin Contributions
    0

    Default Re: Editing tpl_main_page.php problem

    Dr. Byte,

    I checked the cache earlier and in the latest myDEBUG log it states


    [17-Sep-2012 23:37:27] PHP Parse error: syntax error, unexpected '<' in /home/content/60/8825060/html/onef8/includes/templates/onef8/common/tpl_main_page.php on line 243


    Line 243 in the tpl_main_page.php file is below in red

    <?php

    /**

    * prepares and displays center column

    *

    */

    require($body_code); ?>

    This is just above the new content that I added.

    I am figuring that I have an extra "<" opening div tag somewhere in one of my override template files.

    You are saying "Looks like you've got 2 extra closing </div> tags on that page .... one between your ez-slider sections, and one above your satisfaction seal." The ez-slider is in tpl_index_default.php and the new content is in tpl_main_page.php.

    I deleted all of the override template files in the CUSTOM/common folder except tpl_main_page.php, and all files in the CUSTOM/templates folder and the problem still exists. The only change that I made in the tpl_main_page.php is the content that shows in the site, very minimal. I checked several times for extra divs and there are none.

    Thanks for the prompt reply and your efforts. Do you have any suggestions?

  6. #6
    Join Date
    May 2011
    Posts
    17
    Plugin Contributions
    0

    Default Re: Editing tpl_main_page.php problem

    It seems like the center box featured products are without the closing div

  7. #7
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Editing tpl_main_page.php problem

    You've only talked about "not changed other template files", but what about files you've changed/added outside of the templates?

    I don't think this is a tpl_main_page.php issue. Unless it's in the extra code you've added (but you've not shared what exactly that code is, so I can't be certain).
    .

    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.

  8. #8
    Join Date
    May 2011
    Posts
    17
    Plugin Contributions
    0

    Default Re: Editing tpl_main_page.php problem

    Oh i mean, should be missing the closing </a> for link

    check in template folder

    includes/modules/yourtemplate/featured_products.php

    or

    includes/modules/featured_products.php
    Last edited by fjtv; 18 Sep 2012 at 07:24 AM.

  9. #9
    Join Date
    Apr 2012
    Location
    California
    Posts
    21
    Plugin Contributions
    0

    Default Re: Editing tpl_main_page.php problem

    Dr. Byte,

    I seem to have fixed the problem. I started checking all of the CUSTOM folders. fjtv mentioned above, "It seems like the center box featured products are without the closing div" so I checked it out. The links were actually to new products, so I started checking all of the new products files.

    I deleted the includes/modules/CUSTOM/new_products.php and replaced it with a fresh includes/modules/new_products.php file and it worked.

    I don't know what I changed in the previous file to cause this problem in the first place. But it works now.

    Thank you. You are very generous with your time.

    Jesse



    fjtv,

    Thank you also for pitching in.
    Last edited by jackolive; 18 Sep 2012 at 07:41 AM.

 

 

Similar Threads

  1. need html_header.php & tpl_main_page.php files
    By marvin in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 23 Nov 2011, 06:32 PM
  2. Copying & Editing /common/tpl_main_page.php
    By chrx in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 8 May 2011, 05:16 AM
  3. PHP help with broken tpl_main_page.php
    By HeresySnowboarding in forum General Questions
    Replies: 4
    Last Post: 18 Sep 2008, 07:48 PM
  4. tpl_main_page.php problem..help :)
    By florence in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 26 Jul 2006, 11:00 PM
  5. strange problem with css and modification of tpl_main_page.php
    By sartzsche in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 24 May 2006, 09:21 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