<? if(!empty($bigcommerce_result) && $operation['type']=='profile'){
	foreach($bigcommerce_result as $bigcommerce_client) 
	   {?>
		<div class="popover-content">
		   <?  echo "<h5 class='font-bold'>". $bigcommerce_client['bigcommerce_path'] ."</h5><br>";  ?>
		   <div class="col-sm-12 line b-b line-lg pull-in"></div>
		   <br>
		   <div class="row m-b-sm">
			  <div class="col-sm-6">
				 <label class="font-bold m-r-sm"><?php echo $vis_language['TXTFIRSTNAME'];?></label>:
				 <label class="m-l-sm">
					<?php echo $bigcommerce_client['customer_details']['first_name']; ?></span>
			  </div>
			  <div class="col-sm-6"><label class="font-bold m-r-sm"><?php echo $vis_language['TXTADDRESS'];?></label><label class="m-l-sm"><?php echo $bigcommerce_client['address']['street_1'].' '.$bigcommerce_client['address']['street_2']; ?></span></div>
		   </div>
		   <div class="row m-b-sm">
			   <div class="col-sm-6"><label class="font-bold m-r-sm"><?php echo $vis_language['TXTLASTNAME'];?></label>:<label class="m-l-sm"><?php echo $bigcommerce_client['customer_details']['last_name']; ?></span></div>
			   <div class="col-sm-6"><label class="font-bold m-r-sm"><?php echo $vis_language['TXTCITY'];?></label>:<label class="m-l-sm"><?php echo $bigcommerce_client['address']['city']; ?></span></div>
		   </div>
		   <div class="row m-b-sm">
			   <div class="col-sm-6"><label class="font-bold m-r-sm"><?php echo $vis_language['TXTEMAIL'];?></label>:<label class="m-l-sm"><?php echo $bigcommerce_client['customer_details']['email']; ?></span></div>
			   <div class="col-sm-6"><label class="font-bold m-r-sm"><?php echo $vis_language['TXTCOUNTRY'];?></label>:<label class=" m-l-sm"><?php echo $bigcommerce_client['address']['country']; ?></span></div>
		   </div>
		   <div class="row m-b-sm">
			   <div class="col-sm-6"><label class="font-bold m-r-sm"><?php echo $vis_language['TXTCONTACTNUMBER'];?></label>:<label class="m-l-sm"><?php echo $bigcommerce_client['address']['phone']; ?></span></div>
			   <div class="col-sm-6"><label class="font-bold m-r-sm"><?php echo $vis_language['TXTZIPCODE'];?></label>:<label class="m-l-sm"><?php echo $bigcommerce_client['address']['zip']; ?></span></div>
		   </div>
		</div>
	<? }
}elseif(!empty($bigcommerce_result) && $operation['type']=='activity'){
	foreach($bigcommerce_result as $final_details) 
	   {?>
		<div class="popover-content">
		   <?  echo "<h5 class='font-bold'>". $final_details['bigcommerce_path'] ."</h5><br>";  ?>
		  
		   <table class="table table-hover b-t b-light m-b-none" data-ride="datatables">
			   <thead class="table_head">
				  <tr>
					 <th class="txt_nowrap"><? echo $vis_language['TXTORDER'];?>#</th>
					 <th class="txt_nowrap"><? echo $vis_language['TXTDATE']; ?></th>
					 <th class="txt_nowrap"><? echo $vis_language['TXTTO'];?></th>
					 <th class="txt_nowrap"><? echo $vis_language['TXTTOTAL']; ?></th>
					 <th class="txt_nowrap"><? echo $vis_language['TXTSTATUS']; ?></th>
				  </tr>
			   </thead>
			   <tbody>
			   <? foreach($final_details['order'] as $order_details){
				    echo '<tr><td>'.$order_details['id'].'</td>';
					echo '<td>'.format_datetime(strtotime($order_details['date_created'])).'</td>';
					echo '<td>'.$order_details['billing_address']['first_name'].' '.$order_details['billing_address']['last_name'].'</td>';
					echo '<td>'.round($order_details['total_inc_tax'], '2').' '.$order_details['currency_code'].'</td>';
					echo '<td>'.ucfirst($order_details['status']).'</td></tr>';
				}?>    
			   </tbody>
			</table>
		</div>
	<? }
 }else include(VIS_PATH_TEMPLATE.'no_record_yet.php');?>
