| 13715 |
anikendra |
1 |
<!-- template for deals tab -->
|
| 17598 |
naman |
2 |
<script>
|
|
|
3 |
$(document).ready(function(){
|
|
|
4 |
$('.uvideo').click(function(){
|
|
|
5 |
var source= $(this).data('source');
|
|
|
6 |
// alert(source);
|
| 17640 |
naman |
7 |
$('#content-add').empty();
|
| 17598 |
naman |
8 |
var content = "<iframe width='100%' height='100%' src='http://www.youtube.com/embed/"+source+"?autoplay=1'></iframe>"
|
| 17640 |
naman |
9 |
$('#content-add').append(content);
|
|
|
10 |
$('#videoModal').modal('show');
|
| 17598 |
naman |
11 |
});
|
|
|
12 |
|
| 17640 |
naman |
13 |
$('.close').click(function(){
|
|
|
14 |
$('#videoModal').modal('hide');
|
|
|
15 |
$('.text-center').empty();
|
|
|
16 |
});
|
|
|
17 |
|
|
|
18 |
$('#videoModal').click(function(){
|
|
|
19 |
$('#content-add').empty();
|
|
|
20 |
// $('.text-center').append('<img src="/img/ajax-loader.gif"/>');
|
|
|
21 |
});
|
|
|
22 |
|
| 17762 |
naman |
23 |
$('.see_more_link a').click(function(){
|
|
|
24 |
$('#loadingModal').modal('show');
|
|
|
25 |
});
|
| 17598 |
naman |
26 |
});
|
|
|
27 |
</script>
|
|
|
28 |
|
| 17640 |
naman |
29 |
<div class="modal fade" id="videoModal">
|
| 17598 |
naman |
30 |
<div class="modal-dialog">
|
|
|
31 |
<div class="modal-content">
|
|
|
32 |
<div class="modal-body">
|
| 17640 |
naman |
33 |
<div class="text-center" id='content-add'>
|
|
|
34 |
|
| 17598 |
naman |
35 |
</div>
|
|
|
36 |
</div>
|
|
|
37 |
</div><!-- /.modal-content -->
|
|
|
38 |
</div><!-- /.modal-dialog -->
|
|
|
39 |
</div>
|
|
|
40 |
|
| 13682 |
anikendra |
41 |
<?php echo $this->element('unlikemodal');?>
|
| 17598 |
naman |
42 |
|
| 17640 |
naman |
43 |
<?php //debug($deals)?>
|
|
|
44 |
|
|
|
45 |
|
|
|
46 |
|
| 17693 |
naman |
47 |
<?php if($response_count ==1 && empty($deals)):?>
|
|
|
48 |
<div class="text-center">
|
|
|
49 |
<span class="nodeals" data-href="<?php echo $base_url;?>search/?user_id=<?php echo $logged_user['id'];?>">Didn't find your deal? Search for it</span>
|
|
|
50 |
</div>
|
|
|
51 |
<?php else:?>
|
| 17640 |
naman |
52 |
|
| 16098 |
anikendra |
53 |
<?php if(!empty($deals) && !empty($deals[0])):?>
|
|
|
54 |
<?php foreach($deals AS $dealarray):?>
|
|
|
55 |
<div class="row card">
|
| 17640 |
naman |
56 |
|
| 16098 |
anikendra |
57 |
<?php foreach ($dealarray as $key => $deal) :?>
|
| 17640 |
naman |
58 |
<?php //debug($deal);?>
|
|
|
59 |
<?php if(empty($deal))continue;?>
|
|
|
60 |
<?php if (!empty($deal['dealObject'])):?>
|
|
|
61 |
|
|
|
62 |
|
|
|
63 |
<!-- <dealobject part start here> -->
|
|
|
64 |
|
|
|
65 |
<?//debug($deal);?>
|
| 16098 |
anikendra |
66 |
<div class="subcard">
|
| 17640 |
naman |
67 |
<div class="col-xs-4 productthumb viewproduct" data-id="<?php echo $deal['_id'];?>">
|
|
|
68 |
<?php if($key == 0):?>
|
| 17760 |
amit.gupta |
69 |
<img src="<?php echo $base_url;?>app/webroot/timthumb.php?src=<?php echo urlencode ($deal['img_url']);?>&h=100" />
|
| 17640 |
naman |
70 |
<?php endif;?>
|
|
|
71 |
</div>
|
|
|
72 |
|
|
|
73 |
|
|
|
74 |
|
|
|
75 |
<div class="col-xs-6">
|
|
|
76 |
<?php if(isset($deal['link1']) && !empty($deal['link1'])):?>
|
|
|
77 |
<div class="text-small" );?>
|
|
|
78 |
<?php echo $deal['link1'];?>
|
|
|
79 |
</div>
|
|
|
80 |
<?php endif;?>
|
|
|
81 |
|
|
|
82 |
<?php if(isset($deal['link2']) && !empty($deal['link2'])):?>
|
|
|
83 |
<div class="text-small" );?>
|
|
|
84 |
<?php echo $deal['link2'];?>
|
|
|
85 |
</div>
|
|
|
86 |
<?php endif;?>
|
|
|
87 |
|
|
|
88 |
<?php if(isset($deal['link3']) && !empty($deal['link3'])):?>
|
|
|
89 |
<div class="text-small" );?>
|
|
|
90 |
<?php echo $deal['link3'];?>
|
|
|
91 |
</div>
|
|
|
92 |
<?php endif;?>
|
|
|
93 |
|
|
|
94 |
<?php if(isset($deal['link4']) && !empty($deal['link4'])):?>
|
|
|
95 |
<div class="text-small" );?>
|
|
|
96 |
<?php echo $deal['link4'];?>
|
|
|
97 |
</div>
|
|
|
98 |
<?php endif;?>
|
|
|
99 |
|
|
|
100 |
<?php if(isset($deal['link5']) && !empty($deal['link5'])):?>
|
|
|
101 |
<div class="text-small" );?>
|
|
|
102 |
<?php echo $deal['link5'];?>
|
|
|
103 |
</div>
|
|
|
104 |
<?php endif;?>
|
|
|
105 |
|
|
|
106 |
</div>
|
|
|
107 |
<?php if($key==0):?>
|
|
|
108 |
<div class="col-xs-2 pull-right product_actions">
|
|
|
109 |
<ul class="list-unstyled">
|
|
|
110 |
<li data-id="<?php echo $deal['_id'];?>" class="likedeal <?php if(isset($likedDeals[$deal['_id']])):?>active<?php endif;?>">
|
|
|
111 |
</li>
|
|
|
112 |
<li data-id="<?php echo $deal['_id'];?>" class="dislikedeal <?php if(isset($disLikedDeals[$deal['_id']])):?>active<?php endif;?>">
|
|
|
113 |
</li>
|
|
|
114 |
</ul>
|
|
|
115 |
</div>
|
|
|
116 |
<?php else:?>
|
|
|
117 |
<div class="col-xs-2 pull-right viewproduct" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-url="<?php echo $deal['marketPlaceUrl'];?>" data-price="<?php echo intval($deal['available_price']);?>">
|
|
|
118 |
<span class="pull-right arrowright"></span>
|
|
|
119 |
</div>
|
|
|
120 |
<?php endif;?>
|
|
|
121 |
</div>
|
|
|
122 |
|
|
|
123 |
|
|
|
124 |
<!-- <dealObject part end here> -->
|
|
|
125 |
|
|
|
126 |
|
|
|
127 |
|
|
|
128 |
|
|
|
129 |
|
|
|
130 |
|
|
|
131 |
|
|
|
132 |
|
|
|
133 |
<?php else:?>
|
| 17693 |
naman |
134 |
<?php //debug($deal);?>
|
| 17762 |
naman |
135 |
|
| 17640 |
naman |
136 |
<div class="subcard">
|
| 16098 |
anikendra |
137 |
<div class="col-xs-4 productthumb viewproduct" data-id="<?php echo $deal['_id'];?>" data-url="<?php echo $deal['marketPlaceUrl'];?>" data-source="<?php echo $deal['source_id'];?>" data-price="<?php echo intval($deal['available_price']);?>">
|
|
|
138 |
<?php if($key == 0):?>
|
| 17760 |
amit.gupta |
139 |
<img src="<?php echo $base_url;?>app/webroot/timthumb.php?src=<?php echo urlencode ($deal['thumbnail']);?>&h=100" />
|
| 16098 |
anikendra |
140 |
<?php endif;?>
|
| 14795 |
anikendra |
141 |
</div>
|
| 17640 |
naman |
142 |
|
|
|
143 |
|
|
|
144 |
|
| 16098 |
anikendra |
145 |
<div class="col-xs-6 <?php if($key == 0):?>productdetails<?php else:?>productsmalldetails<?php endif;?>" data-id="<?php echo $deal['_id'];?>">
|
|
|
146 |
<?php if($key == 0):?>
|
| 16484 |
anikendra |
147 |
<h5 class="producttitle viewproduct" data-id="<?php echo $deal['_id'];?>" data-url="<?php echo $deal['marketPlaceUrl'];?>" data-source="<?php echo $deal['source_id'];?>" data-price="<?php echo intval($deal['available_price']);?>">
|
|
|
148 |
<?php echo $deal['source_product_name'];?>
|
|
|
149 |
</h5>
|
| 16403 |
anikendra |
150 |
<div class="viewproduct <?php if(strlen(strip_tags($deal['tagline'],'<p>')) == strlen($deal['tagline'])):?>product_short_description<?php endif;?> <?php if(!isset($deal['tagline'])):?>hidden<?php endif;?>" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-url="<?php echo $deal['marketPlaceUrl'];?>" data-price="<?php echo intval($deal['available_price']);?>">
|
| 17193 |
anikendra |
151 |
<?php //echo $deal['tagline'];?>
|
| 17188 |
naman |
152 |
<?php
|
|
|
153 |
$str1=preg_replace('/<\/p>/i', '', $deal['tagline']);
|
| 17193 |
anikendra |
154 |
if($str1 != $deal['tagline']) {
|
| 17188 |
naman |
155 |
$str=preg_replace('/<p[^>]*>/i', '', $str1);
|
|
|
156 |
echo $str;
|
| 17193 |
anikendra |
157 |
} else {
|
| 17188 |
naman |
158 |
echo $deal['tagline'];
|
|
|
159 |
}
|
|
|
160 |
?>
|
| 13944 |
anikendra |
161 |
</div>
|
| 16098 |
anikendra |
162 |
<?php endif;?>
|
| 17598 |
naman |
163 |
|
| 17696 |
naman |
164 |
<?php if((isset($deal['showMrp']) && ($deal['showMrp']==1) && isset($deal['mrp']) && ($deal['mrp']>0))) :?>
|
|
|
165 |
<div class="text-small">
|
| 17693 |
naman |
166 |
|
|
|
167 |
<?php if(isset($deal['showMrp']) && ($deal['showMrp']==1) && isset($deal['mrp']) && ($deal['mrp']>0)):?>
|
|
|
168 |
<?php if(isset($deal['quantity']) && $deal['quantity']>1):?>
|
| 17762 |
naman |
169 |
MRP <span class="cashbackrupee"></span> <?php echo round(($deal['mrp']/$deal['quantity']), 2);?>/- per unit.
|
|
|
170 |
<!-- (Total <span class="cashbackrupee"></span> <?php //echo $deal['mrp']?>) -->
|
| 17693 |
naman |
171 |
<?php else:?>
|
| 17696 |
naman |
172 |
MRP <span class="cashbackrupee"></span><span style="font-size:14px; color:#ff0000"><strong><?php echo $deal['mrp'];?></strong></span>
|
| 17693 |
naman |
173 |
<?php endif;?>
|
|
|
174 |
<?php endif;?>
|
|
|
175 |
|
| 17598 |
naman |
176 |
</div>
|
| 17693 |
naman |
177 |
<?php endif;?>
|
| 17598 |
naman |
178 |
|
| 17693 |
naman |
179 |
|
| 17696 |
naman |
180 |
<?php if(isset($deal['ppq']) && !empty($deal['ppq']) &&($deal['ppq']>0)):?>
|
|
|
181 |
<div class="text-small" );?>
|
|
|
182 |
<span class="rupee"></span><span style="font-size:14px; color:#ff0000"><strong><?php echo $deal['ppq'];?></strong></span> /- per unit.
|
|
|
183 |
</div>
|
|
|
184 |
<?php endif;?>
|
| 17693 |
naman |
185 |
|
| 16471 |
anikendra |
186 |
<div <?php if(!empty($deal['coupon'])):?>style="margin:0 !important"<?php endif;?> class="product_prices viewproduct" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-url="<?php echo $deal['marketPlaceUrl'];?>" data-price="<?php echo intval($deal['available_price']);?>" <?php if($key > 0):?>style='margin:0;'<?php endif;?>>
|
| 16098 |
anikendra |
187 |
<div>
|
| 16471 |
anikendra |
188 |
<?php if($key == 0 && isset($deal['showDp']) && $deal['showDp']==1 && !empty($deal['dp'])):?>
|
| 16246 |
anikendra |
189 |
<div class="dp">DP <span class="cashbackrupee"></span> <?php echo $deal['dp'];?></div>
|
| 16234 |
anikendra |
190 |
<?php endif;?>
|
| 16484 |
anikendra |
191 |
<span class="rupee"></span>
|
|
|
192 |
<?php if(isset($deal['gross_price']) && $deal['gross_price']>$deal['available_price']):?>
|
|
|
193 |
<span class="red pt2"><?php echo intval($deal['gross_price']);?></span>
|
|
|
194 |
<?php else:?>
|
|
|
195 |
<span class="product_price"><?php echo intval($deal['available_price']);?></span>
|
|
|
196 |
<?php endif;?>
|
| 16098 |
anikendra |
197 |
<?php if(isset($deal['cash_back_type']) && !empty($deal['cash_back_type']) && $deal['cash_back_type']!=0 && $deal['cash_back']>0):?> +
|
|
|
198 |
<?php if($deal['cash_back_type'] == 2):?>
|
| 16471 |
anikendra |
199 |
<span class="cashbackrupee"></span> <span class="cashback"><?php echo $deal['cash_back'];?></span>
|
| 16098 |
anikendra |
200 |
<?php else:?>
|
|
|
201 |
<?php echo $deal['cash_back'];?> %
|
|
|
202 |
<?php endif;?>
|
|
|
203 |
Cashback
|
|
|
204 |
<?php endif;?>
|
|
|
205 |
</div>
|
|
|
206 |
</div>
|
| 16484 |
anikendra |
207 |
<?php if(isset($deal['gross_price']) && $deal['gross_price']>$deal['available_price']):?>
|
| 16533 |
anikendra |
208 |
<div class="text-small viewproduct" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-url="<?php echo $deal['marketPlaceUrl'];?>" data-price="<?php echo intval($deal['available_price']);?>">
|
| 16484 |
anikendra |
209 |
Paytm cashback <?php echo ($deal['gross_price']-$deal['available_price']);?><br/> Net Price = <span class='product_price'><span class="rupee"></span> <?php echo $deal['available_price'];?></span>
|
| 16467 |
anikendra |
210 |
</div>
|
|
|
211 |
<?php endif;?>
|
| 16098 |
anikendra |
212 |
<?php if(isset($deal['coupon']) && !empty($deal['coupon'])):?>
|
| 16533 |
anikendra |
213 |
<div class="text-small viewproduct" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-url="<?php echo $deal['marketPlaceUrl'];?>" data-price="<?php echo intval($deal['available_price']);?>">
|
| 16098 |
anikendra |
214 |
Use Coupon <span class="red"><?php echo $deal['coupon'];?></span>
|
|
|
215 |
</div>
|
|
|
216 |
<?php endif;?>
|
|
|
217 |
<?php if(isset($deal['codAvailable']) && !$deal['codAvailable']):?>
|
| 16533 |
anikendra |
218 |
<div class="text-small viewproduct" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-url="<?php echo $deal['marketPlaceUrl'];?>" data-price="<?php echo intval($deal['available_price']);?>">
|
| 16098 |
anikendra |
219 |
(COD not available)
|
|
|
220 |
</div>
|
| 16191 |
anikendra |
221 |
<?php else:?>
|
|
|
222 |
<?php if($key!=0):?>
|
| 16533 |
anikendra |
223 |
<div class="text-small viewproduct" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-url="<?php echo $deal['marketPlaceUrl'];?>" data-price="<?php echo intval($deal['available_price']);?>">
|
| 16191 |
anikendra |
224 |
(COD available)
|
|
|
225 |
</div>
|
|
|
226 |
<?php endif;?>
|
| 16098 |
anikendra |
227 |
<?php endif;?>
|
| 17640 |
naman |
228 |
|
|
|
229 |
|
| 16098 |
anikendra |
230 |
<div class="dealoffer <?php if(!isset($deal['offer']) || empty($deal['offer'])):?>hidden<?php endif;?> row">
|
| 16403 |
anikendra |
231 |
<div class="<?php if(strlen(strip_tags($deal['offer'],'<p>')) == strlen($deal['offer'])):?>offerhasnohtml<?php endif;?> col-xs-12 offertext" data-fulltext="<?php echo strip_tags($deal['offer']);?>">
|
|
|
232 |
<?php //echo $this->Text->truncate($deal['offer'],140);?>
|
| 17177 |
naman |
233 |
<?php
|
|
|
234 |
if(strlen($deal['offer'])>0){
|
|
|
235 |
echo $deal['offer'];
|
|
|
236 |
}
|
|
|
237 |
else if($deal['source_id'] == 4){
|
|
|
238 |
echo "Exclusive price @ProfitMandi";
|
|
|
239 |
}
|
|
|
240 |
?>
|
| 16098 |
anikendra |
241 |
</div>
|
| 17177 |
naman |
242 |
|
| 17598 |
naman |
243 |
</div>
|
|
|
244 |
<!-- New Field started -->
|
|
|
245 |
|
|
|
246 |
<!-- <a href="#" title="See Video" id="uvideo">See Video</a> -->
|
|
|
247 |
|
|
|
248 |
|
| 17640 |
naman |
249 |
<!-- <div><a href="<?php //echo $this->Html->url(array('controller'=>'store_products','action'=>'getmoredeals',$deal['brand'])) ?>">See more <?php //echo $deal['brand'];?>items.</a> </div> -->
|
| 17598 |
naman |
250 |
|
| 17640 |
naman |
251 |
<!-- <div><a href= '<?php //echo $base_url;?>storeproducts/getmoredeals/<?php //echo $deal['brand']?>'>See more <?php //echo $deal['brand'];?>items.</a> </div> -->
|
| 17645 |
naman |
252 |
|
|
|
253 |
|
| 17598 |
naman |
254 |
<?php if(isset($deal['videoLink']) && !empty($deal['videoLink'])):?>
|
| 17640 |
naman |
255 |
|
| 17693 |
naman |
256 |
<div class="text-small" style = "padding-top:4px;padding-bottom:4px;">
|
| 17640 |
naman |
257 |
<button type="button" class="btn btn-default btn-sm uvideo" data-source="<?php echo $deal['videoLink'];?>">
|
| 17598 |
naman |
258 |
<span class="glyphicon glyphicon-play-circle"></span> Play Video
|
|
|
259 |
</button>
|
|
|
260 |
</div>
|
|
|
261 |
<?php endif;?>
|
| 17693 |
naman |
262 |
|
|
|
263 |
<?php if(isset($deal['filterLink']) && !empty($deal['filterLink']) && isset($deal['filterText']) && !empty($deal['filterText'])):?>
|
| 17762 |
naman |
264 |
<div class='see_more_link'>
|
|
|
265 |
<?php if(count($dealarray) >1):?>
|
|
|
266 |
<?php if($key == 1):?>
|
|
|
267 |
<a href = <?php echo $deal['filterLink'];?> style='color:#737373;'><u><?php echo $deal['filterText'];?></u></a>
|
|
|
268 |
<?php endif;?>
|
|
|
269 |
<?php else:?>
|
|
|
270 |
<a href = <?php echo $deal['filterLink'];?> style='color:#737373;'><u><?php echo $deal['filterText'];?></u></a>
|
|
|
271 |
<?php endif;?>
|
|
|
272 |
</div>
|
|
|
273 |
|
| 17693 |
naman |
274 |
<?php endif;?>
|
| 17640 |
naman |
275 |
<?php //echo $deals["category_id"]?>
|
|
|
276 |
|
| 17598 |
naman |
277 |
<!-- New Field end -->
|
| 15923 |
anikendra |
278 |
</div>
|
| 16098 |
anikendra |
279 |
<?php if($key==0):?>
|
|
|
280 |
<div class="col-xs-2 pull-right product_actions">
|
|
|
281 |
<ul class="list-unstyled">
|
|
|
282 |
<li data-id="<?php echo $deal['_id'];?>" class="likedeal <?php if(isset($likedDeals[$deal['_id']])):?>active<?php endif;?>">
|
|
|
283 |
</li>
|
|
|
284 |
<li data-id="<?php echo $deal['_id'];?>" class="dislikedeal <?php if(isset($disLikedDeals[$deal['_id']])):?>active<?php endif;?>">
|
|
|
285 |
</li>
|
|
|
286 |
</ul>
|
| 16013 |
anikendra |
287 |
</div>
|
| 16127 |
anikendra |
288 |
<?php else:?>
|
|
|
289 |
<div class="col-xs-2 pull-right viewproduct" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-url="<?php echo $deal['marketPlaceUrl'];?>" data-price="<?php echo intval($deal['available_price']);?>">
|
|
|
290 |
<span class="pull-right arrowright"></span>
|
|
|
291 |
</div>
|
| 16013 |
anikendra |
292 |
<?php endif;?>
|
| 17640 |
naman |
293 |
</div>
|
|
|
294 |
|
|
|
295 |
|
|
|
296 |
<?php endif;?>
|
|
|
297 |
|
|
|
298 |
|
|
|
299 |
|
| 16098 |
anikendra |
300 |
<?php endforeach;?>
|
|
|
301 |
</div>
|
| 16368 |
anikendra |
302 |
<?php endforeach;?>
|
| 17640 |
naman |
303 |
|
|
|
304 |
|
|
|
305 |
|
|
|
306 |
|
|
|
307 |
|
|
|
308 |
|
|
|
309 |
|
| 16368 |
anikendra |
310 |
<?php if(!$noscrolling):?>
|
|
|
311 |
<?php if($this->params->controller=='store_products'):?>
|
|
|
312 |
<p class="text-center"><a class="btn btn-primary infitescroller" href="/store_products/getdeals/?page=<?php echo $page+1;?>&sort=<?php echo $sort;?>&direction=<?php echo $direction;?><?php echo $filterstr;?>">Load More</a></p>
|
|
|
313 |
<?php else:?>
|
|
|
314 |
<p class="text-center"><a class="btn btn-primary infitescroller" href="/categories/getdeals/<?php echo $id;?>/?page=<?php echo ($page+1);?>&sort=<?php echo $sort;?>&direction=<?php echo $direction;?><?php echo $filterstr;?>">Load More</a></p>
|
| 17696 |
naman |
315 |
|
| 16368 |
anikendra |
316 |
<?php endif;?>
|
|
|
317 |
<?php endif;?>
|
| 13719 |
anikendra |
318 |
<?php else:?>
|
| 16368 |
anikendra |
319 |
<?php if($page==1):?>
|
|
|
320 |
<h4>The content you requested couldn't be found</h4>
|
|
|
321 |
<div class="text-center">
|
|
|
322 |
<button type="button" class="btn btn-xs btn-primary refresh">Retry</button>
|
|
|
323 |
</div>
|
|
|
324 |
<?php endif;?>
|
| 17193 |
anikendra |
325 |
<?php endif;?>
|
| 17693 |
naman |
326 |
|
|
|
327 |
|
|
|
328 |
|
|
|
329 |
<?php endif;?>
|