Rev 13944 | Rev 13993 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<div class="container"><div class="row"><?php if(!empty($orders)):?><?php foreach ($orders as $key => $order):?><?php //debug($order);?><?php if(!empty($order['subOrders'])):?><?php foreach ($order['subOrders'] as $key => $suborder):?><div class="row card"><div class="col-xs-4 pull-left orderimage"><?php if(!empty($suborder['imgUrl'])):?><img src="<?php echo $base_url;?>app/webroot/timthumb.php?src=<?php echo $suborder['imgUrl'];?>&h=80" alt="<?php echo $suborder['productTitle'];?>"/><?php else:?><img src="<?php echo $base_url;?>app/webroot/timthumb.php?src=<?php echo $base_url;?>img/noimage.png&h=80" alt="<?php echo $suborder['productTitle'];?>"/><?php endif;?><div class="clearfix"></div><?php if(!empty($order['storeId'])):?><img src="<?php echo $activestores[$storemapping[$order['storeId']]]['logo'];?>" alt="<?php echo ucfirst($storemapping[$order['storeId']]);?>"/><?php endif;?><div class="clearfix"></div><div class="col-xs-12"><span class="rupee"></span><span class="product_price"><?php echo $suborder['amountPaid'];?></span></div></div><div class="col-xs-8 productdetails"><h5 class="producttitle"><?php echo $suborder['productTitle'];?></h5><div class="row orderdetails"><div class="col-xs-6 orderid"><span>Order Id</span><?php if(!empty($order['merchantOrderId'])):?><span><?php echo $order['merchantOrderId'];?></span><?php elseif(!empty($order['merchantOderId'])):?><span><?php echo $order['merchantOderId'];?></span><?php endif;?></div><div class="col-xs-6"><?php echo formatOrderDate($suborder['placedOn'],$order['storeId']);?></div></div><?php if($suborder['cashBackStatus']!='Not Applicable'):?><div class="row orderdetails"><div class="col-xs-6 cashback">Cashback : <span class="rupee"></span><span class="product_price"><?php echo $suborder['cashBackAmount'];?></span></div><div class="col-xs-6">(<?php echo $suborder['cashBackStatus'];?>)</div></div><?php endif;?><?php if(!empty($suborder['estimatedShippingDate'])):?><div class="row orderdetails"><div class="col-xs-6">Delivery by</div><div class="col-xs-6"><?php echo formatOrderDate($suborder['estimatedShippingDate'],$order['storeId'],'edd');?></div></div><?php elseif(!empty($suborder['estimatedDeliveryDate'])):?><div class="row orderdetails"><div class="col-xs-6">Delivery by</div><div class="col-xs-6"><?php echo formatOrderDate($suborder['estimatedDeliveryDate'],$order['storeId'],'edd');?></div></div><?php endif;?><div class="row"><div class="col-xs-6 ordercontrols"><?php if(!empty($suborder['status'])):?><span class="label label-info"><?php echo $suborder['status'];?></span><?php endif;?></div><div class="col-xs-6 pull-right ordercontrols"><?php if(!empty($suborder['tracingkUrl'])):?><a href="<?php echo $suborder['tracingkUrl'];?>"><button class="pull-right btn btn-sm trackingurl" type="button">Track My Order</button></a><?php endif;?></div></div></div></div><?php endforeach;?><?php endif;?><?php endforeach;?><nav><ul class="pager"><?php if($page>1):?><li><a href="<?php echo '?user_id='.$userId.'&page='.($page-1);?>">Previous</a></li><?php endif;?><?php if($page<$totalPages):?><li><a href="<?php echo '?user_id='.$userId.'&page='.($page+1);?>">Next</a></li><?php endif;?></ul></nav><?php else:?><h3>You haven't placed any orders till now</h3><?php endif;?></div></div><?phpfunction formatOrderDate($date,$storeId,$type='od'){if($type=='od'){switch($storeId){case 2:$dateParts = explode(' ', $date);$formatteddate = substr($dateParts[1],0,3).' '.$dateParts[0].', '.$dateParts[3].' '.$dateParts[4];break;case 3:$dateParts = explode(' ', $date);$formatteddate = $dateParts[0].' '.substr($dateParts[1],0,2).', '.$dateParts[3].' '.$dateParts[4];break;default:case 1:$formatteddate = date('M d h:i A',strtotime($date)+43200);break;}}else{switch($storeId){case 1:$dateParts = explode(' - ', $date);$formatteddate = date('M d h:i A',strtotime($dateParts[1])+43200);break;default:$formatteddate = date('M d h:i A',strtotime($date)+43200);break;}}return $formatteddate;}?>