	<?php

	$result = '';
	
	$phxcrmclient_id = $_COOKIE['phxcrmclient_id'];
	
//	$sel_main_cat = $_REQUEST['sel_main_cat'];

	$sel_main_cat = 14;
	
	$result = '<div class="row">';
	
	$cart_id	= 0;
	
	$postage = 0;
	
	 include 'configi.php';

		
		$querystt="SELECT ".$phxcrmclient_id."_prod_category.cat_id, ".$phxcrmclient_id."_prodserv.prod_title as title, ".$phxcrmclient_id."_web_cat.cat_name, ".$phxcrmclient_id."_prodserv.uid, ".$phxcrmclient_id."_prodserv.prod_retail as price, prod_isbn as sku FROM (".$phxcrmclient_id."_prodserv INNER JOIN ".$phxcrmclient_id."_prod_category ON ".$phxcrmclient_id."_prodserv.uid = ".$phxcrmclient_id."_prod_category.prod_uid) INNER JOIN ".$phxcrmclient_id."_web_cat ON ".$phxcrmclient_id."_prod_category.cat_id = ".$phxcrmclient_id."_web_cat.cat_id WHERE ".$phxcrmclient_id."_prod_category.cat_id=".$sel_main_cat;

		echo $querystt;
		$resultstt=mysqli_query($conn, $querystt);


		while($rowstt=mysqli_fetch_array($resultstt)) { 

			$price			 			= $rowstt['price'];
			$sku			 			= $rowstt['sku'];
			$title			 			= $rowstt['title'];
			$qp_prodserv_uid 			= $rowstt['uid'];

			$disp_price = $price;
					
				$queryprodi="SELECT * from ".$_COOKIE['phxcrmclient_id']."_prod_search where sel_uid = " . $qp_prodserv_uid;
				//		echo $queryprod;
				$resultprodi=mysqli_query($conn, $queryprodi);

				while($rowprodi=mysqli_fetch_array($resultprodi)) { 

					$prod_image_url1			 				= $rowprodi['prod_image_url1'];


				}	
		
$result = $result . '
    <div class="col-sm-6"><div class="chip"  data-toggle="tooltip" data-html="true" title="SKU:'.htmlspecialchars($sku).' Title: ' .htmlspecialchars($title). '" ondragstart="dragItqp(event, '.$qp_prodserv_uid.')" onclick="javascript: add_item_quickpick('.$qp_prodserv_uid.')">
<table>
<tr>
<td>
  <img src="https://app.phoenixcrm.co.nz/crm/images/products/'.$prod_image_url1.'"  width="88" height="88" onerror="this.onerror=null; this.src="https://app/phoenixcrm.co.nz/crm/images/noimage.png" alt="no image" >
  </td>
  <td>
        <span class="chip-label">$'.$disp_price.' </span>
		</td>
		</tr>

		
		
		</table>
</div><div style="height: 20px; width: 150px; font-size: 10px; text-align: right">'.$title.'</div></div>';
		}	
		
		$result = $result . '</div>';

echo $result;

			
			?>