Subversion Repositories SmartDukaan

Rev

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

Rev 18526 Rev 18545
Line 62... Line 62...
62
		          </div>
62
		          </div>
63
		           <?php endif;?>
63
		           <?php endif;?>
64
 
64
 
65
		       <!-- bulk price started-->
65
		       <!-- bulk price started-->
66
	              <?php if (isset($deal['availabilityInfo'][0]['bulkPricing']) && !empty($deal['availabilityInfo'][0]['bulkPricing'])):?>
66
	              <?php if (isset($deal['availabilityInfo'][0]['bulkPricing']) && !empty($deal['availabilityInfo'][0]['bulkPricing'])):?>
67
			        		        
67
			        		                    
68
						<?php                                                                                                                                                                                               
-
 
69
							usort($deal['availabilityInfo'][0]['bulkPricing'], function($a, $b) { 
-
 
70
							    return $a['quantity'] > $b['quantity'] ? -1 : 1; 
-
 
71
							});            
-
 
72
							
-
 
73
							foreach($deal['availabilityInfo'][0]['bulkPricing'] as $key => $value){
-
 
74
								if($deal['availabilityInfo'][0]['maxQuantity']< $value['quantity']){
-
 
75
									unset($deal['availabilityInfo'][0]['bulkPricing'][$key]);
-
 
76
								}
-
 
77
							} 
-
 
78
							debug($deal['availabilityInfo'][0]['bulkPricing']);                                                                                                                                                                                           						   
-
 
79
						?>		            
-
 
80
			  
68
			  
81
		               <div class="" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php endif;?>">
69
		               <div class="" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php endif;?>">
82
	                    <?php foreach($deal['availabilityInfo'][0]['bulkPricing'] AS $key => $value):?>
70
	                    <?php foreach(array_reverse($deal['availabilityInfo'][0]['bulkPricing']) AS $bulkkey => $value):?>
83
	                    	
71
	                    	
84
		                      <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;?>> 
72
		                      <div class="<?php echo "select".$deal['availabilityInfo'][0]['item_id']."a".$value['quantity'];?> text-small<?php if($bulkkey >1 && $bulkkey <=  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;?>"> 
85
		                        <?php if(isset($deal['quantity']) && $deal['quantity']>1):?>
73
		                        <?php if(isset($deal['quantity']) && $deal['quantity']>1):?>
86
									<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 
74
									<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 
87
		                          <?php echo $deal['quantity']*$value['quantity'];?> pcs                      
75
		                          <?php echo $deal['quantity']*$value['quantity'];?> pcs                      
88
		                        <?php else:?>
76
		                        <?php else:?>
89
		                          <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
77
		                          <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
90
		                        <?php endif;?>
78
		                        <?php endif;?>
91
		           				<?php if($key ==1 &&  intval(sizeof($deal['availabilityInfo'][0]['bulkPricing'])) >3):?>
79
		           				<?php if($bulkkey ==1 &&  intval(sizeof($deal['availabilityInfo'][0]['bulkPricing'])) >3):?>
92
		                        	 <button type="button" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-chevron-down morebulkprice"></span></button>
80
		                        	 <button type="button" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-chevron-down morebulkprice"></span></button>
93
		                      	<?php endif;?>
81
		                      	<?php endif;?>
94
		                      </div>
82
		                      </div>
95
		                      
83
		                      
96
		                      
84