문제

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.

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top