add(DIAMONDS_NAVBAR_TITLE, tep_href_link(FILENAME_FINE_JEWELRY, '', 'NONSSL')); $breadcrumb->add(RINGS_NAVBAR_TITLE, tep_href_link(FILENAME_RINGS, '', 'NONSSL')); require(DIR_WS_INCLUDES . 'template_top.php'); // $product_check_query = "select * from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " pd where pd.categories_id = 22 and pd.products_id = p.products_id" ; $cat_num='28'; $condition = ''; if(isset($HTTP_GET_VARS['dsh'])) { $query = mysql_query("SELECT * FROM ".TABLE_SETTING_IMAGES. " WHERE diamond_shape = '".$HTTP_GET_VARS[dsh]."'"); $setting_id = array('0'); while ($res = mysql_fetch_array($query)) { $setting_id[] = "'".$res['products_id']."'"; } $setting_id = implode(',',$setting_id); $condition .= " AND p.products_id in ($setting_id)"; } if($cat_num > 0){ $product_categories_query = tep_db_query("select * from " .TABLE_CATEGORIES_DESCRIPTION. " cd where cd.categories_id = '".$cat_num."'"); $row=tep_db_fetch_array($product_categories_query); $cat_name=$row['categories_name']; $product_check_query = "select * from " . TABLE_PRODUCTS . " p, " .TABLE_PRODUCTS_DESCRIPTION . " pc, ". TABLE_PRODUCTS_TO_CATEGORIES . " pd where pd.categories_id= ".$cat_num. " and pd.products_id = p.products_id and pc.products_id=p.products_id $condition ORDER BY p.best_sellers DESC"; } else{ $product_check_query = "select * from " . TABLE_PRODUCTS . " p, " .TABLE_PRODUCTS_DESCRIPTION . " pc, ".TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " pd where c.parent_id='23' and c.categories_id = pd.categories_id and pd.products_id = p.products_id and pc.products_id=p.products_id ORDER BY p.best_sellers DESC"; $sdgf=mysql_query($product_check_query); $cnt=mysql_num_rows($sdgf); //die; } $products_new_split = new splitPageResults($product_check_query,12); //echo $product_check_query; //die; //Set this to show the setting design collection filter at the left hand side $design_left_filter = 1; ?>