Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2007
    Posts
    45
    Plugin Contributions
    0

    Default Main Page issue after addon install

    I just finished installing the "News and Articles Management" from http://www.dream-scape.com/pub/zenca...t/install.html

    Now I am getting the following statement instead of my define_main_page.php information:
    "This is the main define statement for the page for english when no template defined file exists. It is located in: /includes/languages/english/index.php Define your main Index page copy here."

    I have searched and found many things about this file but nothing that has helped me as of yet. The page has all the source code of my define_main_page.php but it is not displaying it. I thought maybe something I installed is not pointing to the right file but then why is all the code there but nothing showing up?

    Any help is greatly appreciated.
    Thanks,
    Nick

  2. #2
    Join Date
    Feb 2007
    Posts
    45
    Plugin Contributions
    0

    Default Re: Main Page issue after addon install

    My apologies, upon closer inspection it appears the source code does not include any of the code from the define_main_page file. So does this mean something changed the path to this file which is why I am getting the index.php message?

  3. #3
    Join Date
    Feb 2007
    Posts
    45
    Plugin Contributions
    0

    Default Re: Main Page issue after addon install

    I discovered my problem. The file tpl_index_default.php that I placed in my custom templates "template" folder was the source of the problem.
    This is what the file is for:
    "News Summary Module" if you wish to use the News Summary module on the main index page. Lets say I wanted to use this feature, is there a way to keep it from overriding my define_main_page file?

    Here is the source code of the file itself. Maybe you will pick up on something I did not.

    <?php
    //
    // +----------------------------------------------------------------------+
    // |zen-cart Open Source E-commerce |
    // +----------------------------------------------------------------------+
    // | Copyright (c) 2003 The zen-cart developers |
    // | |
    // | http://www.zen-cart.com/index.php |
    // | |
    // | Portions Copyright (c) 2003 osCommerce |
    // +----------------------------------------------------------------------+
    // | This source file is subject to version 2.0 of the GPL license, |
    // | that is bundled with this package in the file LICENSE, and is |
    // | available through the world-wide-web at the following url: |
    // | http://www.zen-cart.com/license/2_0.txt. |
    // | If you did not receive a copy of the zen-cart license and are unable |
    // | to obtain it through the world-wide-web, please send a note to |
    // | license@zen-cart.com so we can mail you a copy immediately. |
    // +----------------------------------------------------------------------+
    // $Id: tpl_index_default.php 277 2004-09-10 23:03:52Z wilt $
    //
    ?>
    <table border="0" width="100%" cellspacing="2" cellpadding="2">
    <tr>
    <td class="pageHeading"><h1><?php echo HEADING_TITLE; ?></h1></td>
    </tr>
    <tr>
    <td class="greetUser"><?php echo zen_customer_greeting(); ?></td>
    </tr>
    <?php if (TEXT_MAIN) { ?>
    <tr>
    <td class="main"><?php echo TEXT_MAIN; ?></td>
    </tr>
    <?php } ?>
    <?php if (TEXT_INFORMATION) { ?>
    <tr>
    <td class="plainBox"><?php echo TEXT_INFORMATION; ?></td>
    </tr>
    <?php } ?>
    <?php if (DEFINE_MAIN_PAGE_STATUS == '1') { ?>
    <tr>
    <td class="plainBox"><br /></td>
    </tr>
    <?php } ?>
    </table><br />

    <?php include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_NEWS_SUMMARY_MODULE)); ?>

    <?php
    $show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_MAIN);

    while (!$show_display_category->EOF) {
    ?>

    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_FEATURED_PRODUCTS') { ?>
    <?php include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_FEATURED_PRODUCTS_MODULE)); ?><?php } ?>
    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_SPECIALS_PRODUCTS') { ?>
    <?php include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_SPECIALS_INDEX)); ?><?php } ?>
    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_NEW_PRODUCTS') { ?>
    <?php require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_NEW_PRODUCTS)); ?><?php } ?>
    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_UPCOMING') { ?>
    <?php include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)); ?><?php } ?>
    <?php
    $show_display_category->MoveNext();
    } // !EOF
    ?>

  4. #4
    Join Date
    Sep 2004
    Location
    Rocky Mountains, Colorado
    Posts
    2,936
    Plugin Contributions
    5

    Default Re: Main Page issue after addon install

    from looking at the code you posted, that tpl_index_default.php is based on a version earlier than 1.3.0 (none of that table structure is there now).
    It also deleted the defined main page content.
    Not taking into account the old version issue, this section of code
    Code:
    <?php if (DEFINE_MAIN_PAGE_STATUS == '1') { ?>
    <tr>
    <td class="plainBox"><br /></td>
    </tr>
    <?php } ?>
    should read like this:
    Code:
    <?php if (DEFINE_MAIN_PAGE_STATUS == '1') { ?>
          <tr>
            <td class="plainBox"><?php require($define_main_page); ?><br /></td>
          </tr>
    <?php } ?>
    Neville
    An assumption is what you arrive at when you get tired of thinking...
    www.customcartmods.com

 

 

Similar Threads

  1. Change page flow and construct hybrid page
    By triplemaya in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 31 Oct 2008, 11:54 AM
  2. Help making Template
    By Shiftypow in forum Basic Configuration
    Replies: 8
    Last Post: 4 Jun 2007, 07:20 AM
  3. Replies: 17
    Last Post: 26 Jul 2006, 06:20 PM
  4. Page URL with out showing on Main page
    By qgriffith in forum General Questions
    Replies: 3
    Last Post: 25 Jul 2006, 10:36 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •