0) { $category_depth = 'products'; // display products } else { $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'"); $category_parent = tep_db_fetch_array($category_parent_query); if ($category_parent['total'] > 0) { $category_depth = 'nested'; // navigate through the categories } else { $category_depth = 'products'; // category has no products, but display the 'no products' message } } } // EOF stylesheet query // Tracking Newsletter - Baphira -- index if(isset($HTTP_GET_VARS['tracking_newsletter']) && $HTTP_GET_VARS['tracking_newsletter'] != ""){ $query_check_tracking = tep_db_query("SELECT * FROM tracking_newsletter WHERE customers_id = '".$HTTP_GET_VARS['tracking_newsletter']."'"); $check_tracking = tep_db_fetch_array($query_check_tracking); if(isset($HTTP_GET_VARS['annif']) && $HTTP_GET_VARS['annif'] == "1"){ $annif = "1"; }else{ $annif = "0"; } // insertion / màj if($check_tracking['customers_id'] != ""){ tep_db_query("UPDATE tracking_newsletter SET products_id = '0', index_ref = '1', annif_ref = '".$annif."', date = now(), order_id = '0', newsletter_id = '".$HTTP_GET_VARS['newsletter_id']."' WHERE customers_id = '".$HTTP_GET_VARS['tracking_newsletter']."'"); }else{ tep_db_query("INSERT INTO tracking_newsletter VALUES ('".$HTTP_GET_VARS['tracking_newsletter']."', '0', '1', '".$annif."', now(), '0', '".$HTTP_GET_VARS['newsletter_id']."')"); } } // eof Tracking Newsletter -- index require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT); ?> > <?php echo TITLE; ?> "; } ?>

' . "\n"; echo ' ' . "\n"; } } // needed for the new products module shown below $new_products_category_id = $current_category_id; ?>
'. '
'. ''. ''. ''. '
'.$categories['categories_name'].'
' . tep_image(DIR_WS_IMAGES_HOME. $product['products_image'], $categories['categories_name'],110 ,145 ) . '
'.$categories['categories_listing_text'].'
'; if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) { echo '
PRODUCT_LIST_MODEL, 'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME, 'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER, 'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE, 'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY, 'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT, 'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE, //bof column product listing with attributes 'PRODUCT_LIST_MULTIPLE' => PRODUCT_LIST_MULTIPLE, 'PRODUCT_LIST_BUY_NOW_MULTIPLE' => PRODUCT_LIST_BUY_NOW_MULTIPLE, //eof column product listing with attributes 'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW); asort($define_list); $column_list = array(); reset($define_list); while (list($key, $value) = each($define_list)) { if ($value > 0) $column_list[] = $key; } $select_column_list = ''; for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { if ( ($column_list[$col] == 'PRODUCT_LIST_BUY_NOW') || ($column_list[$col] == 'PRODUCT_LIST_PRICE') ) { continue; } switch ($column_list[$i]) { case 'PRODUCT_LIST_MODEL': $select_column_list .= 'p.products_model, '; break; case 'PRODUCT_LIST_NAME': $select_column_list .= 'pd.products_name, '; break; case 'PRODUCT_LIST_MANUFACTURER': $select_column_list .= 'm.manufacturers_name, '; break; case 'PRODUCT_LIST_QUANTITY': $select_column_list .= 'p.products_quantity, '; break; case 'PRODUCT_LIST_IMAGE': $select_column_list .= 'p.products_image, '; break; case 'PRODUCT_LIST_WEIGHT': $select_column_list .= 'p.products_weight, '; break; } } // baphira order update if(isset($HTTP_GET_VARS['newest'])){ if($HTTP_GET_VARS['newest'] == "1"){ $order_by_plus = " order by p.products_last_modified desc"; }else{ $order_by_plus = " order by p.products_last_modified asc"; } }else{ $order_by_plus = ""; } if(isset($HTTP_POST_VARS['price_sort'])){ $max = $HTTP_POST_VARS['max_val']; $min = $HTTP_POST_VARS['min_val']; $middle = ($max - $min)/3; if($HTTP_POST_VARS['price_sort'] == "1"){ $where_plus = " and products_price >= '" . $min . "' and products_price <= '" . ($min+$middle) . "'"; }elseif($HTTP_POST_VARS['price_sort'] == "2"){ $where_plus = " and products_price >= '" . ($min+$middle) . "' and products_price <= '" . ($min+$middle+$middle) . "'"; }elseif($HTTP_POST_VARS['price_sort'] == "3"){ $where_plus = " and products_price >= '" . ($min+$middle+$middle) . "' and products_price <= '" . ($max) . "'"; }else{ $where_plus = ""; } }else{ $where_plus = ""; } // eof baphira // show the products of a specified manufacturer if (isset($HTTP_GET_VARS['manufacturers_id'])) { if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only a specific category // #################### Added Flash Selling ################### $product_specials_query0 = tep_db_query("select status, status_flash_selling, flash_selling_end_date from " . TABLE_SPECIALS . " where status = '1' or status_flash_selling = '1' "); if (tep_db_num_rows ($product_specials_query0)) { $product_specials0 = tep_db_fetch_array($product_specials_query0); if (($product_specials0['status'] == '0') || ($product_specials0['status'] == '1') && ($product_specials0['status_flash_selling'] == '1') ) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id,m.manufacturers_name, p.products_price, p.products_tax_class_id, IF(s.status_flash_selling, s.specials_new_products_price, NULL) as specials_new_products_price, pd.products_description, products_subimage1 from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'" . $where_plus . $order_by_plus; }else{ $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id,m.manufacturers_name, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, pd.products_description, products_subimage1 from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'" . $where_plus. $order_by_plus; } }else{ $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id,m.manufacturers_name, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, pd.products_description from, products_subimage1 " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'" . $where_plus. $order_by_plus; } // #################### End Added Flash Selling ################### } else { // We show them all // #################### Added Flash Selling ################### $product_specials_query0 = tep_db_query("select status, status_flash_selling, flash_selling_end_date from " . TABLE_SPECIALS . " where status = '1' or status_flash_selling = '1' "); if (tep_db_num_rows ($product_specials_query0)) { $product_specials0 = tep_db_fetch_array($product_specials_query0); if (($product_specials0['status'] == '0') || ($product_specials0['status'] == '1') && ($product_specials0['status_flash_selling'] == '1') ) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id,m.manufacturers_name, p.products_price, p.products_tax_class_id, IF(s.status_flash_selling, s.specials_price_flash_selling, NULL) as specials_price_flash_selling, pd.products_description, products_subimage1 from " . TABLE_PRODUCTS . " pleft join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'" . $where_plus. $order_by_plus; }else{ $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id,m.manufacturers_name, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, pd.products_description, products_subimage1 from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'" . $where_plus. $order_by_plus; } }else{ $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id,m.manufacturers_name, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, pd.products_description, products_subimage1 from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'" . $where_plus. $order_by_plus; } // #################### End Added Flash Selling ################### } } else { // show the products in a given categorie if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) { // We are asked to show only specific catgeory // #################### Added Flash Selling ################### $product_specials_query0 = tep_db_query("select status, status_flash_selling, flash_selling_end_date from " . TABLE_SPECIALS . " where status = '1' or status_flash_selling = '1' "); if (tep_db_num_rows ($product_specials_query0)) { $product_specials0 = tep_db_fetch_array($product_specials_query0); if (($product_specials0['status'] == '0') || ($product_specials0['status'] == '1') && ($product_specials0['status_flash_selling'] == '1') ) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id,m.manufacturers_name, p.products_price, p.products_tax_class_id, IF(s.status_flash_selling, s.specials_price_flash_selling, NULL) as specials_price_flash_selling, IF(s.status_flash_selling, s.specials_price_flash_selling, NULL) as final_price, pd.products_description, products_subimage1 from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m , " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'" . $where_plus . $order_by_plus; } else { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id,m.manufacturers_name, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, pd.products_description, products_subimage1 from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'" . $where_plus . $order_by_plus; } } else { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id,m.manufacturers_name, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, pd.products_description, products_subimage1 from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'" . $where_plus. $order_by_plus; } // #################### End Added Flash Selling ################### } else { // We show them all // #################### Added Flash Selling ################### $product_specials_query0 = tep_db_query("select status, status_flash_selling, flash_selling_end_date from " . TABLE_SPECIALS . " where status = '1' or status_flash_selling = '1' "); if (tep_db_num_rows ($product_specials_query0)) { $product_specials0 = tep_db_fetch_array($product_specials_query0); if (($product_specials0['status'] == '0') || ($product_specials0['status'] == '1') && ($product_specials0['status_flash_selling'] == '1') ) { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id,m.manufacturers_name, p.products_price, p.products_tax_class_id, IF(s.status_flash_selling, s.specials_price_flash_selling, NULL) as specials_price_flash_selling, pd.products_description, products_subimage1 from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'" . $where_plus. $order_by_plus; } else { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id,m.manufacturers_name, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, pd.products_description, products_subimage1 from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'" . $where_plus. $order_by_plus; } } else { $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id,m.manufacturers_name, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, pd.products_description, products_subimage1 from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'" . $where_plus. $order_by_plus; } // #################### End Added Flash Selling ################### } } if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) { for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { if ($column_list[$i] == 'PRODUCT_LIST_NAME') { $HTTP_GET_VARS['sort'] = $i+1 . 'a'; // baphira update order sort if($order_by_plus == ""){ $listing_sql .= " order by pd.products_name"; } break; } } } else { $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1); $sort_order = substr($HTTP_GET_VARS['sort'], 1); $listing_sql .= ' order by '; switch ($column_list[$sort_col-1]) { case 'PRODUCT_LIST_MODEL': $listing_sql .= "p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_NAME': $listing_sql .= "pd.products_name " . ($sort_order == 'd' ? 'desc' : ''); break; case 'PRODUCT_LIST_MANUFACTURER': $listing_sql .= "m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_QUANTITY': $listing_sql .= "p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_IMAGE': $listing_sql .= "pd.products_name"; break; case 'PRODUCT_LIST_WEIGHT': $listing_sql .= "p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; case 'PRODUCT_LIST_PRICE': $listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name"; break; } } if (isset($HTTP_GET_VARS['manufacturers_id'])){ $db_query = tep_db_query("select manufacturers_htc_title_tag as htc_title, manufacturers_htc_description as htc_description from " . TABLE_MANUFACTURERS_INFO . " where languages_id = '" . (int)$languages_id . "' and manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); }else{ $db_query = tep_db_query("select categories_newtitle as htc_title, categories_htc_description as htc_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'"); } // baphira update manufacturers if(isset($HTTP_GET_VARS['filter_id'])){ $db_query = tep_db_query("select newtitle as htc_title, htc_description as htc_description from categories_manufacturers where language_id = '" . (int)$languages_id . "' and manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and categories_id = '" . (int)$current_category_id . "'"); if(tep_db_num_rows($db_query) == 0){ // au cas où le système ne renvoit rien $db_query = tep_db_query("select categories_newtitle as htc_title, categories_htc_description as htc_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'"); } } $htc = tep_db_fetch_array($db_query); ?>
"; } ?>

'0', 'text' => 'Sélectionner ma '.substr($products_options_name['products_options_name'],2,strlen($products_options_name['products_options_name']))); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' GROUP BY pov.products_options_values_name"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); } echo ''; echo tep_draw_hidden_field('categories_id', (int)$current_category_id); echo tep_draw_pull_down_menu('size_id', $products_options_array,'', 'onchange="this.form.submit()"').'   '; } /**** EOF BAPHIRA ***/ ?> 0) { if (isset($HTTP_GET_VARS['manufacturers_id'])) { $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and c.categories_active = 1 order by cd.categories_name"; } else { $filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name"; } $filterlist_query = tep_db_query($filterlist_sql); if (tep_db_num_rows($filterlist_query) > 1) { echo tep_draw_form('filter', FILENAME_DEFAULT, 'get'); if (isset($HTTP_GET_VARS['manufacturers_id'])) { echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']); $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES)); } else { echo tep_draw_hidden_field('cPath', $cPath); $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS)); } //echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']); while ($filterlist = tep_db_fetch_array($filterlist_query)) { $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']); } echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"'); echo '   ' . "\n"; } } /**** BAPHIRA SELECTION ORDER BY PRICE / NeWesT *****/ // Newest products echo tep_draw_form('filter', FILENAME_DEFAULT, 'get'); echo tep_draw_hidden_field('cPath', $cPath); echo ""; // Tranches de prix $query_price = tep_db_query("SELECT max(p.products_price) as max_price, MIN(p.products_price) as min_price FROM products p, products_to_categories p2c WHERE p.products_id = p2c.products_id AND p2c.categories_id = '".(int)$current_category_id ."'"); $price_tranche = tep_db_fetch_array($query_price); $prix1 = round($price_tranche['min_price']*1.192,0); $prix2 = round((($price_tranche['max_price']-$price_tranche['min_price'])/3 + $price_tranche['min_price'])*1.192,0); $prix3 = round((($price_tranche['max_price']-$price_tranche['min_price'])/3 + $prix2)*1.192,0); $prix4 = round($price_tranche['max_price']*1.192,0); echo tep_draw_form('filter', tep_href_link(FILENAME_DEFAULT, 'cPath='.$cPath), 'post'); echo tep_draw_hidden_field('min_val', $price_tranche['min_price']); echo tep_draw_hidden_field('max_val', $price_tranche['max_price']); echo "      "; /***** EOF BAPHIRA ***/ // Get the right image for the top-right $image = DIR_WS_IMAGES . 'table_background_list.gif'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); $image = tep_db_fetch_array($image); $image = $image['manufacturers_image']; } elseif ($current_category_id) { $image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'"); $image = tep_db_fetch_array($image); $image = $image['categories_image']; } // Image de sous-catégorie $query_image_subcat = tep_db_query("SELECT configuration_value FROM configuration WHERE configuration_key='IMAGE_SUBCATEGORY'"); $image_subcat = tep_db_fetch_array($query_image_subcat); if($image_subcat['configuration_value']=="true"){ echo "".tep_image(DIR_WS_IMAGES . $image, $category['categories_htc_title_tag'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT)."
»Accédez aux ventes flash
  

';?>Plan du site