<?php require_once("header.php");?>
  
			<!-- page template area start -->
			<section id="about">
				<div class="container mt-10 pb-10 pt-0">		
					<div class="row">
						<div class="col-lg-4">
							<?php require_once("user_left_panel.php");?>
						</div>
						<div class="col-lg-8">
						    <h1 class="title mt-5 mb-15" style="text-align:left;">Order Details</h1>
							<div class="table-responsive">
							<form action="" method="post" enctype="multipart/form-data">
								<table class="table table-striped table-bordered tbl-shopping-cart">
									<thead>
										<tr style="background-color:#d75500; color:#FFFFFF;">
											<th>Photo</th>
											<th>Product Name</th>
											<th>Price</th>
											<th>Quantity</th>
											<th>Sub Total</th>
										</tr>
									</thead>
									<tbody>
									<?php
									$sql_cart = "SELECT * FROM `og_final_cart` WHERE `order_id` = '".$_REQUEST['orderid']."'";
									$exe_cart = mysqli_query($connection,$sql_cart);
									$num_cart = mysqli_num_rows($exe_cart);
									if($num_cart>0)
									{
										while($arr_cart = mysqli_fetch_array($exe_cart))
										{
											$fetch_product = mysqli_fetch_array(mysqli_query($connection,"SELECT * FROM `og_products` WHERE `product_id` = '".$arr_cart['product_id']."'"));
										?>
										<tr class="cart_item">
											<td class="product-thumbnail"><img alt="member" src="uploads/product/<?php echo stripslashes($fetch_product['product_photo']);?>" width="70" height="70"></td>
											<td class="product-name text-left"><?php echo stripslashes($fetch_product['product_name_english']);?></td>
											<td class="product-price"><span class="amount">&pound;<?php echo stripslashes($arr_cart['unit_price']);?></span></td>
											<td class="product-quantity"><?php echo stripslashes($arr_cart['quantity']);?></td>
											<td class="product-subtotal"><span class="amount">&pound;<?php echo stripslashes($arr_cart['subtotal']);?></span></td>
										</tr>
										<?php
									}
								}
								?>
									</tbody>
								</table>
								<input type="hidden" name="send" id="send" value="1" />
							</form>
							</div>
							<?php
							$order = mysqli_fetch_array(mysqli_query($connection,"SELECT * FROM `og_orders` WHERE `orderid` = '".$_REQUEST['orderid']."'"));
							?>
							<div class="col-md-12 mt-20">
								<div class="row">
									<div class="col-md-12">
										<h3 class="mt-0">Cart Totals</h3>
										<table class="table table-bordered">
											<tbody>
												<tr>
													<td>Total Amount</td>
													<td>&pound;<?php echo $order['total_price'];?></td>
												</tr>
												<tr>
													<td>Discount</td>
													<td>&pound;<?php echo $order['discount'];?></td>
												</tr>
												<tr>
													<td>Shipping Charge</td>
													<td>&pound;<?php echo $order['delivery_charge'];?></td>
												</tr>
												<tr>
													<td><strong>Grand Total</strong></td>
													<td><strong>&pound;<?php echo $order['grand_total'];?></strong></td>
												</tr>
											</tbody>
										</table>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</section>
			<!-- page template area end -->
  
<?php require_once("footer.php");?>
