| Line 5... |
Line 5... |
| 5 |
</div>
|
5 |
</div>
|
| 6 |
<div class="col-lg-9"> <h2><?php echo __('Exceptional Sku Discounts'); ?></h2>
|
6 |
<div class="col-lg-9"> <h2><?php echo __('Exceptional Sku Discounts'); ?></h2>
|
| 7 |
<table class="table">
|
7 |
<table class="table">
|
| 8 |
<tr>
|
8 |
<tr>
|
| 9 |
<th><?php echo ('sku'); ?></th>
|
9 |
<th><?php echo ('sku'); ?></th>
|
| - |
|
10 |
<th><?php echo ('name'); ?></th>
|
| 10 |
<th><?php echo ('min_discount'); ?></th>
|
11 |
<th><?php echo ('min_discount'); ?></th>
|
| 11 |
<th><?php echo ('max_discount'); ?></th>
|
12 |
<th><?php echo ('max_discount'); ?></th>
|
| 12 |
<th><?php echo ('discountType'); ?></th>
|
13 |
<th><?php echo ('discountType'); ?></th>
|
| 13 |
<th class="actions"><?php echo __('Actions'); ?></th>
|
14 |
<th class="actions"><?php echo __('Actions'); ?></th>
|
| 14 |
</tr>
|
15 |
</tr>
|
| 15 |
<?php foreach ($exceptionalskudiscounts as $exceptionalskudiscount): ?>
|
16 |
<?php foreach ($exceptionalskudiscounts as $exceptionalskudiscount): ?>
|
| 16 |
<?php $exceptionalskudiscount = json_decode($exceptionalskudiscount,1);?>
|
17 |
<?php $exceptionalskudiscount = json_decode($exceptionalskudiscount,1);?>
|
| 17 |
<tr>
|
18 |
<tr>
|
| 18 |
<td><?php echo h($exceptionalskudiscount['sku']); ?> </td>
|
19 |
<td><?php echo h($exceptionalskudiscount['sku']); ?> </td>
|
| 19 |
<td><?php echo h($exceptionalskudiscount['min_discount']); ?> </td>
|
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>
|
| 20 |
<td><?php echo h($exceptionalskudiscount['max_discount']); ?> </td>
|
22 |
<td class="edit" id="max_discount" data-oid="<?php echo $exceptionalskudiscount['_id']['$oid'];?>"><?php echo h($exceptionalskudiscount['max_discount']); ?></td>
|
| 21 |
<td><?php echo h($exceptionalskudiscount['discountType']); ?> </td>
|
23 |
<td class="editable" id="discountType" data-oid="<?php echo $exceptionalskudiscount['_id']['$oid'];?>"><?php echo h($exceptionalskudiscount['discountType']); ?></td>
|
| 22 |
<td class="actions">
|
24 |
<td class="actions">
|
| 23 |
<?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $exceptionalskudiscount['_id']['$oid'])); ?>
|
25 |
<?php //echo $this->Html->link(__('Edit'), array('action' => 'edit', $exceptionalskudiscount['_id']['$oid'])); ?>
|
| 24 |
<?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $exceptionalskudiscount['_id']['$oid']), null, __('Are you sure you want to delete # %s?', $exceptionalskudiscount['_id']['$oid'])); ?>
|
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'])); ?>
|
| 25 |
</td>
|
27 |
</td>
|
| 26 |
</tr>
|
28 |
</tr>
|
| 27 |
<?php endforeach; ?>
|
29 |
<?php endforeach; ?>
|
| 28 |
</table>
|
30 |
</table>
|
| 29 |
</div>
|
31 |
</div>
|
| 30 |
</div>
|
32 |
</div>
|
| - |
|
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>
|
| 31 |
</div>
|
41 |
</div>
|
| - |
|
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>
|
| 32 |
|
56 |
|