Subversion Repositories SmartDukaan

Rev

Rev 18436 | Rev 18537 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 18436 Rev 18524
Line 1... Line 1...
1
<!-- template for deals tab -->
1
<!-- template for deals tab -->
2
 
2
 
-
 
3
<script type="text/javascript">
-
 
4
$(document).on('click','.morebulkprice',function(){
-
 
5
  		if($(this).hasClass('glyphicon-chevron-down'))
-
 
6
  		{
-
 
7
  			$(this).parent().parent().parent().find('.bulkpricingclass').removeClass('hidden');
-
 
8
  			$(this).removeClass('glyphicon-chevron-down');
-
 
9
  			$(this).addClass('glyphicon-chevron-up');
-
 
10
  		}
3
<script>
11
  		else
-
 
12
  		{
-
 
13
  			$(this).parent().parent().parent().find('.bulkpricingclass').addClass('hidden');
-
 
14
  			$(this).removeClass('glyphicon-chevron-up');
-
 
15
  			$(this).addClass('glyphicon-chevron-down');
-
 
16
  		}
-
 
17
  	});
4
  $(document).ready(function(){
18
  $(document).ready(function(){
5
    $('.uvideo').click(function(){
19
    $('.uvideo').click(function(){
6
    window.history.pushState('forward', null, './forward');
20
    window.history.pushState('forward', null, './forward');
7
      var source= $(this).data('source');
21
      var source= $(this).data('source');
8
      // alert(source);
22
      // alert(source);
Line 252... Line 266...
252
 
266
 
253
 
267
 
254
 
268
 
255
		        <?php if (isset($deal['availabilityInfo'][0]['bulkPricing']) && !empty($deal['availabilityInfo'][0]['bulkPricing'])):?>
269
		        <?php if (isset($deal['availabilityInfo'][0]['bulkPricing']) && !empty($deal['availabilityInfo'][0]['bulkPricing'])):?>
256
		        		        
270
		        		        
257
<?php                                                                                                                                                                                               
271
					<?php                                                                                                                                                                                               
258
usort($deal['availabilityInfo'][0]['bulkPricing'], function($a, $b) { 
272
						usort($deal['availabilityInfo'][0]['bulkPricing'], function($a, $b) { 
259
    return $a['quantity'] > $b['quantity'] ? -1 : 1; 
273
						    return $a['quantity'] > $b['quantity'] ? -1 : 1; 
-
 
274
						});            
-
 
275
						
-
 
276
						foreach($deal['availabilityInfo'][0]['bulkPricing'] as $key => $value){
-
 
277
							if($deal['availabilityInfo'][0]['maxQuantity']< $value['quantity']){
-
 
278
								unset($deal['availabilityInfo'][0]['bulkPricing'][$key]);
-
 
279
							}
260
});                                                                                                                                                                                                        
280
						}                                                                                                                                                                                            						   
261
   
-
 
262
?>		            
281
					?>		            
263
		  
282
		  
264
                  <div class="<?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;?>">
283
	               <div class="" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php endif;?>">
265
                    <?php foreach($deal['availabilityInfo'][0]['bulkPricing'] AS $value):?>
284
                    <?php foreach($deal['availabilityInfo'][0]['bulkPricing'] AS $key => $value):?>
266
                      <div class="text-small">
285
                    	
267
                         
286
	                      <div class="text-small<?php if($key >1 && $key <=  intval(sizeof($deal['availabilityInfo'][0]['bulkPricing']))-2 && intval(sizeof($deal['availabilityInfo'][0]['bulkPricing'])) !=3):?> bulkpricingclass hidden<?php endif;?>" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php endif;?>> 
268
                        <?php if(isset($deal['quantity']) && $deal['quantity']>1):?>
287
	                        <?php if(isset($deal['quantity']) && $deal['quantity']>1):?>
269
							<span class="rupee"></span><span style="font-size:13px; color:#ff0000"><strong><?php echo ($value['price']/($deal['quantity']*$value['quantity']));?></strong></span> per unit for 
288
								<span class="rupee"></span><span style="font-size:13px; color:#ff0000"><strong><?php echo round(($value['price']/($deal['quantity']*$value['quantity'])),2);?></strong></span> per unit for 
270
                          <?php echo $deal['quantity']*$value['quantity'];?> pcs                      
289
	                          <?php echo $deal['quantity']*$value['quantity'];?> pcs                      
271
                        <?php else:?>
290
	                        <?php else:?>
272
                          <span class="rupee"></span><span style="font-size:13px; color:#ff0000"><strong><?php echo $value['price'];?></strong></span> per unit for <?php echo $value['quantity'];?> pcs
291
	                          <span class="rupee"></span><span style="font-size:13px; color:#ff0000"><strong><?php echo $value['price'];?></strong></span> per unit for <?php echo $value['quantity'];?> pcs
273
                        <?php endif;?>
292
	                        <?php endif;?>
-
 
293
	           				<?php if($key ==1 &&  intval(sizeof($deal['availabilityInfo'][0]['bulkPricing'])) >3):?>
-
 
294
	                        	 <button type="button" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-chevron-down morebulkprice"></span></button>
-
 
295
	                      	<?php endif;?>
274
                      </div>
296
	                      </div>
-
 
297
	                      
-
 
298
	                      
275
                    <?php endforeach;?>
299
                    <?php endforeach;?>
276
                 </div> 
300
                 </div> 
277
            <?php endif;?>
301
            <?php endif;?>
278
              
302
              
279
		        <?php if(isset($deal['ppq']) && !empty($deal['ppq']) &&($deal['ppq']>0)):?>
303
		        <?php if(isset($deal['ppq']) && !empty($deal['ppq']) &&($deal['ppq']>0) && isset($deal['availabilityInfo'][0]['bulkPricing']) && empty($deal['availabilityInfo'][0]['bulkPricing'])):?>
280
		           <div class="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;?>">                 
304
		           <div class="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;?>">                 
281
		              <span class="rupee"></span><span style="font-size:13px; color:#ff0000"><strong><?php echo $deal['ppq'];?></strong></span> per unit
305
		              <span class="rupee"></span><span style="font-size:13px; color:#ff0000"><strong><?php echo $deal['ppq'];?></strong></span> per unit
282
		              <?php if(isset($deal['quantity']) && $deal['quantity']>1):?>
306
		              <?php if(isset($deal['quantity']) && $deal['quantity']>1):?>
283
 
307
 
284
                      	<font style="size:12px;"><?php echo "for ".$deal['quantity']." pcs";?></font>                      
308
                      	<font style="size:12px;"><?php echo "for ".$deal['quantity']." pcs";?></font>                      
Line 290... Line 314...
290
		            <div>
314
		            <div>
291
		              <?php if($key == 0 && isset($deal['showDp']) && $deal['showDp']==1 && !empty($deal['dp'])):?>
315
		              <?php if($key == 0 && isset($deal['showDp']) && $deal['showDp']==1 && !empty($deal['dp'])):?>
292
		              <div class="dp">DP <span class="cashbackrupee"></span> <?php echo $deal['dp'];?></div>
316
		              <div class="dp">DP <span class="cashbackrupee"></span> <?php echo $deal['dp'];?></div>
293
		              <?php endif;?>
317
		              <?php endif;?>
294
		              
318
		              
-
 
319
		              <?php if(!isset($deal['availabilityInfo'][0]['bulkPricing']) || empty($deal['availabilityInfo'][0]['bulkPricing'])):?>
-
 
320
			          
295
		              <?php if(isset($deal['gross_price']) && $deal['gross_price']>$deal['available_price']):?>		                
321
			              <?php if(isset($deal['gross_price']) && $deal['gross_price']>$deal['available_price']):?>		                
296
		                <?php if(isset($deal['quantity']) && $deal['quantity']<2):?>
322
			                <?php if(isset($deal['quantity']) && $deal['quantity']<2):?>
297
		                	<span class="rupee"></span><span class="red pt2"><?php echo intval($deal['gross_price']);?></span>
323
			                	<span class="rupee"></span><span class="red pt2"><?php echo intval($deal['gross_price']);?></span>
298
		                <?php endif;?>
324
			                <?php endif;?>
299
		              <?php else:?>
325
			              <?php else:?>
300
		              <?php if(isset($deal['quantity']) && $deal['quantity']<2):?>
326
				              <?php if(isset($deal['quantity']) && $deal['quantity']<2):?>
301
		             	 <span class="rupee"></span> <span class="product_price" data-did="<?php echo $deal['_id']; ?>"><?php echo intval($deal['available_price']);?></span>
327
				             	 <span class="rupee"></span> <span class="product_price" data-did="<?php echo $deal['_id']; ?>"><?php echo intval($deal['available_price']);?></span>
-
 
328
	           	 		    
302
		              <?php endif;?>                  
329
				              <?php endif;?>                  
303
 
-
 
-
 
330
			              <?php endif;?>
304
		              <?php endif;?>
331
		              <?php endif;?>
-
 
332
 
-
 
333
		              
305
		              <?php if(isset($deal['cash_back_type']) && !empty($deal['cash_back_type']) && $deal['cash_back_type']!=0 && $deal['cash_back']>0):?>&nbsp;+
334
		              <?php if(isset($deal['cash_back_type']) && !empty($deal['cash_back_type']) && $deal['cash_back_type']!=0 && $deal['cash_back']>0):?>&nbsp;+
306
		                <?php if($deal['cash_back_type'] == 2):?>
335
		                <?php if($deal['cash_back_type'] == 2):?>
307
		                  <span class="cashbackrupee"></span> <span class="cashback"><?php echo $deal['cash_back'];?></span>   
336
		                  <span class="cashbackrupee"></span> <span class="cashback"><?php echo $deal['cash_back'];?></span>   
308
		                <?php else:?>
337
		                <?php else:?>
309
		                  <?php echo $deal['cash_back'];?> %
338
		                  <?php echo $deal['cash_back'];?> %