1. <?php/*
  2. *
  3. * Page Template
  4. *
  5. * Loaded by main_page=index<br />
  6. * Displays product-listing when a particular category/subcategory is selected for browsing
  7. *
  8. * @package templateSystem
  9. * @copyright Copyright 2003-2007 Zen Cart Development Team
  10. * @copyright Portions Copyright 2003 osCommerce
  11. * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
  12. * @version $Id: tpl_index_product_list.php 6009 2007-03-13 23:56:45Z ajeh $
  13. */?>
  14.  
  15. <div class="centerColumn" id="indexProductList">
  16. <h1 id="productListHeading">
  17. <?php echo $breadcrumb->last(); ?></h1>
  18. <?phpif (PRODUCT_LIST_CATEGORIES_IMAGE_STATUS == 'true') {// categories_image if ($categories_image =
  19.  
  20. zen_get_categories_image($current_category_id)) {?>
  21.  
  22. <div id="categoryImgListing" class="categoryImg">
  23. <?php echo zen_image(DIR_WS_IMAGES . $categories_image, '', CATEGORY_ICON_IMAGE_WIDTH, CATEGORY_ICON_IMAGE_HEIGHT); ?>
  24. </div>
  25. <?php }} // categories_image?>
  26. <?php// categories_description if ($current_categories_description != '') {?>
  27.  
  28. <div id="indexProductListCatDescription" class="content">
  29. <?php echo $current_categories_description; ?>
  30. </div>
  31. <?php } // categories_description ?>
  32. <?php $check_for_alpha = $listing_sql; $check_for_alpha = $db->Execute($check_for_alpha); if ($do_filter_list ||
  33.  
  34. ($check_for_alpha->RecordCount() > 0 && PRODUCT_LIST_ALPHA_SORTER == 'true')) { $form = zen_draw_form('filter',
  35.  
  36. zen_href_link(FILENAME_DEFAULT), 'get') . '<label class="inputLabel">' .TEXT_SHOW . '</label>';?>
  37. <?php echo $form; echo zen_draw_hidden_field('main_page', FILENAME_DEFAULT); echo zen_hide_session_id();?>
  38. <?php // draw cPath if known if (!$getoption_set) { echo zen_draw_hidden_field('cPath', $cPath); } else { // draw
  39.  
  40. manufacturers_id echo zen_draw_hidden_field($get_option_variable, $_GET[$get_option_variable]); } // draw typefilter
  41.  
  42. if (isset($_GET['typefilter']) && $_GET['typefilter'] != '') echo zen_draw_hidden_field('typefilter', $_GET
  43.  
  44. ['typefilter']); // draw manufacturers_id if not already done earlier if ($get_option_variable != 'manufacturers_id' &&
  45.  
  46. isset($_GET['manufacturers_id']) && $_GET['manufacturers_id'] > 0) { echo zen_draw_hidden_field('manufacturers_id',
  47.  
  48. $_GET['manufacturers_id']); } // draw sort echo zen_draw_hidden_field('sort', $_GET['sort']); // draw filter_id (ie:
  49.  
  50. category/mfg depending on $options) if ($do_filter_list) { echo zen_draw_pull_down_menu('filter_id', $options, (isset
  51.  
  52. ($_GET['filter_id']) ? $_GET['filter_id'] : ''), 'onchange="this.form.submit()"'); } // draw alpha sorter require
  53.  
  54. (DIR_WS_MODULES . zen_get_module_directory(FILENAME_PRODUCT_LISTING_ALPHA_SORTER));?></form>
  55. <?php }?>
  56. <br class="clearBoth" />
  57. <?php/*
  58. *
  59. * require the code for listing products
  60. */ require($template->get_template_dir('tpl_modules_product_listing.php', DIR_WS_TEMPLATE,
  61.  
  62. $current_page_base,'templates'). '/' . 'tpl_modules_product_listing.php');?>
  63.  
  64. <?php//// bof: categories errorif ($error_categories==true) { // verify lost category and reset category $check_category
  65.  
  66. = $db->Execute("select categories_id from " . TABLE_CATEGORIES . " where categories_id='" . $cPath . "'"); if
  67.  
  68. ($check_category->RecordCount() == 0) { $new_products_category_id = '0'; $cPath= ''; }?>
  69. <?php$show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_MISSING);while (!$show_display_category->EOF) {?>
  70. <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MISSING_FEATURED_PRODUCTS') { ?>
  71.  
  72. <?php/*
  73. *
  74. * display the Featured Products Center Box
  75. */?>
  76.  
  77. <?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE,
  78.  
  79. $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?><?php } ?>
  80.  
  81. <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MISSING_SPECIALS_PRODUCTS') { ?>
  82.  
  83. <?php/*
  84. *
  85. * display the Special Products Center Box
  86. */?>
  87.  
  88. <?php require($template->get_template_dir('tpl_modules_specials_default.php',DIR_WS_TEMPLATE,
  89.  
  90. $current_page_base,'templates'). '/tpl_modules_specials_default.php'); ?>
  91.  
  92. <?php } ?><?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MISSING_NEW_PRODUCTS') { ?>
  93.  
  94. <?php/*
  95. *
  96. * display the New Products Center Box
  97. */?>
  98.  
  99. <?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'templates').
  100.  
  101. '/tpl_modules_whats_new.php'); ?><?php } ?>
  102. <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MISSING_UPCOMING') { include
  103.  
  104. (DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)); }?>
  105. <?php $show_display_category->MoveNext();} // !EOF?><?php } //// eof: categories error ?>
  106. <?php//// bof: categories$show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_LISTING_BELOW);if ($error_categories
  107.  
  108. == false and $show_display_category->RecordCount() > 0) {?>
  109. <?php $show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_LISTING_BELOW); while (!$show_display_category->EOF)
  110.  
  111. {?><?php if ($show_display_category->fields['configuration_key'] ==
  112.  
  113. 'SHOW_PRODUCT_INFO_LISTING_BELOW_FEATURED_PRODUCTS') { ?>
  114.  
  115. <?php/*
  116. *
  117. * display the Featured Products Center Box
  118. */?>
  119.  
  120. <?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE,
  121.  
  122. $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
  123. <?php } ?><?php if ($show_display_category->fields['configuration_key'] ==
  124.  
  125. 'SHOW_PRODUCT_INFO_LISTING_BELOW_SPECIALS_PRODUCTS') { ?>
  126.  
  127. <?php/*
  128. *
  129. * display the Special Products Center Box
  130. */?>
  131.  
  132. <?php require($template->get_template_dir('tpl_modules_specials_default.php',DIR_WS_TEMPLATE,
  133.  
  134. $current_page_base,'templates'). '/tpl_modules_specials_default.php'); ?>
  135. <?php } ?><?php if ($show_display_category->fields['configuration_key'] ==
  136.  
  137. 'SHOW_PRODUCT_INFO_LISTING_BELOW_NEW_PRODUCTS') { ?>
  138.  
  139. <?php/*
  140. *
  141. * display the New Products Center Box
  142. */?>
  143.  
  144. <?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'templates').
  145.  
  146. '/tpl_modules_whats_new.php'); ?><?php } ?>
  147. <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_LISTING_BELOW_UPCOMING') {
  148.  
  149. include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)); }?><?php $show_display_category-
  150.  
  151. >MoveNext(); } // !EOF?><?php} //// eof: categories?>
  152. </div>