| 16773 |
manas |
1 |
<div class="appTransactions index">
|
| 16811 |
manas |
2 |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
|
|
|
3 |
<h2><?php echo __('App Transactions Retailer Wise'); ?></h2>
|
| 16813 |
manas |
4 |
<h4><?php echo __('Total Clicks '.$totalClicks);?></h4>
|
|
|
5 |
<h4><?php echo __('Total Approved '.$totalApproved);?></h4>
|
|
|
6 |
<h4><?php echo __('Overall Conversion Percentage '.ceil(($totalApproved/$totalClicks)*100)) . '%';?></h4>
|
| 16811 |
manas |
7 |
<form class="navbar-form" role="search" method="GET" name="search" action="<?php echo $base_url;?>admin/appTransactions/retailer">
|
|
|
8 |
<div><select id="mySelect">
|
|
|
9 |
<option value="today">Today</option>
|
|
|
10 |
<option value="yesterday">Yesterday</option>
|
|
|
11 |
<option value="range">Date Range</option>
|
|
|
12 |
</select></div>
|
|
|
13 |
|
|
|
14 |
<div style="margin_top:10dp"
|
|
|
15 |
class="input-group col-xs-6 text-left" id="date_range" >
|
|
|
16 |
Date From<input type="date" name="date_from" value="Date"/>
|
|
|
17 |
Date To<input type="date" name="date_to" value="Date"/>
|
|
|
18 |
|
|
|
19 |
<div class="input-group-btn w25px">
|
|
|
20 |
<button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
|
|
|
21 |
</div>
|
|
|
22 |
</div>
|
|
|
23 |
</form>
|
| 16773 |
manas |
24 |
<table cellpadding="0" cellspacing="0" class="table table-striped">
|
|
|
25 |
<tr>
|
| 16811 |
manas |
26 |
<th><?php echo $this->Paginator->sort('retailer_id'); ?></th>
|
| 16813 |
manas |
27 |
<th><?php echo $this->Paginator->sort('clicks'); ?></th>
|
| 16773 |
manas |
28 |
<th><?php echo $this->Paginator->sort('approved'); ?></th>
|
|
|
29 |
<th><?php echo $this->Paginator->sort('conversion_percentage'); ?></th>
|
|
|
30 |
|
|
|
31 |
</tr>
|
|
|
32 |
|
|
|
33 |
<?php foreach ($appTransactions as $appTransaction): ?>
|
|
|
34 |
<tr>
|
| 16911 |
manas |
35 |
<td>
|
|
|
36 |
<?php echo
|
|
|
37 |
$this->Html->link(__(h($appTransaction['AppTransaction']['retailer_id'])), array('action' => '/user', $appTransaction['AppTransaction']['retailer_id'])); ?>
|
|
|
38 |
|
|
|
39 |
</td>
|
| 16773 |
manas |
40 |
<td><?php echo h($appTransaction[0]['count']); ?> </td>
|
| 16811 |
manas |
41 |
<td><?php if(!isset($appTransaction['AppTransaction']['approved'])){echo h('0');}else{echo h($appTransaction['AppTransaction']['approved']);}; ?> </td>
|
|
|
42 |
<td><?php if(!isset($appTransaction['AppTransaction']['conversion_percentage'])){echo h('0');}else{echo h($appTransaction['AppTransaction']['conversion_percentage']);}; ?> </td>
|
| 16773 |
manas |
43 |
</tr>
|
|
|
44 |
<?php endforeach; ?>
|
|
|
45 |
</table>
|
| 16811 |
manas |
46 |
<script type="text/javascript">
|
|
|
47 |
$('#mySelect').on('change', function() {
|
|
|
48 |
var value = $(this).val();
|
|
|
49 |
if(value=='yesterday'){
|
|
|
50 |
$('#date_range').hide();
|
|
|
51 |
document.location = '/admin/appTransactions/retailer?date=yesterday';
|
|
|
52 |
}
|
|
|
53 |
if(value=='today'){
|
|
|
54 |
$('#date_range').hide();
|
|
|
55 |
document.location = '/admin/appTransactions/retailer';
|
|
|
56 |
}
|
|
|
57 |
if(value=='range'){
|
|
|
58 |
$('#date_range').show();
|
|
|
59 |
}
|
|
|
60 |
|
|
|
61 |
});
|
|
|
62 |
</script>
|
|
|
63 |
<script type="text/javascript">
|
|
|
64 |
$(document).ready(function() {
|
|
|
65 |
if($("#mySelect").val() == "today"){
|
|
|
66 |
$("#date_range").hide();
|
|
|
67 |
}
|
|
|
68 |
});
|
|
|
69 |
</script>
|
| 16873 |
manas |
70 |
</div>
|