Magento Color Attribute Swatches Implementation
<ol> | |
<?php foreach ($this->getItems() as $_item): ?> | |
<li> | |
<?php if ($_item->getCount() > 0): ?> | |
// Add attribute option image before label | |
<?php if($_item->getName() == "Color") : ?> | |
<img src="<?php echo Mage::helper('attributeoptionimage')->getAttributeOptionImage($_item->getValue()); ?>" alt="" /> | |
<?php endif; ?> | |
<a href="<?php echo $this->urlEscape($_item->getUrl()) ?>"><?php echo $_item->getLabel() ?></a> | |
<?php else: echo $_item->getLabel() ?> | |
<?php endif; ?> | |
(<?php echo $_item->getCount() ?>) | |
</li> | |
<?php endforeach ?> | |
</ol> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment