I want to check that a product attribute equals a specified value in the product/view/list.phtml template and if so, display some html.
The current code gives no result. Can an edit be suggested to get it working in Magento 2.
CURRENT CODE
<?php if ($_helper->productAttribute($_product, $_product->getInStockMadeToOrder(), 'in_stock_made_to_order') == "This item is in stock") { ?>
<div class="listing-labels in-stock"><p>In Stock</p></div>
<?php } ?>