| 13646 |
anikendra |
1 |
<div class="container">
|
|
|
2 |
<div class="row">
|
|
|
3 |
<div class="col-lg-3">
|
|
|
4 |
<?php echo $this->Element('adminactions');?>
|
|
|
5 |
</div>
|
|
|
6 |
<div class="col-lg-9"> <h2><?php echo __('Exceptional Sku Discounts'); ?></h2>
|
|
|
7 |
<table class="table">
|
|
|
8 |
<tr>
|
|
|
9 |
<th><?php echo ('sku'); ?></th>
|
| 14098 |
anikendra |
10 |
<th><?php echo ('name'); ?></th>
|
| 13646 |
anikendra |
11 |
<th><?php echo ('min_discount'); ?></th>
|
|
|
12 |
<th><?php echo ('max_discount'); ?></th>
|
|
|
13 |
<th><?php echo ('discountType'); ?></th>
|
|
|
14 |
<th class="actions"><?php echo __('Actions'); ?></th>
|
|
|
15 |
</tr>
|
|
|
16 |
<?php foreach ($exceptionalskudiscounts as $exceptionalskudiscount): ?>
|
|
|
17 |
<?php $exceptionalskudiscount = json_decode($exceptionalskudiscount,1);?>
|
|
|
18 |
<tr>
|
|
|
19 |
<td><?php echo h($exceptionalskudiscount['sku']); ?> </td>
|
| 14098 |
anikendra |
20 |
<td><?php echo h($exceptionalskudiscount['source_product_name']); ?> </td>
|
|
|
21 |
<td class="edit" id="min_discount" data-oid="<?php echo $exceptionalskudiscount['_id']['$oid'];?>"><?php echo h($exceptionalskudiscount['min_discount']); ?></td>
|
|
|
22 |
<td class="edit" id="max_discount" data-oid="<?php echo $exceptionalskudiscount['_id']['$oid'];?>"><?php echo h($exceptionalskudiscount['max_discount']); ?></td>
|
|
|
23 |
<td class="editable" id="discountType" data-oid="<?php echo $exceptionalskudiscount['_id']['$oid'];?>"><?php echo h($exceptionalskudiscount['discountType']); ?></td>
|
| 13646 |
anikendra |
24 |
<td class="actions">
|
| 14098 |
anikendra |
25 |
<?php //echo $this->Html->link(__('Edit'), array('action' => 'edit', $exceptionalskudiscount['_id']['$oid'])); ?>
|
| 13646 |
anikendra |
26 |
<?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $exceptionalskudiscount['_id']['$oid']), null, __('Are you sure you want to delete # %s?', $exceptionalskudiscount['_id']['$oid'])); ?>
|
|
|
27 |
</td>
|
|
|
28 |
</tr>
|
|
|
29 |
<?php endforeach; ?>
|
|
|
30 |
</table>
|
|
|
31 |
</div>
|
|
|
32 |
</div>
|
| 14098 |
anikendra |
33 |
<nav>
|
|
|
34 |
<ul class="pager">
|
|
|
35 |
<?php if($page>1):?>
|
|
|
36 |
<li><a href="?page=<?php echo $page-1;?>">Previous</a></li>
|
|
|
37 |
<?php endif;?>
|
|
|
38 |
<li><a href="?page=<?php echo $page+1;?>">Next</a></li>
|
|
|
39 |
</ul>
|
|
|
40 |
</nav>
|
| 13646 |
anikendra |
41 |
</div>
|
| 14098 |
anikendra |
42 |
<script type="text/javascript">
|
|
|
43 |
$(document).ready(function() {
|
|
|
44 |
$('.editable').editable(base_url+'admin/'+controller+'/update', {
|
|
|
45 |
data : "{'DP':'DP','MRP':'MRP'}",
|
|
|
46 |
type : 'select',
|
|
|
47 |
submit : 'OK',
|
|
|
48 |
tooltip : 'Click to edit...',
|
|
|
49 |
indicator : 'Saving...',
|
|
|
50 |
submitdata : function(value, settings) {
|
|
|
51 |
return {oid: $(this).data('oid')};
|
|
|
52 |
}
|
|
|
53 |
});
|
|
|
54 |
});
|
|
|
55 |
</script>
|