Page 3 of 3 FirstFirst 123
Results 21 to 25 of 25
  1. #21
    Join Date
    Oct 2008
    Posts
    111
    Plugin Contributions
    0

    Default Re: Adding another text section to homepage

    Thanks Doug

    looks the perfect solution. I've followed all the instructions and get this on homepage

    http://trulyethical.com

    I'm no expert can you help?

    Thanks

    matt

  2. #22
    Join Date
    Jan 2008
    Location
    Portland, Oregon USA
    Posts
    356
    Plugin Contributions
    0

    Default Re: Adding another text section to homepage

    @Matt

    I wish I was an expert...

    Attached is a zip of the files in the correct directory structure that added an editable area to the bottom of my site. Remember to change the name of custom_template to whatever template you're using so the over-ride goes into the correct directory.

    PS - the actual define_main_page_lower file in my attachment has my site content in it.

    Good luck.
    Attached Files Attached Files
    Doug

  3. #23
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    978
    Plugin Contributions
    6

    Default Re: Adding another text section to homepage

    This worked for me, (although I am now wanting to do something more)

    http://www.zen-cart.com/forum/showthread.php?t=133568

    Note location of // NICCOL START & END in includes\templates\your_template\templates\tpl_index_categories.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 >= 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
    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_WIDTH, SUBCATEGORY_IMAGE_TOP_HEIGHT); ?></div> -->
    <?php
      }
    } // categories_image
    ?>
    
    <?php
    // categories_description
        if ($current_categories_description != '') {
    ?>
    
    <!--NICCOL START-->
    
    <?php $all_the_description = $current_categories_description;  ?>
    
    <?php
    $xxx_pos = strpos($all_the_description,'###');
    
    if($xxx_pos === false) {
    	$description_top = $all_the_description;
    }
    else {
    	$description_top = substr($all_the_description,0,$xxx_pos);
    	$bottom_length = strlen($all_the_description)-$xxx_pos-3;
    	$xxx_pos = $xxx_pos + 3;
    	$description_bottom = substr($all_the_description,$xxx_pos,$bottom_length);
    }
    ?>
    
    <div id="categoryDescription" class="catDescContent"><?php echo $description_top;  ?></div>
    
    <!--NICCOL END-->
    
    <?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 -->
    
    <!--NICCOL START-->
    
    <div id="categoryDescription_bottom" class="catDescContent"><?php echo $description_bottom;  ?></div>
    
    <!--NICCOL END-->
    
    <?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>
    The text can then be edited via Admin > Tools > Define Page Editor > define_main_page. (IIRC)

    Hope this helps.
    Last edited by dw08gm; 26 Oct 2009 at 06:21 PM.

  4. #24
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    978
    Plugin Contributions
    6

    Default Re: Adding another text section to homepage

    Oh and for the bottom text

    <div id="categoryDescription_bottom" class="catDescContent">

    in stylesheeet.css, I did this

    #categoryDescription_bottom {
    width:100%;
    margin:0em 0em 0em 0em;
    padding:1em 0em 0em 0em;
    color:#000;
    }

    .catDescContent {
    }

  5. #25
    Join Date
    Mar 2009
    Posts
    1
    Plugin Contributions
    0

    Default Re: Adding another text section to homepage

    I am new to zencart. I would like to add text to the homepage after category images as well. I added your code (thanks), but I get the following error:

    1146 Table 'bestorg_zencart.ezpages' doesn't exist in:[SELECT pages_html_text FROM ezpages WHERE pages_title='SEO']

    Do you have any idea why?

    Thank you for your help

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Copying a Section (category) of my Store to Another Site
    By shags38 in forum General Questions
    Replies: 2
    Last Post: 29 Feb 2012, 06:38 AM
  2. Adding text to homepage
    By gamenet in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 11 Oct 2010, 08:07 AM
  3. New Products for (Month) section on homepage
    By zidain in forum General Questions
    Replies: 5
    Last Post: 27 Dec 2009, 07:13 PM
  4. Adding text to homepage listing of products
    By webmiss in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 1 Nov 2008, 04:55 PM
  5. adding new section on homepage -
    By keylesslocks in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 25 Jan 2008, 06:46 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