Posted By

nico65 on 11/16/09


Tagged

attribute magento


Versions (?)

display a single specific product attribute.


 / Published in: PHP
 

URL: http://snippi.net/magento-display-specific-product-attribute

  1. <?php echo $_product->getResource()->getAttribute('attribute name')->getFrontend()->getValue($_product) ?>
  2.  
  3. //text
  4. <?php echo $_product->getExtras() ?>
  5.  
  6. //dropdown
  7. <?php echo $_product->getAttributeText('extras') ?>
  8.  
  9. <?php $oa_herstellerland = $_product->getData('oa_herstellerland');
  10. if (trim($oa_herstellerland) != '') { ?>
  11. <li class="<?php echo $_product->getResource()->getAttribute('oa_herstellerland')->getAttributeCode($_product) ?>">
  12. <div class="label"><?php echo $_product->getResource()->getAttribute('oa_herstellerland')->getFrontend()->getStoreLabel($_product) ?></div>
  13. <div class="infotxt">
  14. <?php echo nl2br($oa_herstellerland); ?>
  15. </div>
  16. </li>
  17. <?php } ?>

Report this snippet  

You need to login to post a comment.