Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Dec 2006
    Posts
    26
    Plugin Contributions
    0

    Default Index Page Issue

    Ok, I've got my columns switched around. Now where you see the product listings, I am trying to add some content above that. Is that in Define Pages Editor? If not how do I achieve this?

    www.tomsts.com

    Thanks

  2. #2
    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.

  3. #3
    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?

  4. #4
    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.

  5. #5
    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.

  6. #6
    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.

  7. #7
    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?

  8. #8
    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.

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

    Default Re: Index Page Issue

    Problem is. I need to have 'show main categories..." on in order for my define pages main info to show up. However, I can't seem to get the category links that are showing up below to go away in the layout settings.

    It also makes my "new products" show up and my "featured products" dissapear.

    I just want my featured products and the main page info to post.

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

    Default Re: Index Page Issue

    Here is the tpl_index_default file

    PHP Code:
    <?php
    /**
     * Page Template
     *
     * Main index page<br />
     * Displays greetings, welcome text (define-page content), and various centerboxes depending on switch settings in Admin<br />
     * Centerboxes are called as necessary
     *
     * @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_default.php 3254 2006-03-25 17:34:04Z ajeh $
     */
    ?>
    <div id="indexDefault" class="rbg1">
    <?php if (SHOW_CUSTOMER_GREETING == '1') { ?>
    <h2 class="greeting"><?php echo zen_customer_greeting(); ?></h2>
    <?php ?>
    <!-- deprecated - to use uncomment this section
    <?php if (TEXT_MAIN) { ?>
    <div id="" class="content"><?php echo TEXT_MAIN?></div>
    <?php ?>
     deprecated - to use uncomment this section
    <?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') { ?>
    <?php
    /**
     * get the Define Main Page Text
     */
    ?>
    <div id="indexDefaultMainContent" class="content"><?php require($define_page); ?></div>
    <?php ?>
    -->
    <?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
    /**
     * display the Featured Products Center Box
     */
    ?>         
    <?=tm_head('Featured products:');?>          
    <?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_MAIN_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_MAIN_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 

     if (
    $show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_UPCOMING') { ?>
    <?php
    /**
     * display the Upcoming Products Center Box
     */
      
    include(DIR_WS_MODULES zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS));  
      } 
      
    $show_display_category->MoveNext();
    // !EOF
    ?>
    </div>

 

 
Page 1 of 2 12 LastLast

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