I use this code to display one attribute in frontend:
<?php
$optionText = '';
$attr = $_product->getResource()->getAttribute('newbrand_name');
if ($attr->usesSource()) {
$optionText = $attr->getSource()->getOptionText($_product->getNewbrandName());
}
?>
<?php if($optionText){ ?>
<div class="attributes-list"><?php echo "Producent: " ?><?php echo $optionText ?></div>
<?php } ?>
Working correctly.
Can anyone help me modify this code to display two additional attributes? Color and Gender from attribute code:
color
gender