Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16
  1. #11
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Subcategories Not Displaying Under Categories

    PHP Code:
    <?php
    if (PRODUCT_LIST_CATEGORIES_IMAGE_STATUS_TOP == 'true') {


    <?
    php
    // categories_description
    The first <?php tag is not closed by a ?> before the next opening tag. Thus the "unexpected <".

  2. #12

    Default Re: Subcategories Not Displaying Under Categories

    I tried to close it, but no difference.

    Here is the entire file: (but I do not remember to have alterede anything in it, but...?

    PHP Code:
    <?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 4678 2006-10-05 21:02:50Z ajeh $
     */
    ?>
    <div class="centerColumn" id="indexCategories">
    <?php if ($show_welcome == true) { ?>
    <h1 id="indexCategoriesHeading"><?php echo HEADING_TITLE?></h1>

    <?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 >= 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
    if (PRODUCT_LIST_CATEGORIES_IMAGE_STATUS_TOP == 'true') {

    ?>
    <?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
      
    if (PRODUCT_LIST_CATEGORY_ROW_STATUS == 0) {
        
    // do nothing
      
    } else {
        
    // display subcategories
    /**
     * 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>

  3. #13

    Default Re: Subcategories Not Displaying Under Categories

    Might be a problem with the css_horizontal_dropdown_menu_with_jquery_2-0?

  4. #14

    Default Re: Subcategories Not Displaying Under Categories

    Solved it I think...

    Found this missing code in a backup:

    PHP Code:
    // categories_image

      if ($categories_image = zen_get_categories_image($current_category_id)) {

    ?>

    <div id="categoryImgListing" class="categoryImg"><?php echo zen_image(DIR_WS_IMAGES $categories_image''SUBCATEGORY_IMAGE_TOP_WIDTHSUBCATEGORY_IMAGE_TOP_HEIGHT); ?></div>

    <?php

      
    }

    // categories_image

    ?>



    <?php

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

    Default Re: Subcategories Not Displaying Under Categories

    That section of the file should look like
    PHP Code:
    <?php
    if (PRODUCT_LIST_CATEGORIES_IMAGE_STATUS_TOP == 'true') {
    // categories_image
      
    if ($categories_image zen_get_categories_image($current_category_id)) {
    ?>
    <div id="categoryImgListing" class="categoryImg"><?php echo zen_image(DIR_WS_IMAGES $categories_image''SUBCATEGORY_IMAGE_TOP_WIDTHSUBCATEGORY_IMAGE_TOP_HEIGHT); ?></div>
    <?php
      
    }
    // categories_image
    ?>

    <?php
    // categories_description
        
    if ($current_categories_description != '') {
    ?>
    So you found the missing code, slightly altered with extra line breaks.

    This could not have anything to do with any menus.

  6. #16

    Default Re: Subcategories Not Displaying Under Categories

    Thanks a lot, it works

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v153 Can I set up subcategories under subcategories?
    By jokkah in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 7 Sep 2014, 08:05 PM
  2. v150 Center Box Not Displaying Subcategories
    By Dianne in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 27 Jul 2013, 02:23 AM
  3. Some subcategories not displaying products
    By mleahy in forum General Questions
    Replies: 7
    Last Post: 5 Jul 2011, 11:38 PM
  4. Categories and subcategories not displaying properly
    By canemasters in forum Customization from the Admin
    Replies: 2
    Last Post: 16 Sep 2008, 10:04 PM
  5. how to prevent home page images from displaying under categories
    By james739 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 6 Dec 2007, 02:16 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