<!doctype html>
<html lang="en">
  <head>
  
  
  <style>
  
  
  
@media (min-width: 200px) {
		.form-control-quantity{
		width:100%;
		
		}

.checkout-container{
	padding:0px 0px;
} 	
}
@media (min-width: 600px) {
		.form-control-quantity{
		width:100%;
		
		}

	
	.checkout-products{
	padding-top:10px;
	padding-bottom:10px;
	border-top:1xp solid #99EEF8;
	
}

.checkout-container{
	padding:5% 5%;
} 	
}
@media (min-width: 990px) and (max-width: 1799px) {
	.form-control-quantity{
		width:84px;
		
		}
	
	
	.checkout-products{
	padding-top:10px;
	padding-bottom:10px;
	display:-webkit-inline-box;
	border-top:1xp solid #99EEF8;
	
}

	
.checkout-container{
	padding:0% 15%;
} 
}

@media (min-width: 1800px) {  
	.form-control-quantity{
		width:84px;
		
		}

	.checkout-products{
	padding-top:10px;
	padding-bottom:10px;
	display:-webkit-inline-box;
	border-top:1xp solid #99EEF8;
	
}
.checkout-container{
	padding:0px 25%;
} 
}
.checkout-tablebottom{
	border:1px solid #e0e0e0;
	padding:20px;
	padding-bottom:20px;

	}
.checkout-instructions {
	border:1px solid #e0e0e0;
	border-bottom:0px;
	padding:20px;
}
.checkout-li{
	border-bottom:1px solid #e0e0e0;
	padding-bottom:15px;
	display:list-item;
	list-style-type:none;
	padding-bottom:35px;
}

  
 .prod-thumbnail{
	 padding:0px;
	 width:100%;
	 
}

.row{
	margin-bottom:10px	
}

.prod-title-variation{
	padding-left:10px;
	}

.checkout-img-info{
	padding:0px;
	padding-left:15px;
	text-align: left;

}
.checkout-prod-info{
	padding:0px;
	text-align:center;

	}
.checkout-img{
	padding:0px;
	}
.form-control{
	padding:4px 40px;
	}
	
.checkout-Customer-Info .form-control{
	padding:4px 5px;
	margin-bottom:10px
	}
	
.checkout-prod-info-r{
	text-align:right;
	font-size:20px;
	padding:10px 0px;
	
	}

.sign-ro-login{
	padding:10px 10px;
	background:#99EEF8;
	border-radius: 5px;
	margin-bottom:10px;
}

.place-order{
	margin-top:20px;
	
	}

.btn-place-order{
	margin-top:10px;
	}


  
  </style>
  
  </head>
  
  <body>
  
  
  <!-- head -->
  <div class="checkout-container">  <button style="display:block; float:right" onClick="print()">Print Order Details</button>

  <h2><strong>Please verify your order details and select payment type.</strong>  </h2>

  <!-- End head -->
  
   <!-- part1 -->
   <div class="checkout-instructions " style="height:70px;">
      <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
      	<h1 style=" margin:5px 5px;">Order Details</h1>
        </div>
        </div>
   <!-- End part1  -->  
   
   <!-- part2 subject-->
      
       <div class="checkout-instructions col-lg-12 col-md-12 col-sm-12 col-xs-12">

        <div class="checkout-tabletop checkout-cart-items">
          <div class="checkout-li hidden-sm hidden-xs">
            <div class="col-md-6">Product Description</div>
            <div class="col-md-2 text-center">Unit Price</div>
            <div class="col-md-2 text-center">Quantity</div>
            <div class="col-md-2 text-right">Sub-total</div>
          </div>
          
   <!--End part2 subject-->
   
    <!-- part3 cart-items-->
    <div class='cart-products'>
	<?php include ("checkout-products.php");?>
          </div>
        </div>      
      </div>
      
      <!-- End part3 cart-items-->
      
      <!-- part4 Coupon Customer Info Place Order-->
      <div class="checkout-tablebottom col-lg-12 col-md-12 col-sm-12 col-xs-12" >
      <!-- part4.1 Coupon-->
      
         <!-- Nav tabs -->
      <!-- End part4.1 Coupon-->

  <!-- Tab panes -->
    
<form method="post" name="paypal_form" id="paypal_form" action="includes/paypal_checkout.php?Payment_Type=<?php if($_POST["payment_method"]=="bank"){echo "Bank_Transfer";}else{echo "paypal";} ?>">
    <div class="place-order col-lg-6 col-md-6 col-sm-12 col-xs-12" style="margin-top:0;    padding-left: 15px;padding-top: 5px;"> 
    
		<?php if($_POST["discount_rate"]!=""){echo '	<h2>Coupon Code:</h2>
              <input name="code" type="text" class="form-control" value="'.$_POST["code"].'" readonly="readonly" />
			  <input name="discount_rate" style="display:none" class="form-control" value="'.$_POST["discount_rate"].'" />';} ?>
    
    <h2>Customer Info:</h2>
			<strong>Customer's First Name</strong>
            <input class="form-control" id="pcfname1" placeholder="" type="text" name="customer_Fname" value="<?php echo $_POST["customer_Fname"];?>" required>
			
			<strong>Customer's Last Name</strong>
            <input class="form-control" id="pclname1" placeholder="" type="text" name="customer_Lname" value="<?php echo $_POST["customer_Lname"];?>" required>
            
            
            <strong>Customer's Email</strong> 
            <input class="form-control" style="text-align: center;" id="pcemail1" placeholder="" type="email" name="customer_email" value="<?php echo $_POST["customer_email"];?>" required>
            
            <strong>Customer's Phone</strong> 
            <input class="form-control" id="pcphone1" placeholder="" type="text" name="customer_phone" value="<?php echo $_POST["customer_phone"];?>" required>
            
            <strong>Billing Address</strong>
            <textarea class="form-control" id="pcaddress1" rows="2" name="customer_address" wrap='physical' required><?php 
			
			$address=preg_replace("<br>", '/\r\n/',($_POST["customer_address"]));
			echo $address; ?></textarea>
                 
            
            <strong>Company Name</strong> 
            <input class="form-control" placeholder="" type="text" name="company_name" value="<?php echo $_POST["company_name"];?>" required>
            
            <h2>Delivery Details:</h2> 
            
			<strong>Recipient's First Name</strong>
            <input class="form-control" id="prfname1" placeholder="" type="text" name="recipient_Fname" value="<?php echo $_POST["recipient_Fname"];?>"  required>
            
			<strong>Recipient's Last Name</strong>
            <input class="form-control" id="prlname1" placeholder="" type="text" name="recipient_Lname" value="<?php echo $_POST["recipient_Lname"];?>" required>
			
            <strong>Recipient's Email</strong>
            <input class="form-control" style="text-align: center;" id="premail1" placeholder="" name="email" value="<?php echo $_POST["email"];?>"  required>
            
            <strong>Recipient's phone</strong>
            <input class="form-control" id="prphone1" placeholder="" type="text" name="phone" value="<?php echo $_POST["phone"];?>" required>
            
            <strong>Delivery Address</strong>
            <textarea class="form-control" id="praddress1" rows="2" name="address" wrap='physical' required><?php 
			
			$address=preg_replace("<br>", '/\r\n/',($_POST["address"]));
			echo $address; ?></textarea>
                 
            <strong>Delivery Date1</strong>
            <p>*Please select your targeted delivery date. We will confirm the exact delivery date after receiving your order very soon.<br>
Kindly note that delivery service is not available on Sundays and public holidays.</p>

			<input class="form-control" type="text" name="delivery_date" id="datepicker1" value="<?php echo $_POST["delivery_date"];?>" required></input>  
            
            <p>*Please note that the delivery service is handled by SF Express. We will try our best to deliver the goods to you within the scheduled time slot but delay may happen sometimes due to traffic situation.We will try our best to contact you directly if we will not be able to arrange the delivery on your targeted delivery time.</p>
            
            <strong>Delivery Time Slot</strong>
            
			<select class="form-control" name="delivery_time">
            <option value="09:00 - 15:00"<?php if($_POST["delivery_time"]=="09:00 - 15:00"){echo "selected='selected'";} ?>>9:00AM - 3:00PM</option>
            <option value="13:00 - 19:00"<?php if($_POST["delivery_time"]=="13:00 - 19:00"){echo "selected='selected'";} ?>>1:00PM - 7:00PM</option>
            </select>  
            
            <strong>Remarks</strong>
            <textarea class="form-control" rows="4" name="remarks" placeholder="Enter your message" wrap='physical'><?php echo $_POST["remarks"];?></textarea>
            </div>
            
            
            
     
    <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12" style="margin-top:0;padding-right:15px;padding-top: 5px;"><h2 align="right">Order Summary</h2>
      	<div class="row">
        	<div class="col-xs-4 col-sm-7" style="text-align:right"> 
   				 <div class="">Sub-total:</div>
  			</div>
        	<div class="col-xs-8 col-sm-5" style="text-align:right">
   				 <div class="" >HK$<?php echo $_SESSION["Tsubtotal"];?></div>
 			</div>
        </div>
        
		<?php if($_POST["discount_rate"]!=""){echo '
      	<div class="row">
        	<div class="col-xs-4 col-sm-7" style="text-align:right"> 
   				 <div>Discount(%):</div>
  			</div>
        	<div class="col-xs-8 col-sm-5" style="text-align:right">
   				 <div class="" >'.(100-($_POST["discount_rate"]*100)).'%</div>
 			</div>
        </div>   
		
		<div class="row">
        	<div class="col-xs-4 col-sm-7" style="text-align:right"> 
   				 <div class="">Discounted Amount:</div>
  			</div>
        	<div class="col-xs-8 col-sm-5" style="text-align:right">
   				 <div class="" >HK$'.($_SESSION["Tsubtotal"]-number_format($_SESSION["Tsubtotal"]*$_POST["discount_rate"],1)).'</div>
 			</div>
        </div> 
		
		<div class="row">
        	<div class="col-xs-4 col-sm-7" style="text-align:right"> 
   				 <div class="">Discount After Discount:</div>
  			</div>
        	<div class="col-xs-8 col-sm-5" style="text-align:right">
   				 <div class="" >HK$'.number_format($_SESSION["Tsubtotal"]*$_POST["discount_rate"],1).'</div>
 			</div>
        </div>   
		';} ?>
        
      	<div class="row">
        	<div class="col-xs-4 col-sm-7" style="text-align:right"> 
   				 <div class="">Delivery Fee:</div>
  			</div>
        	<div class="col-xs-8 col-sm-5" style="text-align:right">
   				 <div class="" >HK$<?php if($_SESSION["Delivery"]==1){echo 38;}else{echo 0;} ?></div>
 			</div>
        </div>
              
      	<div class="row">
        	<div class="col-xs-4 col-sm-7" style="text-align:right"> 
   				 <div class=""><strong>Total:</strong></div>
  			</div>
        	<div class="col-xs-8 col-sm-5" style="text-align:right">
   				 <div class="" ><strong>HK$<?php if($_POST["discount_rate"]==""){echo $_SESSION["subtotal"];}else{echo number_format(($_SESSION["Tsubtotal"]*$_POST["discount_rate"])+($_SESSION["Delivery"]*38),1);} ?></strong></div>
 			</div>
        </div> 
      
<input class="hidden" name="username" value="<?php echo $_SESSION["username"];?>"/>
      
<input class="hidden" name="rm" value="2"/>
<input class="hidden" name="cmd" value="_cart"/>		
<input class="hidden" name="custom" value="<?php echo $_SESSION['username']; ?>"/>
<input class="hidden" name="business" value="info-facilitator@sayvour.com.hk"/>
<!-- Where people will be sent after a successful order -->
<input class="hidden" name="return" value="http://103.44.161.50/~monkeygo/sayvour/e-shop.php"/>
<!-- Where people will be sent after a cancelled order -->
<input class="hidden" name="cancel_return" value="http://103.44.161.50/~monkeygo/sayvour/e-shop.php"/>
<!-- The location of your IPN. PayPal needs to know this so it knows where to send the infomation about the order -->
<input class="hidden" name="notify_url" value="http://103.44.161.50/~monkeygo/sayvour/paypal.php"/>
<input class="hidden" name="quantity" value="2"/>

<?php 
	$y=$_SESSION["paypal_count"];
	$x=1;
	while($x<=$y){
		if($_POST["discount_rate"]!=""){$discount_rate=$_POST["discount_rate"];}else{$discount_rate=1;}
		if($_SESSION["item_name_$x"]=="Delivery Fee"){$discount_rate=1;}
		$item_name=$_SESSION["item_name_$x"];
		$amount=$_SESSION["amount_$x"];
		$quantity=$_SESSION["quantity_$x"];
		echo "<input class='hidden' name='item_name_".$x."' value='".$item_name."'/>";
		echo '<input class="hidden" name="amount_'.$x.'" value="'.round($amount*$discount_rate,1).'"/>';
		echo '<input class="hidden" name="quantity_'.$x.'" value="'.$quantity.'"/>';
		$x++;
		}
?>
<input class="hidden" name="y" value="<?php echo $x;?>"/>


<input class="hidden" name="upload" value="1"/>
<input class="hidden" name="txn_type" value="cart"/>
<input class="hidden" name="currency_code" value="HKD"/>
<h2 align="middle">Payment Method</h2>
<?php
if($_POST["payment_method"]=="bank"){
echo '<img src="../img/pic1a.jpg" width="260px" height="60px">
	<p style="color:rgba(107,180,211,1.00)">If you want to pay with bank transfer, please transfer with the following account</p>
	<p style="color:rgba(107,180,211,1.00)">(only available in Hong Kong Dollars)</p>
	<p style="color:rgba(230,149,148,1.00)">Company Name: Patisserie Sayvour Limited</p>
	<p style="color:rgba(230,149,148,1.00)">Beneficiary`s Bank Name: HSBC</p>
	<p style="color:rgba(230,149,148,1.00)">Beneficiary`s Account no: 023-462187-838</p>
	<p style="color:rgba(230,149,148,1.00)">SWIFT address: HSBCHKHHHKH</p>
	<p style="color:rgba(230,149,148,1.00)">Bank address: 1 Queen`s Road Central, Hong Kong</p>
	<br>
	<input class="btn btn-place-order" type="submit" name="submit" value="Confirm Order">';
}else{
echo '<img src="../img/pic3a.jpg" width="260px" height="60px">
	<p style="color:rgba(107,180,211,1.00)">General buyer use credit card payment. </p>
	<p style="color:rgba(107,180,211,1.00)">PayPal account owner can pay with PayPal account.</p>
	<br>
	<input class="btn btn-place-order" type="submit" name="submit" value="Confirm Order">';
}
?>


</form> 
</div>
</div>
</div>


<!-- End part4 Coupon Customer Info Place Order-->

      
     
  </body>
</html>