<?php 
$this->load->view('site/templates/commonheader');
$this->load->view('site/templates/shop_header'); 
?>
<div style="background:none repeat scroll 0 0 #FFFFFF;border-bottom:1px solid #DDDDDD;border-top:1px solid #DDDDDD;padding: 20px 0;" class="add_shop">
    <div class="main">    			
                <?php
					if (count($orderList) > 0){						
				?>
                <form class="tab_form_list">
                     <table class="tab_form_list_table" align="center" width="100">
                        <thead>     
                            <tr class="table-header">
                            	<th>#</th>
                                <th><span>User Email</span></th>
                                <th><span>Payment Date</span></th>        
                                <th><span>Tranaction ID</span></th>        
                                <th><span>Total</span></th>  
                                <th><span>Payment Type</span></th>  
                                <th><span>Status</span></th>     
                                <th><span>Action</span></th> 
                            </tr>
                        </thead>
                        <tbody align="center">          
                        <?php $i=0; foreach ($orderList->result() as $row){ $i++; ?>          
                            <tr>      
                            	<td><?php echo $i; ?></td>                      
                                <td><?php echo $row->email;?></td>        
                                <td><?php echo $row->created;?></td>        
                                <td><?php echo $row->dealCodeNumber;?></td>
                                <td><?php echo $currencySymbol;?> <?php echo number_format($currencyValue*$row->total,2);?></td>
                                <td><?php echo $row->payment_type;?></td>
                                <td>
                                <select id="<?php echo $row->id; ?>" class="changeShipstatusShop" data-val-id="<?php echo $row->dealCodeNumber;?>">
                                    <!--<option <?php if($row->shipping_status=="Pending"){ echo 'selected="selected"'; } ?>>Pending</option>-->
                                    <option <?php if($row->shipping_status=="Processed"){ echo 'selected="selected"'; } ?>>Processed</option>
                                    <option <?php if($row->shipping_status=="Shipped"){ echo 'selected="selected"'; } ?>>Shipped</option>
                                    <option <?php if($row->shipping_status=="Delivered"){ echo 'selected="selected"'; } ?>>Delivered</option>
                                    <option <?php if($row->shipping_status=="Cancelled"){ echo 'selected="selected"'; } ?>>Cancelled</option>
                                </select>
								</td>
                                <td>
                                <a href="site/shop/vieworder/<?php echo $row->user_id; ?>/<?php echo $row->dealCodeNumber; ?>" target="_blank" title="View">View</a>
                                <br />
                                <a href="discussion/<?php echo $row->dealCodeNumber; ?>" title="View Discussion">View Discussion</a>
                                </td>
                            </tr>
                        <?php } ?>
                        </tbody>
                     </table>     
                 </form>
        		<?php }else{ ?>
                <div class=" warning-error">
                    <h3>
                        <span style="margin:0 0 0 3px; color:#000; font-weight:bold">No Transaction in your Shop yet.</span>
                    </h3>
                </div>
                <?php } ?>
    </div>
</div>
<?php $this->load->view('site/templates/footer'); ?>