Hi,
I am looking to change the order in which
define_main_page appears on the home page. I want Featured Products to display before define_main_page.
Is there an admin setting for this?
Thanks
Hi,
I am looking to change the order in which
define_main_page appears on the home page. I want Featured Products to display before define_main_page.
Is there an admin setting for this?
Thanks
Are you referring to the Sideboxes?
If yes, Sidebox order of Listing are controlled using:
Admin > Tools > Layout Boxes Controller
Order shown is controlled numerically; lower numbers show before higher numbers.. Doing some Trial & Error will allow you adjust the way you want. You can also use the FAQ link (top of every Forum page) to research further.
Hi Rob,
Thanks for the reply.
No. I have a single column layout. totally customized. I have already set all the sort orders for Feature, Specials and Expected Products. But I don't see an admin setting to position define_main_page.
Anyway, I've been searching but can't seem to come up with an answer. I looked at the PHP and I suppose I could change that. But I am just double checking for an admin override which would be easier to reset by someone else if needed.
Thanks
If you are using Sideboxes then you would have to use at least, a 2 column layout - yes?
The Layout Boxes Controller uses the same wording as the Sideboxes. So Sideboxes called 'information / more information' has your 'define_pages' links, on the Web pages and in the Layout Controller.
If I'm still missing your point then an image would be most helpful.
Not an admin setting but you can reorder the components in a copy of this file saved in your template structure:I am looking to change the order in which
define_main_page appears on the home page. I want Featured Products to display before define_main_page.
Is there an admin setting for this?
/includes/templates/template_default/templates/tpl_index_default.php file
Zen-Venom Get Bitten
No, this is a single column page that I am developing. Left and right columns are turned off completely. Most of that I did via Admin. What I couldn't do via admin is make the featured products appear before the contents of define_main pages.
Sorry I don't have a url. But assuming it works well I will show it off once it's live.
Thanks!
So I tried this, and I am not getting the results I want.. I am about to pull my hair out.. Does anyone have any idea what I might have done wrong??
http://clients.overthehillweb.com/ph.../phflauntshop/
I want the Main Page define to appear below the products on the main page..
Code:?> <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 $show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_MAIN); while (!$show_display_category->EOF) { ?> <?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 ($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>
Turns out that the file I needed to edit was: includes/templates/template_default/templates/tpl_index_categories.php file.. (You need to modify and place this file in your includes/templates/MY TEMPLATE/templates folder)
Now my main page define appears below the product categories on the main page..
Last edited by DivaVocals; 5 May 2008 at 01:04 PM.
I have the same query as the original post—I want to move my featured products above the main welcome text on the front page. However, when I edit my (overridden) copy of the tpl_index_default.php to re-order the content, the featured products simply disappear rather than appearing in the new location. Any suggestions? Edited tpl_index_default.php below. (Note I am using Zen Cart 1.3.7.1 and don't have any desire to upgrade if that can be at all avoided.)
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 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 } ?>
<?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 (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_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>