Subversion Repositories SmartDukaan

Rev

Rev 16127 | Rev 16191 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
13715 anikendra 1
<!-- template for deals tab -->
13682 anikendra 2
<?php echo $this->element('unlikemodal');?>
16098 anikendra 3
<?php if(!empty($deals) && !empty($deals[0])):?>
4
    <?php foreach($deals AS $dealarray):?>
5
    <div class="row card">   
6
    <?php foreach ($dealarray as $key => $deal) :?>
7
    <?php if(empty($deal))continue;?>
8
    <?php //debug($deal);continue;?>
9
      <div class="subcard">
10
        <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']);?>">
11
          <?php if($key == 0):?>
12
          <img src="<?php echo $base_url;?>app/webroot/timthumb.php?src=<?php echo $deal['thumbnail'];?>&h=100" />
13
          <?php endif;?>
14795 anikendra 14
        </div>
16098 anikendra 15
        <div class="col-xs-6 <?php if($key == 0):?>productdetails<?php else:?>productsmalldetails<?php endif;?>" data-id="<?php echo $deal['_id'];?>">
16
          <?php if($key == 0):?>
17
          <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']);?>"><?php echo $deal['source_product_name'];?></h5>
18
          <div class="viewproduct product_short_description <?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']);?>">
19
            <?php echo $deal['tagline'];?>
13944 anikendra 20
          </div>
16098 anikendra 21
          <?php endif;?>
16132 anikendra 22
          <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']);?>">
16098 anikendra 23
            <div>
24
              <span class="rupee"></span><span class="product_price"><?php echo intval($deal['available_price']);?></span>
25
              <?php if(isset($deal['cash_back_type']) && !empty($deal['cash_back_type']) && $deal['cash_back_type']!=0 && $deal['cash_back']>0):?>&nbsp;+
26
                <?php if($deal['cash_back_type'] == 2):?>
27
                  <span class="cashbackrupee"></span> <span class="cashback"><?php echo $deal['cash_back'];?></span>          
28
                <?php else:?>
29
                  <?php echo $deal['cash_back'];?> %
30
                <?php endif;?> 
31
                Cashback
32
              <?php endif;?>
33
            </div>
34
          </div> 
35
          <?php if(isset($deal['coupon']) && !empty($deal['coupon'])):?>
36
          <div class="text-small">
37
            Use Coupon <span class="red"><?php echo $deal['coupon'];?></span>
38
          </div>
39
          <?php endif;?>
40
          <?php if(isset($deal['codAvailable']) && !$deal['codAvailable']):?>
41
          <div class="text-small">
42
            (COD not available)
43
          </div>
44
          <?php endif;?>
45
          <div class="dealoffer <?php if(!isset($deal['offer']) || empty($deal['offer'])):?>hidden<?php endif;?> row">
46
              <!-- <div class="col-xs-3 offerlabel">
47
                OFFER
48
              </div> -->
49
              <div class="<?php if(strlen($deal['offer'])>140):?>hasmoretext<?php endif;?> col-xs-12 offertext" data-fulltext="<?php echo $deal['offer'];?>">              
50
                <?php echo $this->Text->truncate($deal['offer'],140);?>
51
              </div>
52
          </div>  
15923 anikendra 53
        </div>
16098 anikendra 54
        <?php if($key==0):?>
55
        <div class="col-xs-2 pull-right product_actions">
56
          <ul class="list-unstyled">
57
            <li data-id="<?php echo $deal['_id'];?>" class="likedeal <?php if(isset($likedDeals[$deal['_id']])):?>active<?php endif;?>">
58
            </li>
59
            <li data-id="<?php echo $deal['_id'];?>" class="dislikedeal <?php if(isset($disLikedDeals[$deal['_id']])):?>active<?php endif;?>">
60
            </li>
61
          </ul>
16013 anikendra 62
        </div>
16127 anikendra 63
        <?php else:?>
64
        <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']);?>">
65
          <span class="pull-right arrowright"></span>
66
        </div>
16013 anikendra 67
        <?php endif;?>
16098 anikendra 68
      </div>       
69
      <?php endforeach;?>
70
    </div>  
13567 anikendra 71
  <?php endforeach;?>    
13719 anikendra 72
  <?php if($this->params->controller=='store_products'):?>
15026 anikendra 73
    <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>
13719 anikendra 74
  <?php else:?>
15026 anikendra 75
    <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>
13719 anikendra 76
  <?php endif;?>
13984 anikendra 77
<?php else:?>
15026 anikendra 78
  <?php if($page==1):?>
79
    <h4>The content you requested couldn't be found</h4>
80
    <div class="text-center">
81
      <button type="button" class="btn btn-xs btn-primary refresh">Retry</button>
82
    </div>
83
  <?php endif;?>
13719 anikendra 84
<?php endif;?>