I am trying to place a text icon on relevant product listing images based on an attribute value ('In Stock'). Can anyone tell me where I am going wrong, as I am crashing the page with the current code.


<?php if($_product->getAttributeText('in_stock')==$this->_('In Stock')): ?>
 <div class="product-img-icon-quick">IN STOCK</div>
<?php endif; ?>

The code above is being placed in the relevant area of list.phtml


This was as simple as missing the __ double underscore in the php code above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.