/** * This function is used to get the pop up of image of product * * @return string */ function showPopupProducts() { $sql = "SELECT * FROM product_inventory_table a INNER JOIN products_table b ON a.product_id = b.product_id WHERE b.product_id =" . (int) $_GET['prodid'] . " AND b.status=1"; $obj = new Bin_Query(); $obj->executeQuery($sql); $rating = Core_CProductDetail::reviewRating(); return Display_DProductDetail::showPopupProducts($obj->records, $rating); }
/** * Function gets the releated products from the cross products table * * * @return string */ function relatedProducts() { $sql = "SELECT * from cross_products_table where product_id=" . (int) $_GET['prodid']; $query = new Bin_Query(); if ($query->executeQuery($sql)) { $resultproduct = $query->records; $arr = explode(',', $resultproduct[0]['cross_product_ids']); $output1 = ' <table width="20%" border="0" cellpadding="0" cellspacing="0"><tr>'; if (count($arr) > 0) { for ($i = 0; $i < count($arr); $i++) { $sql = "SELECT * from products_table where product_id=" . $arr[$i]; $query = new Bin_Query(); $query->executeQuery($sql); if ($query->totrows > 0) { foreach ($query->records as $row) { $r[$j] = $row; $prid = $row['product_id']; $obj1 = new Core_CProductDetail(); $minval = $obj1->disRates($prid); if ($minval > 0 or $minval != '') { $r[$j]['msrp'] = $_SESSION['currency']['currency_tocken'] . $row['msrp'] . ' - ' . $_SESSION['currency']['currency_tocken'] . $minval; } else { $r[$j]['msrp'] = $_SESSION['currency']['currency_tocken'] . $row['msrp']; } //$j++; //print_r($r); $output .= Display_DProductDetail::relatedProducts($r); } } } } return $output1 . $output; } else { //return '<div class="exc_msgbox">Related Products Not Found</div>'; $output1 = '<div id="middle_details"><div id=""> <table width="100%" border="0" cellpadding="0" cellspacing="0"><tr>'; return $output1; } }