Kod: Zaznacz cały
<?PHP
$sizes = array();
if($_product->isConfigurable()){
$allProducts = $_product->getTypeInstance(true)->getUsedProducts(null, $_product);
foreach ($allProducts as $subproduct) {
if ($subproduct->isSaleable()) {
$sizes[] = $subproduct->getAttributeText('size');
}
}
if(count($sizes)>0) {
sort($sizes);
?>
Sizes: <? echo implode(", ", $sizes);
}
}
?>