- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
<table>
<?php
$showShowroomsIds = array();
foreach($available_sizes as $sizeName):
$available = false;
foreach($warehouses as $warehouse) :
$uuid = $warehouse['uuid'];
$name = $warehouse['name'];
$quantity = $size_quantity[$uuid][trim($sizeName)];
if($quantity >0) {
$available = true;
}
endforeach;
if(!$available) continue;
?>
<?php
foreach($warehouses as $warehouse) :
$uuid = $warehouse['uuid'];
//echo $uuid."<br>";
if(isset($showrooms[$uuid])) {
$showShowroomsIds[$uuid] = $uuid;
}
$name = $warehouse['name'];
$quantity = $size_quantity[$uuid][trim($sizeName)];
if($quantity) {
$eshopAvailable = '';
if($uuid == $eshopUuid && $quantity > 0) $eshopAvailable = 'eshop_available=\'y\'';
$quantity = ModelCommonWarehouse::getFormattedQuantity($quantity,$uuid);
$qtA = "";
} else {
continue;
$qtA = "not-available";
$quantity = "нет в наличии";
}
?>
<tr <?php echo $eshopAvailable?> available='y'>
<td class="td">
<?php if(isset($showrooms[$uuid])):?><a href="#" class="showroom-info" uuid="<?php echo $uuid;?>" icId="uuid" rel="nofollow"><?php endif;?>
<?php echo $name?>
<!--<?php echo $uuid;?>-->
<?php if(isset($showrooms[$uuid])):?></a><?php endif;?>
</td>
<td class="qt <?php echo $qtA;?>" ><?php echo $quantity;?></td>
</tr>
<?php endforeach;?>
<tr>
<td style="height: 10px;"></td>
</tr>
<?php endforeach;?>
</table>