I want to display in the list.phtml attribute "New" and "Top sales" through the selection attribute yes / no. It looks like a picture in the upper left corner with the word, that is, the name, attribute. What to register, so that when yes is selected, an attribute with the desired images would appear?

    1 answer 1

    can someone help

    <?php $attribute = $_product->getResource()->getAttribute('название вашего атрибута'); ?> <?php $attribute_value = $attribute ->getFrontend()->getValue($_product); ?> <?php if ($attribute_value == 'Yes'): ?> <div>Новинка</div> <?php else: ?> <?php endif; ?>