- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2019
05:18 AM
09-19-2019
05:18 AM
How restrict empty attribute values display?
Don't show empty attribute values,
<?php $_helper = $this->helper('catalog/output'); $_product = $this->getProduct() ?> <?php if ($_additional = $this->getAdditionalData()) : ?> <!-- <h2><?php echo $this->__('Additional Information') ?></h2> --> <div class="box-collateral-content"> <table class="data-table" id="product-attribute-specs-table"> <col width="25%" /> <col /> <tbody> <?php foreach ($_additional as $_data) : ?> <tr> <th class="label"><?php echo $this->htmlEscape($this->__($_data['label'])) ?></th> <td class="data"><?php echo $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?></td> </tr> <?php endforeach; ?> </tbody> </table> <script type="text/javascript"> decorateTable('product-attribute-specs-table') </script> </div> <?php endif; ?>
Now all attributes display like with attributes values or without attributes values, how to add condition like display only with attributes value only.
screenshot :
Labels:
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2019
05:29 AM
09-19-2019
05:29 AM
Re: How restrict empty attribute values display?
done :
<?php if ((string) $_data['value'] != '' and $_data['value'] != 'N/A' and $_data['value'] != 'No') : ?>