title: PHP Display Magento Yes/No Attribut if Value is Yes and display an jpg instead of "yes"
body: <p>I would like to display Yes/No Attributes in my view.phtml. I tried some codes but none is working.</p>
  
  <p>Firstly I tried this syntax, which I found only and which is working for Attributes with Text-Values:</p>
  
  <pre><code>&lt;?php 
    if ($_product-&gt;getAn_342() != null &amp;&amp; $_product-&gt;getAn_342() != "") {
      echo $this-&gt;__('Deliveryinformation'); 
      echo  $_product-&gt;getAn_342(); 
    } 
  ?&gt;
  </code></pre>
  
  <p>This does not work for Attributes with yes/no Values. With this syntax there is displayed the Magento-ID of the Attribut but not the Value.</p>
  
  <p>Next I tried this Syntax, which I found here in this forum:</p>
  
  <pre><code>&lt;?php 
        if ($_product-&gt;getAttributeText($_data['An_56']) == "Yes"): 
   ?&gt;
  </code></pre>
  
  <p>But this does not work as well.</p>
  
  <p>For explanation:
  One Attribut i want to display would be "Bestseller". The Attribut has Label "<strong>an_bestsller</strong>" and code "<strong>an_56</strong>", which will be the <strong>magento-Id</strong>.</p>
  
  <p>So what exactly is wrong with that yes/no syntax above? Some help would be great.</p>