Results 1 to 10 of 14

Hybrid View

  1. #1
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Index Page Issue

    For the home page, you would edit define_main_page.php in the Define Pages Editor.

    For category-specific content in that position, you would edit the category in Catalog > Categories/Products and add text or any HTML content.

  2. #2
    Join Date
    Dec 2006
    Posts
    26
    Plugin Contributions
    0

    Default Re: Index Page Issue

    I edited that file but it wouldn't show up. I have my define page status showing it there. Is there a reason that wouldn't shot up?

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Index Page Issue

    Was there some boilerplate text there when you first installed your template? Template Monster is known for disabling standard Zen Cart functions that they don't think they want for a template layout.

    If Define Main Page Status in Configuration > Define Pages Status is 1 or 2, and you are not seeing <div id="indexCategoriesMainContent"... in view source, then you should ask TM to fix what they have broken. That div should be there even if the define file is blank or missing.

    The file that takes care of this is /includes/templates/your_template/templates/tpl_index_categories.php.

  4. #4
    Join Date
    Dec 2006
    Posts
    26
    Plugin Contributions
    0

    Default Re: Index Page Issue

    Quote Originally Posted by gjh42 View Post
    Was there some boilerplate text there when you first installed your template? Template Monster is known for disabling standard Zen Cart functions that they don't think they want for a template layout.

    If Define Main Page Status in Configuration > Define Pages Status is 1 or 2, and you are not seeing <div id="indexCategoriesMainContent"... in view source, then you should ask TM to fix what they have broken. That div should be there even if the define file is blank or missing.

    The file that takes care of this is /includes/templates/your_template/templates/tpl_index_categories.php.
    Here is what my "tpl_index_categories.php" looks like

    <?php
    /**
    * Page Template
    *
    * Loaded by main_page=index<br />
    * Displays category/sub-category listing<br />
    * Uses tpl_index_category_row.php to render individual items
    *
    * @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_index_categories.php 3256 2006-03-25 19:08:47Z ajeh $
    */
    ?>
    <div id="indexCategories">
    <?php if ($show_welcome == true) { ?>
    <?=tm_head(HEADING_TITLE)?>

    <div class="main_block">

    <?php if (SHOW_CUSTOMER_GREETING == '1') { ?>
    <h2 class="greeting"><?php echo zen_customer_greeting(); ?></h2>
    <?php } ?>

    <!-- deprecated - to use - uncomment
    <?php if (TEXT_MAIN) { ?>
    <div id="" class="content"><?php echo TEXT_MAIN; ?></div>
    <?php } ?>-->

    <!-- deprecated - to use - uncomment
    <?php if (TEXT_INFORMATION) { ?>
    <div id="" class="content"><?php echo TEXT_INFORMATION; ?></div>
    <?php } ?>-->

    <?php if (DEFINE_MAIN_PAGE_STATUS >= '1' and DEFINE_MAIN_PAGE_STATUS <= '2') { ?>
    <div id="indexCategoriesMainContent" class="content"><?php
    /**
    * require the html_define for the index/categories page
    */
    include($define_page);
    ?></div>
    <?php } ?>

    <?php } else { ?>
    <h1 id="indexCategoriesHeading"><?php echo $breadcrumb->last(); ?></h1>
    <?php } ?>

    <?php
    // categories_description
    if ($current_categories_description != '') {
    ?>
    <div id="categoryDescription" class="catDescContent"><?php echo $current_categories_description; ?></div>
    <?php } // categories_description ?>
    <!-- BOF: Display grid of available sub-categories, if any -->
    <?php
    /**
    * require the code to display the sub-categories-grid, if any exist
    */
    require($template->get_template_dir('tpl_modules_category_row.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_category_row.php');
    ?>
    <!-- EOF: Display grid of available sub-categories -->
    <?php
    $show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_CATEGORY);

    while (!$show_display_category->EOF) {
    // // echo 'I found ' . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS);

    ?>

    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_CATEGORY_FEATURED_PRODUCTS') { ?>
    <?php
    /**
    * display the Featured Products Center Box
    */
    ?>
    <?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
    <?php } ?>

    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_CATEGORY_SPECIALS_PRODUCTS') { ?>
    <?php
    /**
    * display the Special Products Center Box
    */
    ?>
    <?php require($template->get_template_dir('tpl_modules_specials_default.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_specials_default.php'); ?>
    <?php } ?>

    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_CATEGORY_NEW_PRODUCTS') { ?>
    <?php
    /**
    * display the New Products Center Box
    */
    ?>
    <?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_whats_new.php'); ?>
    <?php } ?>

    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_CATEGORY_UPCOMING') { ?>
    <?php include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)); ?><?php } ?>
    <?php
    $show_display_category->MoveNext();
    } // !EOF
    ?>
    </div>
    <?=tm_head_end()?>
    </div>

    It shows that id in there.

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Index Page Issue

    Looks like this is not the file in use. With your one-level category tree, your setup will only ever use this file if you have
    Configuration > Layout Settings > Categories show on main page = true
    and Main page opens with category = 0 (for "all categories").

    tpl_index_default.php is the file used on your home page.

    If you want to post it to look at, please put it between [php] and [/php] tags, so it is easier to read and doesn't take up so much space on the page.

  6. #6
    Join Date
    Dec 2006
    Posts
    26
    Plugin Contributions
    0

    Default Re: Index Page Issue

    Ok, I've got it to load, however, I've got the 'Congratulations' reference that I obviously don't want, and I don't want to see the categories listed.

    How can I remove those?

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Index Page Issue

    For the "Congratulations...", see this FAQ.

    Set the categories display in Configuration > Layout Settings > Categories - Always Show on Main Page, and related lines if desired.

 

 

Similar Threads

  1. Why strange /index/xxx urls showing my index page
    By creamcrackers in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 27 Mar 2012, 03:23 AM
  2. index page is blank after changing index.php
    By meesh in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 22 Jul 2009, 05:37 PM
  3. An Announcement box on index page, and only on Index page
    By nigelt74 in forum General Questions
    Replies: 4
    Last Post: 25 Mar 2009, 01:41 AM
  4. Blank Index Page/Apache Errors - Optimize MYSQL Index
    By fr33k in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 23 Oct 2008, 10:58 PM
  5. new products on index page issue
    By chrissyscraps in forum General Questions
    Replies: 3
    Last Post: 22 Aug 2008, 07:23 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