Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / move index defined pages now it shows double

move index defined pages now it shows double

Locked

Views: 1,476

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
20 May 2007, 2:17 PM
#1
bjraines avatar

bjraines

Zen Follower

Join Date:
Jun 2006
Posts:
223
Plugin Contributions:
0

move index defined pages now it shows double

I want to set up my index page so that it has featured products and then the defined main page text. However when I move the php snippet , the text for the main page defined page doubles. It will repeat itself below the featured products.

you can see what I am talking about here

http://www.allaboutyoumonograms.com

here is my code:

<?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 } ?>

<div id="indexDefaultMainContent" class="content"><?php require($define_page); ?></div>

<?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_SPECIALS_PRODUCTS') { ?>
<?php
/**
 * display the Special Products Center Box
 */
?>
20 May 2007, 2:28 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: move index defined pages now it shows double

Check if you have your text to be displayed inside or outside of the WHILE loop ...

If inside the WHILE loop it will be displayed each time you pass through the loop ...

You only want it after the Featured products and then not to display again ...

You said this:

<?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 } ?>

<div id="indexDefaultMainContent" class="content"><?php require($define_page); ?></div>

That is inside the WHILE loop but outside the Featured Product tigger ...

Try this:

<?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'); ?>
?>
<div id="indexDefaultMainContent" class="content"><?php require($define_page); ?></div>
<?php
<?php } ?>
20 May 2007, 10:04 PM
#3
bjraines avatar

bjraines

Zen Follower

Join Date:
Jun 2006
Posts:
223
Plugin Contributions:
0

Re: move index defined pages now it shows double

I gave that a try and still showing double the text.

Ideally i want to have text between featured and new products.....

20 May 2007, 10:07 PM
#4
bjraines avatar

bjraines

Zen Follower

Join Date:
Jun 2006
Posts:
223
Plugin Contributions:
0

Re: move index defined pages now it shows double

my bad it works now

THANKS!