Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2008
    Posts
    26
    Plugin Contributions
    0

    Default Multiple category Display on Homepage

    I am trying to figure out a way to display products from multiple categories on the homepage of my website.

    Currently i have set up 2 categories but on homepage, it displays products from only 1 category. This i think is by default.

    Thank-you!

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

    Default Re: Multiple category Display on Homepage

    There is not a way in the stock installation to do this, other than making all the products "featured" and showing them in the featured centerbox.

    You might look at the "all categories & products on one page" mod in yellow1912's sig link.

  3. #3
    Join Date
    Mar 2008
    Posts
    26
    Plugin Contributions
    0

    Default Re: Multiple category Display on Homepage

    I tired the all_products_on_main mod but still facing problems.
    According to the test file i uploaded the following files to the specified folders.

    all_cats_all_products.php uploaded to includes/modules/
    tpl_modules_all_cats_all_products.php uploaded to includes/templates/template_default/templates/


    In includes/filenames.php, i entered the line
    PHP Code:
    define('FILENAME_ALL_CATS_ALL_PRODUCTS''all_cats_all_products.php'); 
    Last file to edit is tpl_index_default.php

    Code is as below.

    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 3464 2006-04-19 00:07:26Z ajeh $
     */
    ?>
    <div class="centerColumn" id="indexDefault">
    <h1 id="indexDefaultHeading"><?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 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
    	// We can set this in admin later panel later
    define('DISPLAY_ALL_CATS_PRODUCTS', 'true');
    if(DISPLAY_ALL_CATS_PRODUCTS == "true"){
    		require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_ALL_CATS_ALL_PRODUCTS));
    } // !EOF
    ?>
    
    <?php
      $show_display_category->MoveNext();
    } // !EOF
    
    /**
     * display All products - all cats
     */
    ?>
    
    
    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_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_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 } ?>
    
    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_UPCOMING') { ?>
    <?php
    /**
     * display the Upcoming Products Center Box
     */
    ?>
    <?php include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)); ?><?php } ?>
    
    
    <?php
      $show_display_category->MoveNext();
    } // !EOF
    ?>
    </div>
    Am i missing something?

  4. #4
    Join Date
    Aug 2006
    Location
    Singapore
    Posts
    167
    Plugin Contributions
    1

    Default Re: Multiple category Display on Homepage

    I checked yellow site but this mod no longer there, anyone has a copy of this? I really need this, thanks so much!

 

 

Similar Threads

  1. how to display products of one category on the homepage?
    By zz89059262 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 2 Sep 2011, 03:19 AM
  2. Multiple category display on home page
    By stevebrett in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 18 May 2011, 11:30 AM
  3. New Category & products do not display on homepage.
    By AvatarGamez in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 26 Aug 2010, 05:56 PM
  4. How do I display category images in the main content of the homepage?
    By buxton1 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 2 Jun 2009, 12:47 PM
  5. Help! How to Redirect Multiple URLs to Homepage URL?
    By Stenrique in forum General Questions
    Replies: 0
    Last Post: 11 Jul 2007, 05:04 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