| 13822 |
anikendra |
1 |
<?php echo $this->Html->css('bootstrap-slider');?>
|
| 13695 |
anikendra |
2 |
<div class="container">
|
|
|
3 |
<?php if(!empty($categories)):?>
|
|
|
4 |
<?php foreach ($categories as $key => $category):?>
|
|
|
5 |
<div class="categorypreferences">
|
|
|
6 |
<form name="preferenceform" id="categorypreference-<?php echo $category['Category']['id'];?>" action="/preferences/add" method="POST">
|
|
|
7 |
<input type="hidden" name="user_id" value="<?php echo $logged_user['id'];?>"/>
|
|
|
8 |
<input type="hidden" name="category_id" value="<?php echo $category['Category']['id'];?>"/>
|
|
|
9 |
<div class="row">
|
|
|
10 |
<div class="categorytab">
|
|
|
11 |
<div class="col-xs-8"><span class="categoryname"><?php echo $category['Category']['name'];?></span> <button data-id="<?php echo $category['Category']['id'];?>" type="button" class="editcategorypreferences btn btn-xs">Edit</button></div>
|
|
|
12 |
<div class="col-xs-4" data-id="<?php echo $category['Category']['id'];?>">
|
|
|
13 |
<span class="categorytabcontrol" id="togglepreferences-<?php echo $category['Category']['id'];?>" data-id="<?php echo $category['Category']['id'];?>"></span>
|
|
|
14 |
</div>
|
|
|
15 |
</div>
|
|
|
16 |
</div>
|
|
|
17 |
<div class="row hidden" id="preferences-<?php echo $category['Category']['id'];?>">
|
|
|
18 |
<div class="pricepreferences">
|
|
|
19 |
<h5>My Price Range</h5>
|
| 14049 |
anikendra |
20 |
<?php
|
|
|
21 |
$defaultmin = $priceranges[$category['Category']['id']]['min'];
|
|
|
22 |
$defaultmax = $priceranges[$category['Category']['id']]['max'];
|
|
|
23 |
?>
|
| 13695 |
anikendra |
24 |
<?php if(!empty($preferredPrices) && isset($preferredPrices[$category['Category']['id']])){
|
|
|
25 |
$range = "[".intval($preferredPrices[$category['Category']['id']]['min_price']).",".intval($preferredPrices[$category['Category']['id']]['max_price'])."]";
|
| 14049 |
anikendra |
26 |
}else{
|
|
|
27 |
$range = '['.$defaultmin.','.$defaultmax.']';
|
| 13695 |
anikendra |
28 |
}?>
|
|
|
29 |
<div class="maxrange col-xs-12">
|
| 14049 |
anikendra |
30 |
<input name="pricerange" id="pricerange-<?php echo $category['Category']['id'];?>" value="" class="slider" data-slider-min="<?php echo $defaultmin;?>" data-slider-max="<?php echo $defaultmax;?>" data-slider-step="500" data-slider-value="<?php echo $range;?>" data-tooltip="always" data-tooltip_split="true"/>
|
| 13695 |
anikendra |
31 |
</div>
|
| 14049 |
anikendra |
32 |
<b class="minrange col-xs-6"><span class="cashbackrupee"></span><?php echo $defaultmin;?></b>
|
|
|
33 |
<b class="maxrange col-xs-6 text-right"><span class="cashbackrupee"></span><?php echo $defaultmax;?></b>
|
| 13695 |
anikendra |
34 |
</div>
|
| 13759 |
anikendra |
35 |
<div class="clearfix"></div>
|
|
|
36 |
<div class="brandpreferences">
|
|
|
37 |
<?php if(!empty($category['Brand'])):?>
|
|
|
38 |
<?php //print_r($category['Brand']);?>
|
|
|
39 |
<h5>My Favourite Brands</h5>
|
|
|
40 |
<?php foreach ($category['Brand'] as $key => $brand):?>
|
|
|
41 |
<div class="col-xs-6 brands <?php if(empty($brand['displayed_in_preference_page'])):?>hidden notfeatured<?php endif;?>">
|
|
|
42 |
<?php if(!empty($preferredBrands) && isset($preferredBrands[$category['Category']['id']]) && in_array($brand['name'],$preferredBrands[$category['Category']['id']])):?>
|
|
|
43 |
<input type="checkbox" name="brand[]" value="<?php echo $brand['name'];?>" class="brandselector" data-catid="<?php echo $category['Category']['id'];?>" checked="checked"/>
|
|
|
44 |
<?php else:?>
|
|
|
45 |
<input type="checkbox" name="brand[]" value="<?php echo $brand['name'];?>" class="brandselector" data-catid="<?php echo $category['Category']['id'];?>"/>
|
|
|
46 |
<?php endif;?>
|
|
|
47 |
<?php echo $brand['name'];?>
|
|
|
48 |
</div>
|
|
|
49 |
<?php endforeach;?>
|
|
|
50 |
<div class="revealbrands">Others</div>
|
|
|
51 |
<?php endif;?>
|
|
|
52 |
</div>
|
| 13695 |
anikendra |
53 |
</div>
|
|
|
54 |
</form>
|
|
|
55 |
</div>
|
|
|
56 |
<?php endforeach;?>
|
|
|
57 |
<?php endif;?>
|
|
|
58 |
</div>
|
|
|
59 |
</div>
|
| 13820 |
anikendra |
60 |
<!-- <script type="text/javascript" src="/js/jquery.jscroll.min.js"></script> -->
|
| 13695 |
anikendra |
61 |
<script type="text/javascript" src="/js/profittill.js?v=<?php echo $staticversion;?>"></script>
|
| 13822 |
anikendra |
62 |
<?php echo $this->Html->script('bootstrap-slider');?>
|
| 13695 |
anikendra |
63 |
<script type="text/javascript">
|
| 13900 |
anikendra |
64 |
$(function() {
|
| 13822 |
anikendra |
65 |
$('.slider').slider();
|
| 13900 |
anikendra |
66 |
});
|
|
|
67 |
</script>
|