Magento Color Attribute Swatches Implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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