| Line 1... |
Line 1... |
| 1 |
<!-- template for deals tab -->
|
1 |
<!-- template for deals tab -->
|
| 2 |
|
- |
|
| 3 |
<script type="text/javascript">
|
2 |
<script type="text/javascript">
|
| 4 |
$(document).on('click','.morebulkprice',function(){
|
3 |
$(document).on('click','.morebulkprice',function(){
|
| 5 |
if($(this).hasClass('glyphicon-chevron-down'))
|
4 |
if($(this).hasClass('glyphicon-chevron-down'))
|
| 6 |
{
|
5 |
{
|
| 7 |
$(this).parent().parent().parent().find('.bulkpricingclass').removeClass('hidden');
|
6 |
$(this).parent().parent().parent().find('.bulkpricingclass').removeClass('hidden');
|
| Line 265... |
Line 264... |
| 265 |
<?php endif;?>
|
264 |
<?php endif;?>
|
| 266 |
|
265 |
|
| 267 |
|
266 |
|
| 268 |
|
267 |
|
| 269 |
<?php if (isset($deal['availabilityInfo'][0]['bulkPricing']) && !empty($deal['availabilityInfo'][0]['bulkPricing'])):?>
|
268 |
<?php if (isset($deal['availabilityInfo'][0]['bulkPricing']) && !empty($deal['availabilityInfo'][0]['bulkPricing'])):?>
|
| 270 |
|
- |
|
| 271 |
<?php
|
- |
|
| 272 |
usort($deal['availabilityInfo'][0]['bulkPricing'], function($a, $b) {
|
- |
|
| 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 |
}
|
- |
|
| 280 |
}
|
- |
|
| 281 |
?>
|
- |
|
| 282 |
|
- |
|
| 283 |
<div class="" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php endif;?>">
|
269 |
<div class="" data-url="<?php if($deal['source_id'] == 4):?><?php echo $base_url."categories/dealdetail/".$deal['identifier'];?><?php endif;?>">
|
| 284 |
<?php foreach($deal['availabilityInfo'][0]['bulkPricing'] AS $key => $value):?>
|
270 |
<?php foreach($deal['availabilityInfo'][0]['bulkPricing'] AS $key => $value):?>
|
| 285 |
|
271 |
|
| 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;?>>
|
272 |
<div class="<?php echo "select".$deal['availabilityInfo'][0]['item_id']."a".$value['quantity'];?> 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;?>>
|
| 287 |
<?php if(isset($deal['quantity']) && $deal['quantity']>1):?>
|
273 |
<?php if(isset($deal['quantity']) && $deal['quantity']>1):?>
|
| 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
|
274 |
<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
|
| 289 |
<?php echo $deal['quantity']*$value['quantity'];?> pcs
|
275 |
<?php echo $deal['quantity']*$value['quantity'];?> pcs
|
| 290 |
<?php else:?>
|
276 |
<?php else:?>
|
| 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
|
277 |
<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
|