Subversion Repositories SmartDukaan

Rev

Rev 19375 | Rev 19682 | 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 -->
18524 naman 2
<script type="text/javascript">
18660 naman 3
$(document).on('click','.morebulkprice',function(e){
4
		e.stopPropagation();
5
  		if($(this).find('.glyphicon').hasClass('glyphicon-chevron-down'))
18524 naman 6
  		{
7
  			$(this).parent().parent().parent().find('.bulkpricingclass').removeClass('hidden');
18660 naman 8
  			$(this).find('.glyphicon').removeClass('glyphicon-chevron-down');
9
  			$(this).find('.glyphicon').addClass('glyphicon-chevron-up');
18524 naman 10
  		}
11
  		else
12
  		{
13
  			$(this).parent().parent().parent().find('.bulkpricingclass').addClass('hidden');
18660 naman 14
  			$(this).find('.glyphicon').removeClass('glyphicon-chevron-up');
15
  			$(this).find('.glyphicon').addClass('glyphicon-chevron-down');
18524 naman 16
  		}
17
  	});
17598 naman 18
  $(document).ready(function(){
18731 naman 19
 
17598 naman 20
    $('.uvideo').click(function(){
19145 naman 21
    var href = window.location.href;
22
	 window.history.pushState('forward', null, './'+href.substr(href.lastIndexOf('/') + 1));
17598 naman 23
      var source= $(this).data('source');
24
      // alert(source);
17640 naman 25
      $('#content-add').empty();
17598 naman 26
      var content = "<iframe width='100%' height='100%' src='http://www.youtube.com/embed/"+source+"?autoplay=1'></iframe>"
17640 naman 27
      $('#content-add').append(content);
18023 amit.gupta 28
      var producttitle = $(this).closest(".productdetails").find(".producttitle").html().trim();
29
      ga('send', 'event', 'Video Link Clicked', producttitle, me);
17640 naman 30
      $('#videoModal').modal('show');
17598 naman 31
    });
32
 
18370 naman 33
    if (window.history && window.history.pushState) {
34
 
35
        $(window).on('popstate', function() {
36
             $('#videoModal').modal('hide');
37
      		 $('.text-center').empty();
38
        });
39
 
40
      }
41
 
17640 naman 42
    $('.close').click(function(){
43
      $('#videoModal').modal('hide');
44
      $('.text-center').empty();
45
    });
46
 
47
    $('#videoModal').click(function(){
48
      $('#content-add').empty();
18370 naman 49
      window.history.back();
17640 naman 50
      // $('.text-center').append('<img src="/img/ajax-loader.gif"/>');
51
    });
52
 
17963 naman 53
    $('.img-overlay a').click(function(){
54
       $('#loadingModal').modal('show');
55
    });
56
 
57
    $('.objectlink a').click(function(){
58
       $('#loadingModal').modal('show');
59
    });
60
 
61
 
17762 naman 62
    $('.see_more_link a').click(function(){
18067 naman 63
      setCookie('brandschosen', '', -1, true);
64
      setCookie('subcategorieschosen','',-1, true);
65
      $('#loadingModal').modal('show');
17762 naman 66
    });
17818 manish.sha 67
    setTimeout(function () {$('.carterror').fadeOut('slow');}, 20000);
17598 naman 68
  });
17963 naman 69
 
70
 
71
 
17598 naman 72
</script>
73
 
17640 naman 74
<div class="modal fade" id="videoModal">
17598 naman 75
  <div class="modal-dialog">
76
    <div class="modal-content">      
77
      <div class="modal-body">
17640 naman 78
        <div class="text-center" id='content-add'>
79
 
17598 naman 80
        </div>        
81
      </div>      
82
    </div><!-- /.modal-content -->
83
  </div><!-- /.modal-dialog -->
84
</div>
85
 
13682 anikendra 86
<?php echo $this->element('unlikemodal');?>
17598 naman 87
 
17640 naman 88
 
17963 naman 89
 
17804 manish.sha 90
<?php if(isset($errorstr) && !empty($errorstr)):?>
91
	<div class="alert alert-warning carterror">
92
    <a href="#" class="close" data-dismiss="alert">&times;</a>
93
    <?php echo $errorstr;?>
94
</div>
95
<?php endif;?>
17640 naman 96
 
17693 naman 97
<?php if($response_count ==1 && empty($deals)):?>
98
  <div class="text-center">
99
  <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>
100
</div>
17804 manish.sha 101
<br><br><br>
17693 naman 102
<?php else:?>
17640 naman 103
 
16098 anikendra 104
<?php if(!empty($deals) && !empty($deals[0])):?>
105
    <?php foreach($deals AS $dealarray):?>
106
    <div class="row card">   
17963 naman 107
    <?php //debug($dealarray);?>
16098 anikendra 108
    <?php foreach ($dealarray as $key => $deal) :?>
19197 naman 109
    <?php //debug($deal);?>
17640 naman 110
    <?php if(empty($deal))continue;?> 
111
     <?php if (!empty($deal['dealObject'])):?>
112
 
113
 
114
     <!-- <dealobject part start here> -->
115
 
17898 naman 116
     <?php //debug($deal);?>
117
        <?php if($deal['template_id'] == 1):?>
118
          <div class="subcard">
119
            <div class="col-xs-4">
120
              <?php if($key == 0):?>
121
 
122
              <div class="img-overlay">
123
              	  <!-- <div class="product_actions like">
124
    	            <span data-id="<?php //echo $deal['_id'];?>" class="likedeal <?php //if(isset($likedDeals[$deal['_id']])):?>active<?php //endif;?>">
125
    	            </span>
126
    	          </div>  -->
17963 naman 127
 
128
 
129
 
130
                      <div class="productthumb" data-id="<?php echo $deal['_id'];?>" style="8%">
131
                        <img src="<?php echo $base_url;?>app/webroot/timthumb.php?src=<?php echo urlencode ($deal['img_url']);?>&h=100&q=95" />
132
                      </div>
133
 
17898 naman 134
 
135
    	         <!-- <div class="product_actions dislike">
136
    	            <span data-id="<?php //echo $deal['_id'];?>" class="dislikedeal <?php //if(isset($disLikedDeals[$deal['_id']])):?>active<?php //endif;?>">
137
    	            </span>
138
    	          </div>  --> 
139
    			  </div>
140
 
141
 
142
              <?php else:?>
143
    	          <span class="pull-right arrowright"></span>
144
    	        <?php endif;?>
145
            </div>
17640 naman 146
 
17963 naman 147
            <div class="col-xs-8 objectlink">
17898 naman 148
              <?php if(isset($deal['link1']) && !empty($deal['link1'])):?>
149
              <div class="text-small">
150
                <?php echo $deal['link1'];?>
151
              </div>
152
              <?php endif;?>
153
 
154
              <?php if(isset($deal['link2']) && !empty($deal['link2'])):?>
155
              <div class="text-small">
156
                <?php echo $deal['link2'];?>
157
              </div>
158
              <?php endif;?>
17640 naman 159
 
17898 naman 160
              <?php if(isset($deal['link3']) && !empty($deal['link3'])):?>
161
              <div class="text-small">
162
                <?php echo $deal['link3'];?>
163
              </div>
164
              <?php endif;?>
17640 naman 165
 
17898 naman 166
              <?php if(isset($deal['link4']) && !empty($deal['link4'])):?>
167
              <div class="text-small">
168
                <?php echo $deal['link4'];?>
169
              </div>
170
              <?php endif;?>
171
 
172
              <?php if(isset($deal['link5']) && !empty($deal['link5'])):?>
173
              <div class="text-small">
174
                <?php echo $deal['link5'];?>
175
              </div>
176
              <?php endif;?>
177
 
178
            </div>
17640 naman 179
          </div>
180
 
17898 naman 181
        <?php endif;?>
182
      <!-- <for template id 2 start here> -->
183
        <?php if($deal['template_id'] == 2):?>
184
          <div class="subcard">
185
            <div class="col-xs-12" style="padding:0px;">
186
 
187
 
188
              <div class="img-overlay" style="padding-bottom:5px;">
17963 naman 189
                <a href = "<?php echo $deal['link'];?>"><img src="<?php echo $base_url.$deal['img_url'];?>" width='100%'/></a>
17898 naman 190
                <br>
191
              </div>
192
 
193
 
194
 
195
            </div>
196
 
197
 
17640 naman 198
          </div>
199
 
17898 naman 200
        <?php endif;?>
201
      <!-- <for template id 2 ends here> -->
17640 naman 202
 
203
     <!-- <dealObject part end here> -->
17766 manish.sha 204
 
17640 naman 205
     <?php else:?>
17693 naman 206
      <?php //debug($deal);?>
17640 naman 207
        <div class="subcard">
17766 manish.sha 208
        <div class="col-xs-4 productimage">
16098 anikendra 209
          <?php if($key == 0):?>
17766 manish.sha 210
	          <div class="img-overlay">
211
	          <div class="product_actions likeit" data-id="<?php echo $deal['_id'];?>" name="likediv_<?php echo $deal['_id'];?>">
212
	            <span class="likedeal <?php if(isset($likedDeals[$deal['_id']])):?>active<?php endif;?>">
213
	            </span>
214
	          </div>
18227 naman 215
	          <div class="productthumb <?php if($deal['source_id'] == 4):?>accsproduct<?php else:?>viewproduct<?php endif;?>" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php else:?><?php echo $deal['marketPlaceUrl'];?><?php endif;?>" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-price="<?php echo intval($deal['available_price']);?>">
17835 amit.gupta 216
	          <img src="<?php echo $base_url;?>app/webroot/timthumb.php?src=<?php echo urlencode($deal['thumbnail']);?>&h=100&q=95" />
17766 manish.sha 217
	          </div>
218
	          <div class="product_actions dislikeit" data-id="<?php echo $deal['_id'];?>" name="dislikediv_<?php echo $deal['_id'];?>">
219
	            <span class="dislikedeal <?php if(isset($disLikedDeals[$deal['_id']])):?>active<?php endif;?>">
220
	            </span>
221
	          </div>
222
			  </div>
17640 naman 223
 
17766 manish.sha 224
	        <?php else:?>
225
	          <span class="pull-right arrowright"></span>
226
	        <?php endif;?>
17640 naman 227
 
17766 manish.sha 228
        </div>
17177 naman 229
 
17766 manish.sha 230
		<div class="col-xs-8 <?php if($key == 0):?>productdetails<?php else:?>productsmalldetails<?php endif;?>" data-id="<?php echo $deal['_id'];?>">
231
			<?php if($key == 0):?>
232
			<div class="product_title">
18227 naman 233
          		<h5 class="producttitle <?php if($deal['source_id'] == 4):?>accsproduct<?php else:?>viewproduct<?php endif;?>" data-id="<?php echo $deal['_id'];?>" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php else:?><?php echo $deal['marketPlaceUrl'];?><?php endif;?>" data-source="<?php echo $deal['source_id'];?>" data-price="<?php echo intval($deal['available_price']);?>">
17766 manish.sha 234
            	<?php echo $deal['source_product_name'];?>
235
          		</h5>
236
			</div>
237
 
238
			<?php endif;?>
17963 naman 239
			<div class="col-xs-6 productpricedetails" style="position:relative;min-height:70px;padding-bottom:20px;">
17766 manish.sha 240
				<?php if($key == 0):?>
18227 naman 241
				<div class="<?php if($deal['source_id'] == 4):?>accsproduct<?php else:?>viewproduct<?php endif;?> <?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 if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php else:?><?php echo $deal['marketPlaceUrl'];?><?php endif;?>" data-price="<?php echo intval($deal['available_price']);?>">
17766 manish.sha 242
	            <?php //echo $deal['tagline'];?>
243
	            <?php 
244
	                $str1=preg_replace('/<\/p>/i', '', $deal['tagline']);
245
	                if($str1 != $deal['tagline']) {
246
	                  $str=preg_replace('/<p[^>]*>/i', '', $str1);
247
	                  echo $str;
248
	                } else {
249
	                  echo $deal['tagline'];
250
	                }
251
	            ?>
252
	          	</div>
253
	          	<?php endif;?>
254
				<?php if((isset($deal['showMrp']) && ($deal['showMrp']==1) && isset($deal['mrp']) && ($deal['mrp']>0))) :?>
255
		          <div class="text-small">
256
 
257
		            <?php if(isset($deal['showMrp']) && ($deal['showMrp']==1) && isset($deal['mrp']) && ($deal['mrp']>0)):?>
258
		              <?php if(isset($deal['quantity']) && $deal['quantity']>1):?>
19147 naman 259
		                MRP &#8377; <?php echo round(($deal['mrp']/$deal['quantity']), 2);?> per unit
17963 naman 260
                    <!-- (Total <span class="cashbackrupee"></span> <?php //echo $deal['mrp']?>) -->
17766 manish.sha 261
		              <?php else:?> 
19147 naman 262
		                MRP &#8377; <?php echo $deal['mrp'];?>
17766 manish.sha 263
		              <?php endif;?>
264
		            <?php endif;?>
265
 
266
		          </div>
267
		           <?php endif;?>
18436 naman 268
 
18562 naman 269
			<?php if($key == 0 && isset($deal['showDp']) && $deal['showDp']==1 && !empty($deal['dp'])):?>
19147 naman 270
		              <div class="dp <?php if($deal['source_id'] == 4):?>accsproduct<?php else:?>viewproduct<?php endif;?>" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php else:?><?php echo $deal['marketPlaceUrl'];?><?php endif;?>" data-price="<?php echo intval($deal['available_price']);?>" style="margin-top:2px;">DP &#8377; <?php echo $deal['dp'];?></div>
18562 naman 271
		    <?php endif;?>
18660 naman 272
 
19145 naman 273
<?php if(isset($deal['source_id']) && $deal['source_id'] == 4):?>	    
18694 naman 274
	<?php foreach($deal['availabilityInfo'] as $infokey => $infoval):?>
18660 naman 275
		    <?php if (isset($infoval['bulkPricing']) && !empty($infoval['bulkPricing'])):?>		 
18711 naman 276
	               <div class="accsproduct priceshow <?php echo "priceshow".$infoval['item_id']."ps".$infokey;?> <?php if($infokey > 0):?>hidden<?php endif;?>" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php endif;?>" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-price="<?php echo intval($deal['available_price']);?>">
18660 naman 277
                    <?php foreach(array_reverse($infoval['bulkPricing']) AS $bulkkey => $value):?>
18524 naman 278
 
18660 naman 279
	                      <div class="<?php echo "select".$infoval['item_id']."a".$value['quantity'];?> text-small<?php if($bulkkey >1 && $bulkkey <=  intval(sizeof($infoval['bulkPricing']))-2 && intval(sizeof($infoval['bulkPricing'])) !=3):?> bulkpricingclass hidden<?php endif;?>" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php endif;?>"> 
280
 
281
	                        <?php if(isset($deal['quantity']) && $deal['quantity']>1):?>
282
								<span class="rupee" style="margin-top: 3px !important;"></span> <span style="font-size:13px; color:#ff0000"><strong><?php echo round(($value['price']/($deal['quantity'])),2);?></strong></span> per unit for 
283
	                          <?php
18665 naman 284
	                          	 echo $value['quantity']."+ Pack (".$deal['quantity']*$value['quantity'];
18660 naman 285
	                          	 if($value['quantity'] == 1){
286
	                          	 	echo "pc)";
287
	                          	 }
288
	                          	 else{
289
	                          	 	echo "pcs)";
290
	                          	 }
291
	                          	 ?>                       
292
	                        <?php else:?>
18676 naman 293
	                          <span class="rupee" style="margin-top: 3px !important;"></span> <span style="font-size:13px; color:#ff0000"><strong><?php echo $value['price'];?></strong></span> per unit for <?php echo $value['quantity']."+";?> 
18660 naman 294
							  <?php 
295
							  	if($value['quantity'] == 1){
296
	                          	 	echo "pc";
297
	                          	 }
298
	                          	 else{
299
	                          	 	echo "pcs";
300
	                          	 }
301
							  ?>
302
	                        <?php endif;?>
303
 
304
	           				<?php if($bulkkey ==1 &&  intval(sizeof($infoval['bulkPricing'])) >3):?>
305
	                        	 <button type="button" class="btn btn-default btn-xs morebulkprice"><span class="glyphicon glyphicon-chevron-down"></span></button>
18524 naman 306
	                      	<?php endif;?>
307
	                      </div>
308
 
309
 
18436 naman 310
                    <?php endforeach;?>
19176 naman 311
                    <div class="bulkcashback" style="padding: 0 !important;font-size: 0.8em;color: green;">
19184 naman 312
                    	<?php if(isset($deal['showNetPrice']) && $deal['showNetPrice']== 1 && isset($infoval['cash_back_type']) && !empty($infoval['cash_back_type']) && $infoval['cash_back_type']!=0 && $infoval['cash_back']>0):?>&nbsp;+
19176 naman 313
			                	<?php if($deal['cash_back_type'] == 2):?>
19184 naman 314
			                  		&#8377; <span class="cashback"><?php echo $infoval['cash_back'];?></span>   
19176 naman 315
			                	<?php else:?>
19184 naman 316
			                  		<?php echo $infoval['cash_back'];?>%
19176 naman 317
			                	<?php endif;?> 
318
			                	Cashback
319
			              <?php endif;?>
320
                    </div>
18436 naman 321
                 </div> 
18582 naman 322
                 <?php else:?>
323
                 <?php if(isset($deal['ppq']) && !empty($deal['ppq']) &&($deal['ppq']>0)):?>
18711 naman 324
		           <div class="priceshow <?php echo "priceshow".$infoval['item_id']."ps".$infokey;?> <?php if($infokey > 0):?>hidden<?php endif;?> text-small<?php if($deal['source_id'] == 4):?> accsproduct<?php endif;?>" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php endif;?>" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-price="<?php echo intval($deal['available_price']);?>">                  
18570 naman 325
		              <span class="rupee" style="margin-top: 3px !important;"></span> <span style="font-size:13px; color:#ff0000"><strong><?php echo $deal['ppq'];?></strong></span> /- per unit
326
 
17766 manish.sha 327
		            </div>
328
		          <?php endif;?>
329
 
18552 naman 330
 
18582 naman 331
				<?php if(isset($deal['quantity']) && $deal['quantity']>1 ):?>
18711 naman 332
		           <div class="priceshow <?php echo "priceshow".$infoval['item_id']."ps".$infokey;?> <?php if($infokey > 0):?>hidden<?php endif;?> text-small<?php if($deal['source_id'] == 4):?> accsproduct<?php endif;?>" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php endif;?>" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-price="<?php echo intval($deal['available_price']);?>">                 
18563 naman 333
		              <span class="rupee" style="margin-top: 3px !important;"></span> <span style="font-size:13px; color:#ff0000"><strong><?php echo ($deal['ppq']*$deal['quantity']);?></strong></span> 
18552 naman 334
		              <?php if(isset($deal['quantity']) && $deal['quantity']>1):?>
335
 
336
                      	<font style="color:black;size:12px;"><?php echo "for ".$deal['quantity']." pcs";?></font>                      
337
                      <?php endif;?>
338
		            </div>
339
		          <?php endif;?>
18582 naman 340
 
341
            <?php endif;?>
342
 
18660 naman 343
	<?php endforeach;?>	        
18694 naman 344
<?php endif;?>				
19176 naman 345
 
346
 
347
 
18552 naman 348
 
18227 naman 349
		        <div <?php if(!empty($deal['coupon'])):?>style="margin:0 !important"<?php endif;?> class="product_prices <?php if($deal['source_id'] == 4):?>accsproduct<?php else:?>viewproduct<?php endif;?>" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php else:?><?php echo $deal['marketPlaceUrl'];?><?php endif;?>" data-price="<?php echo intval($deal['available_price']);?>" <?php if($key > 0):?>style='margin:0;'<?php endif;?>>
18660 naman 350
 
18694 naman 351
		            <?php if( $deal['source_id'] == 4 && isset($deal['availabilityInfo']) && sizeof($deal['availabilityInfo'])>1):?>  
18665 naman 352
		            	<?php foreach($deal['availabilityInfo'] as $infokeyy => $infovall):?>		            		            
353
		            	<div class="priceshow <?php echo "priceshow".$infovall['item_id']."ps".$infokeyy;?> <?php if($infokeyy > 0):?>hidden<?php endif;?>"style="margin-top:0px;">
18660 naman 354
			              <?php if(!isset($infovall['bulkPricing']) || empty($infovall['bulkPricing'])):?>
19145 naman 355
 
356
 
19184 naman 357
						  	<?php if(isset($deal['showNetPrice'])&& $deal['showNetPrice']==1 && $deal['source_id'] == 4 && isset($infovall['netPriceAfterCashBack']) && $infovall['netPriceAfterCashBack']>0 && isset($infovall['cash_back_type']) && $infovall['cash_back_type'] >0 && isset($infovall['cash_back'])&& $infovall['cash_back']>0 && isset($deal['quantity']) && $deal['quantity']<2):?>
19145 naman 358
 
359
				              	<?php //if(isset($deal['netPriceAfterCashBack']) && !empty($deal['netPriceAfterCashBack'])):?>
360
								<div class = "text-small netPriceAfterCashBack <?php if($deal['source_id'] == 4):?>accsproduct<?php else:?>viewproduct<?php endif;?>" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php else:?><?php echo $deal['marketPlaceUrl'];?><?php endif;?>">		          				
19155 naman 361
			          					<span class="rupee"></span> <span style ="font-size:14px; color:#ff0000"><b><?php echo intval($infovall['netPriceAfterCashBack']);?></b></span> 
19145 naman 362
		          				</div>
363
		          				<?php //endif;?>
19149 naman 364
		          				<div style="font-size:10px;">
19184 naman 365
		          					<?php if(isset($infovall['sellingPrice']) && $infovall['sellingPrice']>0):?>		                
366
				                		<?php if(isset($deal['quantity']) && $deal['quantity']<2):?>
367
					                		<span style="color:#555">(</span><span class="" style="color:red;">&#8377; <?php echo intval($infovall['sellingPrice']);?></span>
368
					                	<?php endif;?>              
369
				              		<?php endif;?>
19145 naman 370
 
371
 
372
 
19184 naman 373
			              			<span style="color:#555;"><?php echo "less";?></span>
374
			              			<?php if(isset($infovall['cash_back_type']) && !empty($infovall['cash_back_type']) && $infovall['cash_back_type']!=0 && $infovall['cash_back']>0):?>
375
			                			<?php if($infovall['cash_back_type'] == 2):?>
376
			                  				&#8377; <span class="cashback"><?php echo $infovall['cash_back'];?></span>   
377
			                			<?php else:?>
378
			                  				<?php echo $infovall['cash_back'];?>%
379
			                			<?php endif;?> 
380
			                			<span>Cashback</span><span style="color:#555;"> )</span>
19145 naman 381
 
19184 naman 382
			              			<?php endif;?>
19145 naman 383
			              		</div>
384
 
19184 naman 385
			              	<?php else:?>            
19145 naman 386
 
387
 
388
				              <?php if(isset($infovall['sellingPrice']) && $infovall['sellingPrice']>0):?>		                
389
				                	<?php if(isset($deal['quantity']) && $deal['quantity']<2):?>
19204 naman 390
					                	<span class="rupee" style="font-size: 12px;"></span> <span style="color:red;font-size: 14px;font-weight:bold"><?php echo intval($infovall['sellingPrice']);?></span>
19145 naman 391
					                <?php endif;?>              
18660 naman 392
				              <?php endif;?>
19145 naman 393
 
394
 
19184 naman 395
						  	<?php endif;?>	              
18524 naman 396
			              <?php endif;?>
18660 naman 397
 
398
 
19145 naman 399
<!--need change start-->	
19184 naman 400
						<?php if($deal['source_id'] == 4 && isset($deal['quantity']) && $deal['quantity']>1 && $deal['showNetPrice']==1):?>							              
401
			              <?php if(isset($infovall['cash_back_type']) && !empty($infovall['cash_back_type']) && $infovall['cash_back_type']!=0 && $infovall['cash_back']>0):?>&nbsp;+
402
			                <?php if($infovall['cash_back_type'] == 2):?>
403
			                  &#8377; <span class="cashback"><?php echo $infovall['cash_back'];?></span>   
18660 naman 404
			                <?php else:?>
19184 naman 405
			                  <?php echo $infovall['cash_back'];?>%
18660 naman 406
			                <?php endif;?> 
407
			                Cashback
408
			              <?php endif;?>
19145 naman 409
			           <?php endif;?>   
410
<!--need change end-->	              
18660 naman 411
			            </div>
412
 
413
		            	<?php endforeach;?>
414
		            <?php else:?>
415
		            	<?php if(!isset($deal['availabilityInfo'][0]['bulkPricing']) || empty($deal['availabilityInfo'][0]['bulkPricing'])):?>
416
		            	<div class="" style="margin-top:0px;">
417
 
19145 naman 418
			              <?php if(isset($deal['showNetPrice'])&& $deal['showNetPrice']==1 && $deal['source_id'] == 4 && isset($deal['netPriceAfterCashBack']) && $deal['netPriceAfterCashBack'] > 0 && isset($deal['cash_back_type']) && $deal['cash_back_type'] >0 && isset($deal['cash_back'])&& $deal['cash_back']>0 && isset($deal['quantity']) && $deal['quantity']<2):?>
419
 
420
 
421
								<div class = "text-small netPriceAfterCashBack <?php if($deal['source_id'] == 4):?>accsproduct<?php else:?>viewproduct<?php endif;?>" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php else:?><?php echo $deal['marketPlaceUrl'];?><?php endif;?>">		          				
19147 naman 422
			          					<span class="rupee"></span> <span style ="font-size:14px; color:#ff0000"><b><?php echo intval($deal['netPriceAfterCashBack']);?></b></span> 
19145 naman 423
		          				</div>
424
 
19149 naman 425
		          				<div style="font-size:10px;">
19145 naman 426
		          				<?php if(isset($deal['gross_price']) && $deal['gross_price']>$deal['available_price']):?>		                
427
				                	<?php if(isset($deal['quantity']) && $deal['quantity']<2):?>
19149 naman 428
					                	<span class="" style="color:#555;">(&#8377; <?php echo intval($deal['gross_price']);?></span>
19145 naman 429
					                <?php endif;?>
430
				              	<?php else:?>
431
					              	<?php if(isset($deal['quantity']) && $deal['quantity']<2):?>
19149 naman 432
					             	 	<span style="color:#555;">(</span><span class="" style="color:red;" data-did="<?php echo $deal['_id']; ?>">&#8377; <?php echo intval($deal['available_price']);?></span>
19145 naman 433
 
434
					              	<?php endif;?>                  
435
				              	<?php endif;?>
436
 
437
 
438
								<?php if(isset($deal['quantity']) && $deal['quantity']<2):?>
19149 naman 439
			              			<span style="color:#555;"><?php echo "less";?></span>
19145 naman 440
			              			<?php if(isset($deal['cash_back_type']) && !empty($deal['cash_back_type']) && $deal['cash_back_type']!=0 && $deal['cash_back']>0):?>
441
			                			<?php if($deal['cash_back_type'] == 2):?>
19147 naman 442
			                  				&#8377; <span class="cashback"><?php echo $deal['cash_back'];?></span>   
19145 naman 443
			                			<?php else:?>
444
			                  				<?php echo $deal['cash_back'];?>%
445
			                			<?php endif;?> 
19149 naman 446
			                			<span style="font-size:10px;">Cashback</span><span style="color:#555;">)</span>
19145 naman 447
 
448
			              			<?php endif;?>
449
			              		<?php endif;?>
450
			              		</div>
451
 
452
			              <?php else:?>
453
 
18660 naman 454
				              <?php if(isset($deal['gross_price']) && $deal['gross_price']>$deal['available_price']):?>		                
455
				                <?php if(isset($deal['quantity']) && $deal['quantity']<2):?>
456
				                	<span class="rupee"></span> <span class="red pt2"><?php echo intval($deal['gross_price']);?></span>
457
				                <?php endif;?>
458
				              <?php else:?>
459
					              <?php if(isset($deal['quantity']) && $deal['quantity']<2):?>
460
					             	 <span class="rupee"></span> <span class="product_price" data-did="<?php echo $deal['_id']; ?>"><?php echo intval($deal['available_price']);?></span>
461
 
462
					              <?php endif;?>                  
463
				              <?php endif;?>
464
 
465
 
466
 
467
 
19145 naman 468
			              	<?php if(isset($deal['cash_back_type']) && !empty($deal['cash_back_type']) && $deal['cash_back_type']!=0 && $deal['cash_back']>0):?>&nbsp;+
469
			                	<?php if($deal['cash_back_type'] == 2):?>
19147 naman 470
			                  		&#8377; <span class="cashback"><?php echo $deal['cash_back'];?></span>   
19145 naman 471
			                	<?php else:?>
472
			                  		<?php echo $deal['cash_back'];?>%
473
			                	<?php endif;?> 
474
			                	Cashback
475
			              	<?php endif;?>
476
 
477
 
18660 naman 478
			              <?php endif;?>
479
			            </div>	
480
		            	<?php endif;?>
481
		            <?php endif;?>
17766 manish.sha 482
		          </div> 
483
 
484
		          <?php if(isset($deal['gross_price']) && $deal['gross_price']>$deal['available_price']):?>
18227 naman 485
		          <div class="text-small <?php if($deal['source_id'] == 4):?>accsproduct<?php else:?>viewproduct<?php endif;?>" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php else:?><?php echo $deal['marketPlaceUrl'];?><?php endif;?>" data-price="<?php echo intval($deal['available_price']);?>">
17766 manish.sha 486
		            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>
487
		          </div>
488
		          <?php endif;?>
489
 
19145 naman 490
 
491
 
492
 
17766 manish.sha 493
		          <?php if(isset($deal['coupon']) && !empty($deal['coupon'])):?>
18227 naman 494
		          <div class="text-small <?php if($deal['source_id'] == 4):?>accsproduct<?php else:?>viewproduct<?php endif;?>" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php else:?><?php echo $deal['marketPlaceUrl'];?><?php endif;?>" data-price="<?php echo intval($deal['available_price']);?>">
17766 manish.sha 495
		            Use Coupon <span class="red"><?php echo $deal['coupon'];?></span>
496
		          </div>
497
		          <?php endif;?>
498
 
499
		          <?php if(isset($deal['codAvailable']) && !$deal['codAvailable']):?>
18542 naman 500
 
18227 naman 501
		          <div class="text-small <?php if($deal['source_id'] == 4):?>accsproduct<?php else:?>viewproduct<?php endif;?>" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php else:?><?php echo $deal['marketPlaceUrl'];?><?php endif;?>" data-price="<?php echo intval($deal['available_price']);?>">
17766 manish.sha 502
		            (COD not available)
503
		          </div>
504
		          <?php else:?>
505
		            <?php if($key!=0):?>
18227 naman 506
		            <div class="text-small <?php if($deal['source_id'] == 4):?>accsproduct<?php else:?>viewproduct<?php endif;?>" data-id="<?php echo $deal['_id'];?>" data-source="<?php echo $deal['source_id'];?>" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php else:?><?php echo $deal['marketPlaceUrl'];?><?php endif;?>" data-price="<?php echo intval($deal['available_price']);?>">
17766 manish.sha 507
		              (COD available)
508
		            </div>
509
		            <?php endif;?>
510
		          <?php endif;?>
511
 
19145 naman 512
 
513
 
514
 
17766 manish.sha 515
		          <div class="dealoffer <?php if(!isset($deal['offer']) || empty($deal['offer'])):?>hidden<?php endif;?> row">
516
		              <div class="<?php if(strlen(strip_tags($deal['offer'],'<p>')) == strlen($deal['offer'])):?>offerhasnohtml<?php endif;?> offertext" data-fulltext="<?php echo strip_tags($deal['offer']);?>">              
517
		                <?php //echo $this->Text->truncate($deal['offer'],140);?>
518
		                <?php 
519
		                  if(strlen($deal['offer'])>0){
520
		                    echo $deal['offer'];
521
		                  } 
522
		                  else if($deal['source_id'] == 4){ 
523
		                    echo "Exclusive price @ProfitMandi";
524
		                  } 
525
		                ?>
526
		              </div>
527
 
528
		          </div>
18436 naman 529
 
17766 manish.sha 530
		          <?php if(isset($deal['videoLink']) && !empty($deal['videoLink'])):?>
17598 naman 531
 
17766 manish.sha 532
		          <div class="text-small" style = "padding-top:4px;padding-bottom:4px;">
533
		            <button type="button" class="btn btn-default btn-sm uvideo" data-source="<?php echo $deal['videoLink'];?>">
534
		              <span class="glyphicon glyphicon-play-circle"></span> Play Video
535
		            </button>
536
		          </div>
537
		          <?php endif;?>
538
 
17963 naman 539
 
17804 manish.sha 540
		          <?php $colors=0;
17818 manish.sha 541
		          $colorsAvailable = array();
17804 manish.sha 542
		          if($deal['source_id']==4  && isset($deal['availabilityInfo']) && count($deal['availabilityInfo']) >1){
543
		              foreach ($deal['availabilityInfo'] as $key => $value){
544
		                  if($value['color']!=''){
545
		                     $colors= $colors+1;
17818 manish.sha 546
		                     if($value['availability']>0){
547
		                     	array_push($colorsAvailable,$value);
548
		                     }
17804 manish.sha 549
		                  }
550
		              }
551
		          }
552
		          ?>
17818 manish.sha 553
		          	<?php if($colors>1 && count($colorsAvailable)>1):?>
17766 manish.sha 554
		          	  <div  class="see_more_colors" data-id="<?php echo $deal['skuBundleId']?>">
555
		             <span class="morecolors"><u>View More Colors</u></span>
556
		            </div>
17804 manish.sha 557
		          	<?php endif;?>
17963 naman 558
 
559
 
18731 naman 560
             <?php //if(isset($deal['filterLink']) && !empty($deal['filterLink']) && isset($deal['filterText']) && !empty($deal['filterText'])):?>
561
             <?php if((isset($deal['filterLinkBrand']) && !empty($deal['filterLinkBrand'])) || (isset($deal['filterLinkSubCategory']) && !empty($deal['filterLinkSubCategory']))):?>
18737 naman 562
             <?php $printcomma = 0;?>
18731 naman 563
 
564
 
19611 naman 565
               <div class='see_more_link' style='position:absolute; bottom: 0px;'>
17963 naman 566
                  <?php if(count($dealarray) >1):?>
19145 naman 567
                  	<?php if($key == 1):?>More
18731 naman 568
                  		<?php if(isset($deal['filterLinkBrand']) && !empty($deal['filterLinkBrand'])):?>
18737 naman 569
                  		<?php $printcomma = 1;?>
19611 naman 570
                  			<a href = <?php echo $deal['filterLinkBrand'];?><?php if($id == 6):?><?php echo "&whatfirst=brand" ;?><?php endif;?> style='color:#A8A5A5;'><u><?php echo $deal['filterTextBrand'];?></u></a>
18731 naman 571
                 		<?php endif;?>
572
                 		<?php if(isset($deal['filterLinkSubCategory']) && !empty($deal['filterLinkSubCategory'])):?>
18737 naman 573
                  			<?php if($printcomma == 1)
574
                  				echo ",";
575
                  			?>
19611 naman 576
                  			<a href = <?php echo $deal['filterLinkSubCategory'];?><?php if($id == 6):?><?php echo "&whatfirst=subCategory" ;?><?php endif;?> style='color:#A8A5A5;'><u><?php echo $deal['filterTextSubCategory'];?></u></a>
18731 naman 577
                 		<?php endif;?>
578
                  	<?php endif;?>
19145 naman 579
                  <?php else:?>More
18731 naman 580
                 	 <?php if(isset($deal['filterLinkBrand']) && !empty($deal['filterLinkBrand'])):?>
18737 naman 581
                  			<?php $printcomma = 1;?>
19611 naman 582
                  			<a href = <?php echo $deal['filterLinkBrand'];?><?php if($id == 6):?><?php echo "&whatfirst=brand" ;?><?php endif;?>  style='color:#A8A5A5;'><u><?php echo $deal['filterTextBrand'];?></u></a>
18731 naman 583
                 		<?php endif;?>
584
                 	<?php if(isset($deal['filterLinkSubCategory']) && !empty($deal['filterLinkSubCategory'])):?>
18737 naman 585
                  			<?php if($printcomma == 1)
586
                  				echo ",";
587
                  			?>
19611 naman 588
                  			<a href = <?php echo $deal['filterLinkSubCategory'];?><?php if($id == 6):?><?php echo "&whatfirst=subCategory" ;?><?php endif;?> style='color:#A8A5A5;'><u><?php echo $deal['filterTextSubCategory'];?></u></a>
18731 naman 589
                 		<?php endif;?>
590
                  <?php endif;?>
19611 naman 591
                </div>  
17963 naman 592
 
18731 naman 593
        	<?php endif;?>
19308 naman 594
 
595
        	<!-- offer data start here-->
19309 naman 596
        	<div style="font-size:12px;color:maroon;">
19308 naman 597
        		<?php if($offerresponse != ""):?>
598
        			<?php if( isset($offerresponse['categories_applicable']) && in_array( $deal['category_id'] ,$offerresponse['categories_applicable']) && isset($offerresponse['sub_categories_not_applicable']) && !in_array($deal['subCategoryId'] ,$offerresponse['sub_categories_not_applicable'])):?>
19375 naman 599
        				<a href="<?php echo $base_url;?>categories/target" style="color:maroon;" class="useroffers"><span class="glyphicon glyphicon-tags"></span> <u><?php echo $offerresponse['offer_description'];?></u></a>
19308 naman 600
        			<?php endif;?>
601
        		<?php endif;?>
602
        	</div>
603
        	<!-- offer data ends here-->
17766 manish.sha 604
 
605
			</div>
606
 
607
			<?php if($deal['source_id']==4):?>
17906 manish.sha 608
			<?php if(isset($deal['availabilityInfo']) && count($deal['availabilityInfo'])>0 && $deal['availabilityInfo'][0]['maxQuantity']>0):?>
17766 manish.sha 609
			<div class="col-xs-2 cartaddition">
18007 manish.sha 610
				<div class="input-group number-spinner">
17766 manish.sha 611
					<span class="input-group-btn data-up">
18660 naman 612
						<button class="btn btn-default plusqtybutton" data-minquantity="<?php echo $deal['availabilityInfo'][0]['minBuyQuantity'];?>" <?php printf('data-bulkpricing = "%s"',htmlspecialchars(json_encode($deal['availabilityInfo'][0]['bulkPricing']), ENT_QUOTES, 'UTF-8'));?> data-quantitystep="<?php echo $deal['availabilityInfo'][0]['quantityStep'];?>" data-id="<?php echo $deal['availabilityInfo'][0]['item_id'];?>" data-price="<?php echo intval($deal['availabilityInfo'][0]['sellingPrice']);?>" data-did="<?php echo $deal['_id'];?>" data-dir="up" data-name="<?php echo $deal['source_product_name'];?>" data-brand="<?php echo $deal['brand'];?>" data-identifier="<?php echo $deal['identifier']; ?>"><span class="glyphicon glyphicon-plus plusqty" ></span></button>
17766 manish.sha 613
					</span>
17950 manish.sha 614
					<input type="text" class="itemquantity" value="0" min="0" max="<?php echo $deal['availabilityInfo'][0]['maxQuantity'];?>" data-did="<?php echo $deal['_id'];?>" autocomplete="off" readonly>
17766 manish.sha 615
					<span class="input-group-btn data-dwn">
18436 naman 616
						<button class="btn btn-default minusqtybutton" data-minquantity="<?php echo $deal['availabilityInfo'][0]['minBuyQuantity'];?>" <?php printf('data-bulkpricing = "%s"',htmlspecialchars(json_encode($deal['availabilityInfo'][0]['bulkPricing']), ENT_QUOTES, 'UTF-8'));?> data-quantitystep="<?php echo $deal['availabilityInfo'][0]['quantityStep'];?>" data-id="<?php echo $deal['availabilityInfo'][0]['item_id'];?>" data-price="<?php echo intval($deal['availabilityInfo'][0]['sellingPrice']);?>" data-did="<?php echo $deal['_id'];?>" data-dir="dwn" data-name="<?php echo $deal['source_product_name'];?>" data-brand="<?php echo $deal['brand'];?>" data-identifier="<?php echo $deal['identifier']; ?>"><span class="glyphicon glyphicon-minus minusqty"></span></button>
17766 manish.sha 617
					</span>
618
				</div>
619
			</div>
620
 
17804 manish.sha 621
			<?php endif;?>	
17766 manish.sha 622
	        <?php endif;?>
623
		</div>
624
 
625
 
17640 naman 626
      </div>
17818 manish.sha 627
	<?php if($deal['source_id']==4  && isset($deal['availabilityInfo']) && count($colorsAvailable) >1 && $colors>1):?>
17766 manish.sha 628
	<div class="morecoloroptions_<?php echo $deal['skuBundleId']?> hidden"
629
		style="background: #fff;">
17804 manish.sha 630
					<div class="col-xs-2"></div>
631
					<div class="col-xs-10 button-checkbox text-left">
17818 manish.sha 632
						<?php for($i=0; $i<count($colorsAvailable); $i=$i+2){
633
								$value = $colorsAvailable[$i];
17804 manish.sha 634
							?>
18660 naman 635
			            		<button type="button" data-setsetect="<?php echo "priceshow".$value['item_id']."ps".$i;?>" class="btn btn-xs choosecolor colorbtn" data-minquantity="<?php echo $value['minBuyQuantity'];?>" <?php printf('data-bulkpricing = "%s"',htmlspecialchars(json_encode($value['bulkPricing']), ENT_QUOTES, 'UTF-8'));?> data-quantitystep="<?php echo $value['quantityStep'];?>" data-id="<?php echo $value['item_id'];?>" data-price="<?php echo $value['sellingPrice'];?>" data-did="<?php echo $deal['_id'];?>" data-color="primary" data-max="<?php echo $value['maxQuantity'];?>"><?php echo strtoupper($value['color']);?></button>
17804 manish.sha 636
			            		<?php
637
			            			$j = $i+1;
17818 manish.sha 638
			            			$value = $colorsAvailable[$j];
639
			            			if($j<count($colorsAvailable)){?>
18660 naman 640
			            			<button type="button" data-setsetect="<?php echo "priceshow".$value['item_id']."ps".$j;?>" class="btn btn-xs choosecolor colorbtn" data-minquantity="<?php echo $value['minBuyQuantity'];?>" <?php printf('data-bulkpricing = "%s"',htmlspecialchars(json_encode($value['bulkPricing']), ENT_QUOTES, 'UTF-8'));?> data-quantitystep="<?php echo $value['quantityStep'];?>" data-id="<?php echo $value['item_id'];?>" data-price="<?php echo $value['sellingPrice'];?>" data-did="<?php echo $deal['_id'];?>" data-color="primary" data-max="<?php echo $value['maxQuantity'];?>"><?php echo strtoupper($value['color']);?></button><br>	
17804 manish.sha 641
 
642
			            		<?php }?>
643
			            <?php }?>
17766 manish.sha 644
			        </div>
17804 manish.sha 645
 
17766 manish.sha 646
	</div>
17804 manish.sha 647
	<?php endif;?>
17640 naman 648
 
17766 manish.sha 649
	<?php endif;?>
17640 naman 650
 
651
 
652
 
16098 anikendra 653
      <?php endforeach;?>
654
    </div>  
16368 anikendra 655
  <?php endforeach;?>  
17640 naman 656
 
657
 
16368 anikendra 658
  <?php if(!$noscrolling):?>
659
    <?php if($this->params->controller=='store_products'):?>
660
      <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>
661
    <?php else:?>
18064 naman 662
      <!-- <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> -->
17963 naman 663
 
18064 naman 664
      <p class="text-center"><a class="btn btn-primary infitescroller" href="<?php echo $nexturl;?>">Load More</a></p>
17696 naman 665
 
17963 naman 666
 
16368 anikendra 667
    <?php endif;?>
668
  <?php endif;?>
13719 anikendra 669
  <?php else:?>
16368 anikendra 670
    <?php if($page==1):?>
671
      <h4>The content you requested couldn't be found</h4>
672
      <div class="text-center">
673
        <button type="button" class="btn btn-xs btn-primary refresh">Retry</button>
674
      </div>
675
    <?php endif;?>
17193 anikendra 676
  <?php endif;?>
17693 naman 677
 
678
 
679
 
680
<?php endif;?>