If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / moving header text on individual item pages (works fine on their parent pages)

moving header text on individual item pages (works fine on their parent pages)

Started by irish_1985 on 19 Sep 2012, 6:03 PM · Views: 896

Results 1 to 9 of 9
19 Sep 2012, 6:03 PM
#1
irish_1985 avatar

irish_1985

New Zenner

Join Date:
Nov 2011
Posts:
72
Plugin Contributions:
0

Post #1 by irish_1985

hi all. i'm running v150 and my site/store is here: www.c u l tivatedreef.com (spaces to prevent search engines from indexing this thread)

i posted another thread that was *related *to this issue, and seemed to have worked through part of it, although i feel some of my previous posts may have been a bit misleading about what the exact issue was.

anyway, i was previously trying to get some text that appeared over a header/image to seamlessly move WITH the rest of the page's elements instead of staying still. i ended up working through the problem (the text now moves with the rest of the pages elements), but now i'm trying to move the text to a different part of the page. sounds simple enough right?

unfortunately there's some funny business going on with the code. here's the way i'd like the text to appear on all the individual item pages, which currently appears perfectly on the PARENT pages as seen in the screenshot below:

http://i589.photobucket.com/albums/ss336/ryanpatrickoconnor/screenshot-correct_zps8e16e963.jpg

here's the way it's looking on the individual item pages, for whatever reason:

http://i589.photobucket.com/albums/ss336/ryanpatrickoconnor/screenshot_zps14d2a8d8.jpg

i've played around with the stylesheet (specifically the area below) but can't seem to get it:

#categoryImgListing {height: 150px;}
#categoryImgListing p {display: block; position: absolute; width: 275px; height: 140px; top: 101px; color: #fff; left: 525px; height: 140px; border: none;}
#indexProductListCatDescription { margin: -200px 0 50px 200px; border: none; width: 290px; height: 140px; color: #fff; padding-top: 1em;}

i guess the main clue with this issue should be the fact that the text appears fine on the parent pages, but the issue is only taking place on the individual item pages? since that's the case, maybe there's something strange going on with a template/code that's controlling the individual item pages and not my main stylesheet?

i can post all of my codes if necessary. also, i am inheriting this work from someone else who use to control my site so please take it easy on me if certain things make absolutely no sense (as i have come to learn, some "code" was used with microsoft word :frusty:)

thanks!

19 Sep 2012, 6:23 PM
#2
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Post #2 by rstevenson

Well, let's start with the differences...

In the page that looks fine, your block of text is in the code like this...

<div class="centerColumn" id="indexProductList">


<div id="indexProductListCatDescription" class="content">Large Polyped Stony Corals are generally larger calcareous corals with large fleshy polyps. Most of the LPS corals produce long sweeper tentacles which they use to keep other corals a safe distance away.  Feeding these corals is common practice and most LPS appreciate mysis shrimp, brine shrimp, or other small bits of meaty foods.</div>

And in the page that doesn't display right, your block of text is in the code like this...

<div id="headBanner"><img height="36" width="1000" alt="Welcome" src="images/welcometogregs3.gif" />
</div>

 <div id="categoryImgListing" class="categoryImg"><img src="images/category headers/LPS_header.jpg" alt="" width="1000" height="150" />Large Polyped Stony Corals are generally larger calcareous corals with large fleshy polyps. Most of the LPS corals produce long sweeper tentacles which they use to keep other corals a safe distance away.  Feeding these corals is common practice and most LPS appreciate mysis shrimp, brine shrimp, or other small bits of meaty foods.</div>

I think it is not likely to display the same if it's not in the same place in the (as rendered HTML) code. :blink: So the question, is, why is it in a different place in the code in those two pages?

You want it in the header, right? So it has to be coded into the PHP file that is used to build the header. So where is the code that builds this part of the page instead of in the (PHP) header code? Since it displays differently on a category page than on a product page, I suspect it has been coded into the wrong PHP file, maybe more than one of them.

I'm not much of a PHP expert, but I would start by searching for those ID tags to see where they're being built.

Rob

PS
There are still some significant errors in the code which can't be helping. Check in a validator and try to track them down as you're working on this particular problem.

Breakfast: the most important donut of the day.

19 Sep 2012, 6:49 PM
#3
irish_1985 avatar

irish_1985

New Zenner

Join Date:
Nov 2011
Posts:
72
Plugin Contributions:
0

Post #3 by irish_1985

thanks rob. i'm still learning zencart in general, so that, coupled with the fact that i'm trying to dig into someone elses code is pretty overwhelming! thanks for bearing with me here.

i ran the developers tool to search for php-only files, and came up with the following on a search for the "indexProductList" ID:

  • www/includes/templates/template_default/templates/tpl_index_product_list.php
  • www/includes/templates/cultivatedfrags/templates/tpl_index_product_list.php

a search for the "indexProductListCatDescription" ID (php-only) brought up these files:

  • www/includes/templates/cultivatedfrags/templates/tpl_index_product_list.php
  • www/includes/templates/template_default/templates/tpl_index_product_list.php

a search for the "headBanner" ID (php-only) brought up this file:

  • www/includes/templates/cultivatedfrags/common/tpl_main_page.php

and finally a search for the "categoryImgListing" ID (php-only) brought up these files:

  • www/includes/templates/cultivatedfrags/common/tpl_main_page.php

  • www/includes/templates/template_default/templates/tpl_index_categories.php

  • www/includes/templates/template_default/templates/tpl_index_product_list.php

19 Sep 2012, 7:02 PM
#4
irish_1985 avatar

irish_1985

New Zenner

Join Date:
Nov 2011
Posts:
72
Plugin Contributions:
0

Post #4 by irish_1985

so that leaves these 4 php files:

    • www/includes/templates/cultivatedfrags/common/tpl_main_page.php
    • www/includes/templates/cultivatedfrags/templates/tpl_index_product_list.php
    • www/includes/templates/template_default/templates/tpl_index_product_list.php
    • www/includes/templates/template_default/templates/tpl_index_categories.php

as detailed below:

    • www/includes/templates/cultivatedfrags/common/tpl_main_page.php
<?php
/**
 * Common Template - tpl_main_page.php
 *
 * Governs the overall layout of an entire page<br />
 * Normally consisting of a header, left side column. center column. right side column and footer<br />
 * For customizing, this file can be copied to /templates/your_template_dir/pagename<br />
 * example: to override the privacy page<br />
 * - make a directory /templates/my_template/privacy<br />
 * - copy /templates/templates_defaults/common/tpl_main_page.php to /templates/my_template/privacy/tpl_main_page.php<br />
 * <br />
 * to override the global settings and turn off columns un-comment the lines below for the correct column to turn off<br />
 * to turn off the header and/or footer uncomment the lines below<br />
 * Note: header can be disabled in the tpl_header.php<br />
 * Note: footer can be disabled in the tpl_footer.php<br />
 * <br />
 * $flag_disable_header = true;<br />
 * $flag_disable_left = true;<br />
 * $flag_disable_right = true;<br />
 * $flag_disable_footer = true;<br />
 * <br />
 * // example to not display right column on main page when Always Show Categories is OFF<br />
 * <br />
 * if ($current_page_base == 'index' and $cPath == '') {<br />
 *  $flag_disable_right = true;<br />
 * }<br />
 * <br />
 * example to not display right column on main page when Always Show Categories is ON and set to categories_id 3<br />
 * <br />
 * if ($current_page_base == 'index' and $cPath == '' or $cPath == '3') {<br />
 *  $flag_disable_right = true;<br />
 * }<br />
 *
 * @package templateSystem
 * @copyright Copyright 2003-2007 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_main_page.php 7085 2007-09-22 04:56:31Z ajeh $
 */

// the following IF statement can be duplicated/modified as needed to set additional flags
  if (in_array($current_page_base,explode(",",'product_listing')) ) {
    $flag_disable_right = true;
  }
    if (in_array($current_page_base,explode(",",'checkout_payment,checkout_shipping')) ) {
    $flag_disable_left = true;
  }


  $header_template = 'tpl_header.php';
  $footer_template = 'tpl_footer.php';
  $left_column_file = 'column_left.php';
  $right_column_file = 'column_right.php';
  $body_id = ($this_is_home_page) ? 'indexHome' : str_replace('_', '', $_GET['main_page']);
?>
<body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>
<?php
  if (SHOW_BANNERS_GROUP_SET1 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET1)) {
    if ($banner->RecordCount() > 0) {
?>
<div id="bannerOne" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
    }
  }
?>

<div id="mainWrapper">
<?php
 /**
  * prepares and displays header output
  *
  */
  if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_HEADER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) {
    $flag_disable_header = true;
  }
  require($template->get_template_dir('tpl_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_header.php');?>

<table width="100%" border="0" cellspacing="0" cellpadding="0" id="contentMainWrapper">
  <tr>
<?php
if (COLUMN_LEFT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_LEFT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == ''))) {
  // global disable of column_left
  $flag_disable_left = true;
}
if (!isset($flag_disable_left) || !$flag_disable_left) {
?>
<?php
              if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2)) {
                if ($banner->RecordCount() > 0) {
?>
        <div id="bannerTwo" class="banners"><?php echo zen_display_banner('static', $banner);?></div>
        <?php
                }
              }
?>
<div id="headBanner"><img height="36" width="1000" alt="Welcome" src="images/welcometogregs3.gif" />
</div>
 <?php
if (PRODUCT_LIST_CATEGORIES_IMAGE_STATUS == '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, ''); echo zen_get_category_description(zen_get_products_category_id((int)$_GET['products_id']), (int)$_SESSION['languages_id']) ?></div>
<?php
  }
} // categories_image
?>
<!-- bof  breadcrumb -->
<?php if (DEFINE_BREADCRUMB_STATUS == '1' || (DEFINE_BREADCRUMB_STATUS == '2' && !$this_is_home_page) ) { ?>
    <div id="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div>
<?php } ?>
<!-- eof breadcrumb -->
 <td id="navColumnOne" class="columnLeft" style="width: <?php echo COLUMN_WIDTH_LEFT; ?>">

<?php
 /**
  * prepares and displays left column sideboxes
  *
  */
?>
<div id="navColumnOneWrapper" style="width: <?php echo BOX_WIDTH_LEFT; ?>"><?php require(DIR_WS_MODULES . zen_get_module_directory('column_left.php')); ?></div></td>
<?php
}
?>
    <td valign="top">


<?php
  if (SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) {
    if ($banner->RecordCount() > 0) {
?>
<div id="bannerThree" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
    }
  }
?>

<!-- bof upload alerts -->
<?php if ($messageStack->size('upload') > 0) echo $messageStack->output('upload'); ?>
<!-- eof upload alerts -->

<?php
 /**
  * prepares and displays center column
  *
  */
 require($body_code); ?>

<?php
  if (SHOW_BANNERS_GROUP_SET4 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET4)) {
    if ($banner->RecordCount() > 0) {
?>
<div id="bannerFour" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
    }
  }
?></td>

<?php
//if (COLUMN_RIGHT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_RIGHT_OFF == 'true' && $_SESSION['customers_authorization'] != 0)) {
if (COLUMN_RIGHT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_RIGHT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == ''))) {
  // global disable of column_right
  $flag_disable_right = true;
}
if (!isset($flag_disable_right) || !$flag_disable_right) {
?>
<td id="navColumnTwo" class="columnRight" style="width: <?php echo COLUMN_WIDTH_RIGHT; ?>">
<?php
 /**
  * prepares and displays right column sideboxes
  *
  */
?>
<div id="navColumnTwoWrapper" style="width: <?php echo BOX_WIDTH_RIGHT; ?>"><?php require(DIR_WS_MODULES . zen_get_module_directory('column_right.php')); ?></div></td>
<?php
}
?>
  </tr>
</table>

<?php
 /**
  * prepares and displays footer output
  *
  */
  if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_FOOTER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) {
    $flag_disable_footer = true;
  }
  require($template->get_template_dir('tpl_footer.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_footer.php');
?>

</div>
<!--bof- parse time display -->
<?php
  if (DISPLAY_PAGE_PARSE_TIME == 'true') {
?>
<div class="smallText center">Parse Time: <?php echo $parse_time; ?> - Number of Queries: <?php echo $db->queryCount(); ?> - Query Time: <?php echo $db->queryTime(); ?></div>
<?php
  }
?>
<!--eof- parse time display -->
<!--bof- banner #6 display -->
<?php
  if (SHOW_BANNERS_GROUP_SET6 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET6)) {
    if ($banner->RecordCount() > 0) {
?>
<div id="bannerSix" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
    }
  }
?>
<!--eof- banner #6 display --><br />
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
// Do nothing
} else {
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
}
?>

</body>
    • www/includes/templates/cultivatedfrags/templates/tpl_index_product_list.php
<?php
/**
 * Page Template
 *
 * Loaded by main_page=index<br />
 * Displays product-listing when a particular category/subcategory is selected for browsing
 *
 * @package templateSystem
 * @copyright Copyright 2003-2007 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_product_list.php 6009 2007-03-13 23:56:45Z ajeh $
 */
?>

<div class="centerColumn" id="indexProductList">


<?php
// categories_description
    if ($current_categories_description != '') {
?>
<div id="indexProductListCatDescription" class="content"><?php echo $current_categories_description;  ?></div>
<?php } // categories_description ?>

<?php
  $check_for_alpha = $listing_sql;
  $check_for_alpha = $db->Execute($check_for_alpha);

  if ($do_filter_list || ($check_for_alpha->RecordCount() > 0 && PRODUCT_LIST_ALPHA_SORTER == 'true')) {
  $form = zen_draw_form('filter', zen_href_link(FILENAME_DEFAULT), 'get') . '<label class="inputLabel">' .TEXT_SHOW . '</label>';
?>

<?php
  echo $form;
  echo zen_draw_hidden_field('main_page', FILENAME_DEFAULT);
  echo zen_hide_session_id();
?>
<?php
  // draw cPath if known
  if (!$getoption_set) {
    echo zen_draw_hidden_field('cPath', $cPath);
  } else {
    // draw manufacturers_id
    echo zen_draw_hidden_field($get_option_variable, $_GET[$get_option_variable]);
  }

  // draw typefilter
  if (isset($_GET['typefilter']) && $_GET['typefilter'] != '') echo zen_draw_hidden_field('typefilter', $_GET['typefilter']);

  // draw manufacturers_id if not already done earlier
  if ($get_option_variable != 'manufacturers_id' && isset($_GET['manufacturers_id']) && $_GET['manufacturers_id'] > 0) {
    echo zen_draw_hidden_field('manufacturers_id', $_GET['manufacturers_id']);
  }

  // draw sort
  echo zen_draw_hidden_field('sort', $_GET['sort']);

  // draw filter_id (ie: category/mfg depending on $options)
  if ($do_filter_list) {
    echo zen_draw_pull_down_menu('filter_id', $options, (isset($_GET['filter_id']) ? $_GET['filter_id'] : ''), 'onchange="this.form.submit()"');
  }

  // draw alpha sorter
  require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_PRODUCT_LISTING_ALPHA_SORTER));
?>
</form>
<?php
  }
?>
<br class="clearBoth" />

<?php
/**
 * require the code for listing products
 */
 require($template->get_template_dir('tpl_modules_product_listing.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_product_listing.php');
?>


<?php
//// bof: categories error
if ($error_categories==true) {
  // verify lost category and reset category
  $check_category = $db->Execute("select categories_id from " . TABLE_CATEGORIES . " where categories_id='" . $cPath . "'");
  if ($check_category->RecordCount() == 0) {
    $new_products_category_id = '0';
    $cPath= '';
  }
?>

<?php
$show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_MISSING);

while (!$show_display_category->EOF) {
?>

<?php
  if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MISSING_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_MISSING_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_MISSING_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_MISSING_UPCOMING') {
    include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS));
  }
?>
<?php
  $show_display_category->MoveNext();
} // !EOF
?>
<?php } //// eof: categories error ?>

<?php
//// bof: categories
$show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_LISTING_BELOW);
if ($error_categories == false and $show_display_category->RecordCount() > 0) {
?>

<?php
  $show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_LISTING_BELOW);
  while (!$show_display_category->EOF) {
?>

<?php
    if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_LISTING_BELOW_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_LISTING_BELOW_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_LISTING_BELOW_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_LISTING_BELOW_UPCOMING') {
      include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS));
    }
?>
<?php
  $show_display_category->MoveNext();
  } // !EOF
?>

<?php
} //// eof: categories
?>

</div>
    • www/includes/templates/template_default/templates/tpl_index_product_list.php
<?php

/**

 * Page Template

 *

 * Loaded by main_page=index<br />

 * Displays product-listing when a particular category/subcategory is selected for browsing

 *

 * @package templateSystem

 * @copyright Copyright 2003-2010 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_product_list.php 15589 2010-02-27 15:03:49Z ajeh $

 */

?>

<div class="centerColumn" id="indexProductList">



<h1 id="productListHeading"><?php echo $breadcrumb->last(); ?></h1>



<?php

if (PRODUCT_LIST_CATEGORIES_IMAGE_STATUS == '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, '', CATEGORY_ICON_IMAGE_WIDTH, CATEGORY_ICON_IMAGE_HEIGHT); ?></div>

<?php

  }

} // categories_image

?>



<?php

// categories_description

    if ($current_categories_description != '') {

?>

<div id="indexProductListCatDescription" class="content"><?php echo $current_categories_description;  ?></div>

<?php } // categories_description ?>



<?php

  $check_for_alpha = $listing_sql;

  $check_for_alpha = $db->Execute($check_for_alpha);



  if ($do_filter_list || ($check_for_alpha->RecordCount() > 0 && PRODUCT_LIST_ALPHA_SORTER == 'true')) {

  $form = zen_draw_form('filter', zen_href_link(FILENAME_DEFAULT), 'get') . '<label class="inputLabel">' .TEXT_SHOW . '</label>';

?>



<?php

  echo $form;

  echo zen_draw_hidden_field('main_page', FILENAME_DEFAULT);

  echo zen_hide_session_id();

?>

<?php

  // draw cPath if known

  if (!$getoption_set) {

    echo zen_draw_hidden_field('cPath', $cPath);

  } else {

    // draw manufacturers_id

    echo zen_draw_hidden_field($get_option_variable, $_GET[$get_option_variable]);

  }



  // draw music_genre_id

  if (isset($_GET['music_genre_id']) && $_GET['music_genre_id'] != '') echo zen_draw_hidden_field('music_genre_id', $_GET['music_genre_id']);



  // draw record_company_id

  if (isset($_GET['record_company_id']) && $_GET['record_company_id'] != '') echo zen_draw_hidden_field('record_company_id', $_GET['record_company_id']);



  // draw typefilter

  if (isset($_GET['typefilter']) && $_GET['typefilter'] != '') echo zen_draw_hidden_field('typefilter', $_GET['typefilter']);



  // draw manufacturers_id if not already done earlier

  if ($get_option_variable != 'manufacturers_id' && isset($_GET['manufacturers_id']) && $_GET['manufacturers_id'] > 0) {

    echo zen_draw_hidden_field('manufacturers_id', $_GET['manufacturers_id']);

  }



  // draw sort

  echo zen_draw_hidden_field('sort', $_GET['sort']);



  // draw filter_id (ie: category/mfg depending on $options)

  if ($do_filter_list) {

    echo zen_draw_pull_down_menu('filter_id', $options, (isset($_GET['filter_id']) ? $_GET['filter_id'] : ''), 'onchange="this.form.submit()"');

  }



  // draw alpha sorter

  require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_PRODUCT_LISTING_ALPHA_SORTER));

?>

</form>

<?php

  }

?>

<br class="clearBoth" />



<?php

/**

 * require the code for listing products

 */

 require($template->get_template_dir('tpl_modules_product_listing.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_product_listing.php');

?>





<?php

//// bof: categories error

if ($error_categories==true) {

  // verify lost category and reset category

  $check_category = $db->Execute("select categories_id from " . TABLE_CATEGORIES . " where categories_id='" . $cPath . "'");

  if ($check_category->RecordCount() == 0) {

    $new_products_category_id = '0';

    $cPath= '';

  }

?>



<?php

$show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_MISSING);



while (!$show_display_category->EOF) {

?>



<?php

  if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MISSING_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_MISSING_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_MISSING_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_MISSING_UPCOMING') {

    include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS));

  }

?>

<?php

  $show_display_category->MoveNext();

} // !EOF

?>

<?php } //// eof: categories error ?>



<?php

//// bof: categories

$show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_LISTING_BELOW);

if ($error_categories == false and $show_display_category->RecordCount() > 0) {

?>



<?php

  $show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_LISTING_BELOW);

  while (!$show_display_category->EOF) {

?>



<?php

    if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_LISTING_BELOW_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_LISTING_BELOW_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_LISTING_BELOW_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_LISTING_BELOW_UPCOMING') {

      include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS));

    }

?>

<?php

  $show_display_category->MoveNext();

  } // !EOF

?>



<?php

} //// eof: categories

?>



</div>
19 Sep 2012, 7:03 PM
#5
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Post #5 by rstevenson

That's good. It looks like whoever did this used the override system. That is, they made their customizations in files which were then saved into your template's override folders. So have a look at just the folders named (or which are in folders named) "cultivatedfrags". Wherever there is the same file in your override folder as there is in the template_default folder, the override file will be used, so you can ignore the ones in template_default.

You can see that both the tpl_index_product_list.php file and the tpl_index_categories.php file may be involved -- or maybe the tpl_main_page.php. I suspect that's why you're getting a different result in those two sample pages. Either the code that creates your text block is different in one of them, or it's in a different place in one of them -- probably the latter. So try to find that text block code in those files and see what's different. Note that you won't find the text itself, since the text is being pulled from the database. You'll need to find the chunk of code that is pulling that text.

[ I was writing while you were, so skip down here to see what I said, then back up. ]

Rob

Breakfast: the most important donut of the day.

19 Sep 2012, 7:03 PM
#6
irish_1985 avatar

irish_1985

New Zenner

Join Date:
Nov 2011
Posts:
72
Plugin Contributions:
0

Post #6 by irish_1985

and #4 (too long to put in previous post due to board's character limit)

    • www/includes/templates/template_default/templates/tpl_index_categories.php
<?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 != '') {

?>

<div id="categoryDescription" class="catDescContent"><?php echo $current_categories_description;  ?></div>

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

<?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>
19 Sep 2012, 7:09 PM
#7
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Post #7 by rstevenson

What I would do as a starting point is compare each of those working files to a clean unmodified version of each file to see what was customized. Then compare the customized bits to see how they differ. If you don't have it, download the ZC install files for the version you have.

Rob

Breakfast: the most important donut of the day.

20 Sep 2012, 2:21 AM
#8
irish_1985 avatar

irish_1985

New Zenner

Join Date:
Nov 2011
Posts:
72
Plugin Contributions:
0

Post #8 by irish_1985

thanks rob, i'm slowly making progress. i've discovered that the tpl_main_page.php controls the product pages and that the tpl_index_product_list.php controls the category/parent pages. so of course, i'm trying to take the text/code from the category pages since it's the one that displays correct, this part here:

<div id="categoryImgListing" class="categoryImg"><?php echo zen_image(DIR_WS_IMAGES . $categories_image, '', SUBCATEGORY_IMAGE_TOP_WIDTH, SUBCATEGORY_IMAGE_TOP_HEIGHT); ?></div>

as opposed to this part of the product pages which is out of whack:

<div id="categoryImgListing" class="categoryImg"><?php echo zen_image(DIR_WS_IMAGES . $categories_image, ''); echo zen_get_category_description(zen_get_products_category_id((int)$_GET['products_id']), (int)$_SESSION['languages_id']) ?></div>

unfortunately it's not as simple as swapping the good one in place of the bad one, so i'm taking your advice and putting the good code into different spots of the other file.. no luck yet, but at least knowing what i'm looking at (for the most part) is a big step forward... i was almost ready to compress the text onto the header images and call it good :blush:

21 Sep 2012, 6:44 PM
#9
irish_1985 avatar

irish_1985

New Zenner

Join Date:
Nov 2011
Posts:
72
Plugin Contributions:
0

Post #9 by irish_1985

still stuck on this one. going to move forward and tackle other issues to give my brain a mental rest from this particular issue