<?php
if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly.
}

$firstname= $lastname =  $email = $country = $state = $city = $address1 = $address2 = $pincode = $phone = '';

foreach($orderinfo['orderinfo'] as $orifo)	{

	$firstname = $orifo->fbbttm_first_name;
	$lastname = $orifo->fbbttm_last_name;
	$email = $orifo->fbbttm_user_email;
	$countryid = $orifo->fbbttm_user_country;
	$stateid = $orifo->fbbttm_user_state;
	$address1 = $orifo->fbbttm_street_1;
	$address2 = $orifo->fbbttm_street_2;
	$city = $orifo->fbbttm_city;
	$pincode = $orifo->fbbttm_pincode;
	$phone = $orifo->fbbttm_phone;


	$countrydata = $fbbttm_helperobj->fbbttm_comman_single_tableinfo(FBBTTM_COUNTRIES,'id',$countryid);
	
	foreach($countrydata as $cdata){

		$country = $cdata->name;

	}

	$statedata = $fbbttm_helperobj->fbbttm_comman_single_tableinfo(FBBTTM_STATES,'id',$stateid);

	foreach($statedata as $sdata){

		$state = $sdata->name;

	}

	$fbbttm_payment_method = $orifo->fbbttm_payment_method;
}



?>

<div class="col-md-12">
	<div class="row">
		<h3><?php echo esc_html__('Order Info','foodboxbooker');?></h3>
	</div>

		<div class="row">
			<div class="col-md-6">
				<h3><?php echo esc_html__('Delivery Address Info','foodboxbooker');?></h3>
				<div class="delivery-info">
					<div class="username">
						<p><?php echo esc_html($firstname . ' ' . $lastname);?></p>
						<p><?php echo esc_html($address1);?></p>
						<p><?php echo esc_html($address2);?></p>
						<p><?php echo esc_html($city);?></p>
						<p><?php echo esc_html($state);?></p>
						<p><?php echo esc_html($country);?></p>
						<p><?php echo esc_html($pincode);?></p>
						<p><a href="tel:<?php echo esc_html($phone);?>"><?php echo esc_html($phone);?></p>
						<p><a href="mail-to:<?php echo esc_html($email);?>"> <?php echo esc_html($email);?></a>
						</p>

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

			<div class="col-md-6">
			<h3><?php echo esc_html__('Payment Information','foodboxbooker');?></h3>

				<div class="fbbttm-paymentinfo">
					<?php echo esc_html__('Payment Method : ','foodboxbooker'); echo esc_html($fbbttm_payment_method);?>
				</div>

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