| 13822 |
anikendra |
1 |
<?php echo $this->Html->css('bootstrap-slider');?>
|
| 14056 |
anikendra |
2 |
<?php echo $this->Html->script('bootstrap-slider');?>
|
| 13695 |
anikendra |
3 |
<div class="container">
|
| 14135 |
anikendra |
4 |
<ul class="nav nav-tabs noborder">
|
|
|
5 |
<?php foreach($categories AS $key => $category):?>
|
| 20282 |
amit.gupta |
6 |
<?php if($category['Category']['id'] != 6):?>
|
| 14135 |
anikendra |
7 |
<li class="prefcatselect col-xs-6 <?php if($key==0)echo 'active';?>" data-id="<?php echo $category['Category']['id'];?>">
|
|
|
8 |
<a href="javascript:void(0);" ><?php echo $category['Category']['name'];?></a>
|
|
|
9 |
</li>
|
| 20282 |
amit.gupta |
10 |
<?php endif;?>
|
| 14135 |
anikendra |
11 |
<?php endforeach;?>
|
|
|
12 |
</ul>
|
| 13695 |
anikendra |
13 |
<?php if(!empty($categories)):?>
|
|
|
14 |
<?php foreach ($categories as $key => $category):?>
|
| 14135 |
anikendra |
15 |
<div class="categorypreferences <?php if($key>0)echo 'hidden';?>" id="cat-<?php echo $category['Category']['id'];?>">
|
| 13695 |
anikendra |
16 |
<form name="preferenceform" id="categorypreference-<?php echo $category['Category']['id'];?>" action="/preferences/add" method="POST">
|
|
|
17 |
<input type="hidden" name="user_id" value="<?php echo $logged_user['id'];?>"/>
|
|
|
18 |
<input type="hidden" name="category_id" value="<?php echo $category['Category']['id'];?>"/>
|
| 14386 |
anikendra |
19 |
<div class="row controls">
|
| 13695 |
anikendra |
20 |
<div class="categorytab">
|
|
|
21 |
<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>
|
|
|
22 |
<div class="col-xs-4" data-id="<?php echo $category['Category']['id'];?>">
|
|
|
23 |
<span class="categorytabcontrol" id="togglepreferences-<?php echo $category['Category']['id'];?>" data-id="<?php echo $category['Category']['id'];?>"></span>
|
|
|
24 |
</div>
|
|
|
25 |
</div>
|
|
|
26 |
</div>
|
| 14286 |
anikendra |
27 |
<div class="row" id="preferences-<?php echo $category['Category']['id'];?>">
|
| 13695 |
anikendra |
28 |
<div class="pricepreferences">
|
|
|
29 |
<h5>My Price Range</h5>
|
| 14049 |
anikendra |
30 |
<?php
|
| 14286 |
anikendra |
31 |
$defaultmin = intval($priceranges[$category['Category']['id']]['min']);
|
|
|
32 |
$defaultmax = intval($priceranges[$category['Category']['id']]['max']);
|
| 14049 |
anikendra |
33 |
?>
|
| 13695 |
anikendra |
34 |
<?php if(!empty($preferredPrices) && isset($preferredPrices[$category['Category']['id']])){
|
|
|
35 |
$range = "[".intval($preferredPrices[$category['Category']['id']]['min_price']).",".intval($preferredPrices[$category['Category']['id']]['max_price'])."]";
|
| 14049 |
anikendra |
36 |
}else{
|
|
|
37 |
$range = '['.$defaultmin.','.$defaultmax.']';
|
| 13695 |
anikendra |
38 |
}?>
|
|
|
39 |
<div class="maxrange col-xs-12">
|
| 14056 |
anikendra |
40 |
<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="show" data-tooltip_split="true"/>
|
| 13695 |
anikendra |
41 |
</div>
|
| 14286 |
anikendra |
42 |
<b class="minrange col-xs-6"><span class="cashbackrupee"></span><?php if(!empty($preferredPrices[$category['Category']['id']]['min_price']))echo intval($preferredPrices[$category['Category']['id']]['min_price']);else echo $defaultmin;?></b>
|
|
|
43 |
<b class="maxrange col-xs-6 text-right"><span class="cashbackrupee"></span><?php if(!empty($preferredPrices[$category['Category']['id']]['max_price']))echo intval($preferredPrices[$category['Category']['id']]['max_price']);else echo $defaultmax;?></b>
|
| 13695 |
anikendra |
44 |
</div>
|
| 13759 |
anikendra |
45 |
<div class="clearfix"></div>
|
|
|
46 |
<div class="brandpreferences">
|
|
|
47 |
<?php if(!empty($category['Brand'])):?>
|
|
|
48 |
<h5>My Favourite Brands</h5>
|
|
|
49 |
<?php foreach ($category['Brand'] as $key => $brand):?>
|
|
|
50 |
<div class="col-xs-6 brands <?php if(empty($brand['displayed_in_preference_page'])):?>hidden notfeatured<?php endif;?>">
|
|
|
51 |
<?php if(!empty($preferredBrands) && isset($preferredBrands[$category['Category']['id']]) && in_array($brand['name'],$preferredBrands[$category['Category']['id']])):?>
|
| 14300 |
anikendra |
52 |
<input type="checkbox" name="brand[]" value="<?php echo $brand['name'];?>" class="brandselector active" data-catid="<?php echo $category['Category']['id'];?>" checked="checked"/>
|
| 13759 |
anikendra |
53 |
<?php else:?>
|
| 14300 |
anikendra |
54 |
<input type="checkbox" name="brand[]" value="<?php echo $brand['name'];?>" class="brandselector active" data-catid="<?php echo $category['Category']['id'];?>"/>
|
| 13759 |
anikendra |
55 |
<?php endif;?>
|
|
|
56 |
<?php echo $brand['name'];?>
|
|
|
57 |
</div>
|
|
|
58 |
<?php endforeach;?>
|
|
|
59 |
<div class="revealbrands">Others</div>
|
|
|
60 |
<?php endif;?>
|
|
|
61 |
</div>
|
| 13695 |
anikendra |
62 |
</div>
|
|
|
63 |
</form>
|
|
|
64 |
</div>
|
| 14056 |
anikendra |
65 |
<script type="text/javascript">
|
|
|
66 |
$('#pricerange-<?php echo $category['Category']['id'];?>').slider().on('slide',function(){
|
|
|
67 |
var range = $(this).slider('getValue');
|
| 14286 |
anikendra |
68 |
$(this).parent().siblings('.minrange').html('<span class="cashbackrupee"></span>'+range[0]);
|
|
|
69 |
$(this).parent().siblings('.maxrange').html('<span class="cashbackrupee"></span>'+range[1]);
|
| 14386 |
anikendra |
70 |
$(this).parents('.row').siblings('.controls').find('.editcategorypreferences',0).click();
|
| 14056 |
anikendra |
71 |
});
|
|
|
72 |
</script>
|
| 13695 |
anikendra |
73 |
<?php endforeach;?>
|
|
|
74 |
<?php endif;?>
|
| 16013 |
anikendra |
75 |
<div class="hidden text-center firsttimemsg">
|
| 16031 |
anikendra |
76 |
<?php if(isset($firsttime)):?>
|
| 16066 |
anikendra |
77 |
<a class="showdeals btn btn-block btn-primary" href="<?php echo $base_url;?>deals/?user_id=<?php echo $userId;?>">Show my Deals</a>
|
| 16031 |
anikendra |
78 |
<img src="<?php echo $base_url;?>img/preference-success.png"/>
|
|
|
79 |
<?php else:?>
|
| 16066 |
anikendra |
80 |
<a class="showdeals btn btn-block btn-primary" href="<?php echo $base_url;?>deals/?user_id=<?php echo $userId;?>">Show my Deals</a>
|
| 16031 |
anikendra |
81 |
<?php endif;?>
|
| 13695 |
anikendra |
82 |
</div>
|
|
|
83 |
</div>
|
| 14056 |
anikendra |
84 |
<script type="text/javascript" src="/js/profittill.js?v=<?php echo $staticversion;?>"></script>
|