<?php ob_start(); session_start(); include '../xyz.php'; ?>
<a class="dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
										<i class="fa fa-shopping-cart"></i>
										<span>Your Cart</span>
										<div class="qty">
<?php 

if(isset($_SESSION['mycus'])){
if(QueryDB("SELECT COUNT(*) FROM payment where cus_id='".$_SESSION['mycus']."' and pay_status=0 " )->fetchColumn()>0){
$get_cart =QueryDB("SELECT * FROM payment where cus_id='".$_SESSION['mycus']."' and pay_status=0 ");
$road = $get_cart->fetch(PDO::FETCH_ASSOC); echo count(explode(',',$road['item']));
} else { echo 0;}
}else{ echo 0;}

?>										

										</div>
									</a>
									<div class="cart-dropdown">
										<div class="cart-list">
<?php foreach(QueryDB("SELECT * FROM payment where cus_id ='".$_SESSION['mycus']."' and pay_status=0 ")as $listProd){
		$dateReg = $listProd['day'];
		$nameExp = explode(',',$listProd['item']);
		$itemQty = explode(',',$listProd['qty']);
		$itemSingle = explode(',',$listProd['s_price']);
		$itemBulks = explode(',',$listProd['bulk_price']);
		$getTotalAmount = $listProd['amt'];

for($y=0;$y<count($nameExp);$y++){

		$itemFull = getProduct($nameExp[$y]);
		$show_img =explode(',',$itemFull['item_img'])[0];
		?>
<div class="product-widget"><div class="product-img"><img src="../../<?php echo $show_img;  ?>" alt="item_image"></div><div class="product-body"><h3 class="product-name">
	<a href="<?php echo getItemLink($itemFull['id'],1245321);  ?>"><?php  echo $itemFull['item_name'].' '.$company[$itemFull['company']].' '.$brand[$itemFull['brand']]; ?></a></h3>
													<h4 class="product-price"><span class="qty"><?php  echo $itemQty[$y];?>x</span>&#8358; <?php  echo number_format($itemBulks[$y]);?></h4>
												</div>
												<button class="delete"><i class="fa fa-close"></i></button>
											</div>
<?php  } } ?>
											
										</div>
										<div class="cart-summary">
											<small><?php echo count($nameExp); ?> Item(s) selected</small>
											<h5>SUBTOTAL: &#8358;<?php echo number_format($getTotalAmount,2); ?></h5>
										</div>
										<div class="cart-btns">
											<a href="../../home">View Cart</a>
											<a href="../../checkout">Checkout  <i class="fa fa-arrow-circle-right"></i></a>
										</div>
									</div>