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