/** * This function is used to show the show products of sub category * @param string $skin * * @return string */ function showProducts($skin) { $query = new Bin_Query(); $sql = "SELECT * FROM `products_table` WHERE category_id=" . (int) $_GET['subcatid'] . " and status=1 and intro_date <= '" . date('Y-m-d') . "' and status=1 and product_status!='3' ORDER BY rand( )"; if ($query->executeQuery($sql)) { $flag = 1; $j = 0; $cnt = count($query->records); if ($cnt > 0) { for ($i = 0; $i < $cnt; $i++) { foreach ($query->records as $row) { $r[$j] = $row; $prid = $row['product_id']; $minval = Core_CWishList::disRates($prid); if ($minval > 0 or $minval != '') { $r[$j]['msrp'] = '$' . $row['msrp'] . ' - $' . $minval; } else { $r[$j]['msrp'] = '$' . $row['msrp']; } $j++; } } $output = Display_DFeaturedItems::showSubCatFeaturedItems($query->records, $skin, $flag, $r); } } else { $output = Display_DFeaturedItems::showFeaturedItemsElse(); } return $output; }