| 13715 |
anikendra |
1 |
<!-- template for deals tab -->
|
| 13682 |
anikendra |
2 |
<?php echo $this->element('unlikemodal');?>
|
| 13567 |
anikendra |
3 |
<?php if(!empty($deals)):?>
|
| 13794 |
anikendra |
4 |
<?php foreach($deals AS $dealjson):?>
|
|
|
5 |
<?php $deal = json_decode($dealjson,true);?>
|
| 13936 |
anikendra |
6 |
<?php //debug($deal);?>
|
| 13715 |
anikendra |
7 |
<div class="row card">
|
| 13794 |
anikendra |
8 |
<div class="col-xs-4 productthumb viewproduct" data-id="<?php echo $deal['_id'];?>">
|
|
|
9 |
<img src="<?php echo $base_url;?>app/webroot/timthumb.php?src=<?php echo $deal['thumbnail'];?>&h=100" />
|
| 13715 |
anikendra |
10 |
</div>
|
| 14215 |
anikendra |
11 |
<div class="col-xs-6 productdetails" data-id="<?php echo $deal['_id'];?>">
|
|
|
12 |
<h5 class="producttitle viewproduct" data-id="<?php echo $deal['_id'];?>"><?php echo $deal['source_product_name'];?></h5>
|
|
|
13 |
<div class="viewproduct product_short_description <?php if(!isset($deal['tagline'])):?>hidden<?php endif;?>" data-id="<?php echo $deal['_id'];?>"><?php echo $deal['tagline'];?></div>
|
|
|
14 |
<div class="product_prices viewproduct" data-id="<?php echo $deal['_id'];?>">
|
| 13937 |
anikendra |
15 |
<div><span class="rupee"></span><span class="product_price"><?php echo $deal['available_price'];?></span>
|
|
|
16 |
<?php if(isset($deal['cash_back_type']) && !empty($deal['cash_back_type']) && $deal['cash_back_type']!=0):?> +
|
| 13936 |
anikendra |
17 |
<?php if($deal['cash_back_type'] == 2):?>
|
|
|
18 |
<span class="cashbackrupee"></span> <span class="cashback"><?php echo $deal['cash_back'];?></span></div>
|
|
|
19 |
<?php else:?>
|
| 13937 |
anikendra |
20 |
<?php echo $deal['cash_back'];?> %
|
|
|
21 |
<?php endif;?> Cashback
|
| 13936 |
anikendra |
22 |
<?php endif;?>
|
| 13944 |
anikendra |
23 |
</div>
|
| 13717 |
anikendra |
24 |
</div>
|
| 13794 |
anikendra |
25 |
<div class="dealoffer <?php if(!isset($deal['offer']) || empty($deal['offer'])):?>hidden<?php endif;?> row">
|
| 14215 |
anikendra |
26 |
<!-- <div class="col-xs-3 offerlabel">
|
| 13715 |
anikendra |
27 |
OFFER
|
| 14215 |
anikendra |
28 |
</div> -->
|
|
|
29 |
<div class="<?php if(strlen($deal['offer'])>140):?>hasmoretext<?php endif;?> col-xs-12 offertext" data-fulltext="<?php echo $deal['offer'];?>">
|
|
|
30 |
<?php echo $this->Text->truncate($deal['offer'],140);?>
|
| 13715 |
anikendra |
31 |
</div>
|
|
|
32 |
</div>
|
|
|
33 |
</div>
|
| 13717 |
anikendra |
34 |
<div class="col-xs-2 pull-right product_actions">
|
| 13719 |
anikendra |
35 |
<ul class="list-unstyled">
|
| 13794 |
anikendra |
36 |
<li data-id="<?php echo $deal['_id'];?>" class="likedeal <?php if(isset($likedDeals[$deal['_id']])):?>active<?php endif;?>">
|
| 13567 |
anikendra |
37 |
</li>
|
| 13794 |
anikendra |
38 |
<li data-id="<?php echo $deal['_id'];?>" class="dislikedeal <?php if(isset($disLikedDeals[$deal['_id']])):?>active<?php endif;?>">
|
| 13567 |
anikendra |
39 |
</li>
|
|
|
40 |
</ul>
|
|
|
41 |
</div>
|
|
|
42 |
</div>
|
|
|
43 |
<?php endforeach;?>
|
| 13719 |
anikendra |
44 |
<?php if($this->params->controller=='store_products'):?>
|
| 13815 |
anikendra |
45 |
<p class="text-center"><a class="btn btn-primary" href="/store_products/getdeals/?page=<?php echo $page+1;?>&sort=<?php echo $sort;?>&direction=<?php echo $direction;?>">Load More</a></p>
|
| 13719 |
anikendra |
46 |
<?php else:?>
|
| 13815 |
anikendra |
47 |
<p class="text-center"><a class="btn btn-primary" href="/categories/getdeals/<?php echo $id;?>/?page=<?php echo ($page+1);?>&sort=<?php echo $sort;?>&direction=<?php echo $direction;?>">Load More</a></p>
|
| 13719 |
anikendra |
48 |
<?php endif;?>
|
| 13984 |
anikendra |
49 |
<?php else:?>
|
|
|
50 |
<h4>The content you requested couldn't be found</h4>
|
| 14150 |
anikendra |
51 |
<div class="text-center">
|
|
|
52 |
<button type="button" class="btn btn-xs btn-primary refresh">Retry</button>
|
|
|
53 |
</div>
|
| 13719 |
anikendra |
54 |
<?php endif;?>
|