Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2010
    Location
    Thailand
    Posts
    300
    Plugin Contributions
    2

    Default New products on home page - where's the php code inside tpl_header?

    I'd like to display our new products on the home page. However, the tpl_header page is from a modified template, so I can't just get them to show via the admin>config>index listings. I've been looking inside tpl_header code but am not sure ... could someone have the kindness to let me know what's the code, from the tpl_header (template_default) that shows the new products on the home page?

  2. #2
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default Re: New products on home page - where's the php code inside tpl_header?

    tpl_header controls the header. What exactly are you trying to do? New products should automatically display on the home page.
    Mary Ellen
    I came; I saw; I Zenned
    Taking over the world... one website at a time
    Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

    Holzheimer
    Fan Odyssey

  3. #3
    Join Date
    Dec 2010
    Location
    Thailand
    Posts
    300
    Plugin Contributions
    2

    Default Re: New products on home page - where's the php code inside tpl_header?

    Show New Products on Main Page is set to 1 in the admin but the new products do not display on the home page. Here's the site ezistock dot com

  4. #4
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: New products on home page - where's the php code inside tpl_header?

    Try
    /includes/templates/nameofyourtemplate/templates/tpl_index_default.php

  5. #5
    Join Date
    Dec 2010
    Location
    Thailand
    Posts
    300
    Plugin Contributions
    2

    Default Re: New products on home page - where's the php code inside tpl_header?

    thanks Misty! I was actually just looking at it as well as tpl_index_categories.

    The only difference from the 2 original templates is the code in red:

    Code:
    <?php?>
    <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 if (!$this_is_home_page) { ?>
    
    
    <?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
     */
    ?>
    <?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
    ?>
    
    <?php } ?>
    
    </div>

    Removing do the trick, but would it be safe to remove it permanently?
    Last edited by Thannaree; 9 Jun 2011 at 08:38 AM.

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

    Default Re: New products on home page - where's the php code inside tpl_header?

    Yes, it would be safe to remove the red code. Just be sure to remove both parts so you don't have an extra }.

  7. #7
    Join Date
    Dec 2010
    Location
    Thailand
    Posts
    300
    Plugin Contributions
    2

    Default Re: New products on home page - where's the php code inside tpl_header?

    Quote Originally Posted by gjh42 View Post
    Yes, it would be safe to remove the red code. Just be sure to remove both parts so you don't have an extra }.
    Thanks!

 

 

Similar Threads

  1. PHP code inside of an EZ page
    By tcarden in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 Dec 2012, 05:19 PM
  2. Where is the tpl_header.php for non-English?
    By mdivk in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 6 Dec 2011, 08:12 PM
  3. Home page disappeared after editting tpl_header.php, please help
    By newproduct4you in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 10 Apr 2010, 02:13 AM
  4. Inserting Code into tpl_header.php
    By drymetal in forum Templates, Stylesheets, Page Layout
    Replies: 37
    Last Post: 21 Jan 2010, 10:07 AM
  5. Modifying tpl_header.php with new link to pass cust_id to new page
    By customgt in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 25 Jun 2008, 03:26 PM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR