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

$iteminfodata = $orderinfo['orderiteminfo'];

if(!empty($iteminfodata)){
 ?>

    <div class="bookinginfo col-md-12">
	  <table class="fbbttm-table-wrapper"> 
		<tr>

			<th><?php echo esc_html__('Fooditem Name','foodboxbooker');?></th>
			<th><?php echo esc_html__('Order Info','foodboxbooker');?></th>
			<th><?php echo esc_html__('Sub Total','foodboxbooker');?></th>
		</tr>
		<tbody>
	<?php
	foreach ($iteminfodata as $data) {
	
		$foodname = get_the_title($data->fbbttm_fd_id);
		$packname = $data->fbbttm_pack_name;
		$fdprice = $data->fbbttm_fitem_price;
		$packprice = $data->fbbttm_package_price;
		$foodtime = $data->fbbttm_food_time;
		$specialprice = $data->fbbttm_special_price;
		$deliveryday = $data->fbbttm_booking_deliveryday;
		$startdate = $data->fbbttm_food_startdate;
		$packenddate = $data->fbbttm_food_enddate;
		$pack_day = $data->fbbttm_package_day;

		$packdescription = $data->fbbttm_package_description;

		$lunchdinnerqty = $data->fbbttm_lunch_qty. '/' .$data->fbbttm_dinner_qty;

		$post_meta = get_post_meta($data->fbbttm_fd_id); 

		$productinfo =  (!empty($post_meta['fbbttmdetails'][0]))? $post_meta['fbbttmdetails'][0] : '';

		?>
		<tr>
			<td><?php echo esc_html($foodname);?></td>
			<td>
				<div class="fbbttm-packinfo">	

				<p><?php echo esc_html__('Package Name','foodboxbooker'); echo esc_html(' : '.$packname);?></p>
				<p><?php echo esc_html__('Package Startdate','foodboxbooker'); echo esc_html(' : '.$startdate);?>
			</p>
				<p><?php echo esc_html__('Package enddate','foodboxbooker'); echo esc_html(' : '.$packenddate);?></p>
				<p><?php echo esc_html__('Delivery day','foodboxbooker'); echo esc_html(' : '.$deliveryday);?></p>
				<p><?php echo esc_html__('Food Time','foodboxbooker'); echo esc_html(' : '.$foodtime);?></p>
				<p><?php echo esc_html__('Pack Info','foodboxbooker'); echo esc_html(' : '.$packdescription);?></p>
				<p><?php echo esc_html__('Product Info','foodboxbooker'); echo esc_html(' : '.$productinfo);?></p>
				<p><?php echo esc_html__('Product Qty (Lunch/Dinner)','foodboxbooker'); echo esc_html(' : '.$lunchdinnerqty);?></p>
				<p><?php echo esc_html__('Pack Day','foodboxbooker'); echo esc_html(' : '.$pack_day);?></p>

				</div>

			</td>
			<td><?php echo esc_html($packprice);?></td>
		</tr>
  		<?php } ?>
  	 </tbody>
   </table> 
  </div>


	<?php
}	
?>