customer_order.tpl
6.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?php echo $header; ?><?php echo $column_left; ?>
<div id="content">
<div class="page-header">
<div class="container-fluid">
<h1><?php echo $heading_title; ?></h1>
<ul class="breadcrumb">
<?php foreach ($breadcrumbs as $breadcrumb) { ?>
<li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
<?php } ?>
</ul>
</div>
</div>
<div class="container-fluid">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-bar-chart"></i> <?php echo $text_list; ?></h3>
</div>
<div class="panel-body">
<div class="well">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="control-label" for="input-date-start"><?php echo $entry_date_start; ?></label>
<div class="input-group date">
<input type="text" name="filter_date_start" value="<?php echo $filter_date_start; ?>" placeholder="<?php echo $entry_date_start; ?>" data-date-format="YYYY-MM-DD" id="input-date-start" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
<div class="form-group">
<label class="control-label" for="input-date-end"><?php echo $entry_date_end; ?></label>
<div class="input-group date">
<input type="text" name="filter_date_end" value="<?php echo $filter_date_end; ?>" placeholder="<?php echo $entry_date_end; ?>" data-date-format="YYYY-MM-DD" id="input-date-end" class="form-control" />
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span></div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="control-label" for="input-status"><?php echo $entry_status; ?></label>
<select name="filter_order_status_id" id="input-status" class="form-control">
<option value="0"><?php echo $text_all_status; ?></option>
<?php foreach ($order_statuses as $order_status) { ?>
<?php if ($order_status['order_status_id'] == $filter_order_status_id) { ?>
<option value="<?php echo $order_status['order_status_id']; ?>" selected="selected"><?php echo $order_status['name']; ?></option>
<?php } else { ?>
<option value="<?php echo $order_status['order_status_id']; ?>"><?php echo $order_status['name']; ?></option>
<?php } ?>
<?php } ?>
</select>
</div>
<button type="button" id="button-filter" class="btn btn-primary pull-right"><i class="fa fa-search"></i> <?php echo $button_filter; ?></button>
</div>
</div>
</div>
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td class="text-left"><?php echo $column_customer; ?></td>
<td class="text-left"><?php echo $column_email; ?></td>
<td class="text-left"><?php echo $column_customer_group; ?></td>
<td class="text-left"><?php echo $column_status; ?></td>
<td class="text-right"><?php echo $column_orders; ?></td>
<td class="text-right"><?php echo $column_products; ?></td>
<td class="text-right"><?php echo $column_total; ?></td>
<td class="text-right"><?php echo $column_action; ?></td>
</tr>
</thead>
<tbody>
<?php if ($customers) { ?>
<?php foreach ($customers as $customer) { ?>
<tr>
<td class="text-left"><?php echo $customer['customer']; ?></td>
<td class="text-left"><?php echo $customer['email']; ?></td>
<td class="text-left"><?php echo $customer['customer_group']; ?></td>
<td class="text-left"><?php echo $customer['status']; ?></td>
<td class="text-right"><?php echo $customer['orders']; ?></td>
<td class="text-right"><?php echo $customer['products']; ?></td>
<td class="text-right"><?php echo $customer['total']; ?></td>
<td class="text-right"><a href="<?php echo $customer['edit']; ?>" data-toggle="tooltip" title="<?php echo $button_edit; ?>" class="btn btn-primary"><i class="fa fa-pencil"></i></a></td>
</tr>
<?php } ?>
<?php } else { ?>
<tr>
<td class="text-center" colspan="8"><?php echo $text_no_results; ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<div class="row">
<div class="col-sm-6 text-left"><?php echo $pagination; ?></div>
<div class="col-sm-6 text-right"><?php echo $results; ?></div>
</div>
</div>
</div>
</div>
<script type="text/javascript"><!--
$('#button-filter').on('click', function() {
url = 'index.php?route=report/customer_order&token=<?php echo $token; ?>';
var filter_date_start = $('input[name=\'filter_date_start\']').val();
if (filter_date_start) {
url += '&filter_date_start=' + encodeURIComponent(filter_date_start);
}
var filter_date_end = $('input[name=\'filter_date_end\']').val();
if (filter_date_end) {
url += '&filter_date_end=' + encodeURIComponent(filter_date_end);
}
var filter_order_status_id = $('select[name=\'filter_order_status_id\']').val();
if (filter_order_status_id != 0) {
url += '&filter_order_status_id=' + encodeURIComponent(filter_order_status_id);
}
location = url;
});
//--></script>
<script type="text/javascript"><!--
$('.date').datetimepicker({
pickTime: false
});
//--></script></div>
<?php echo $footer; ?>