Hi,
I'm using Magento version 1.9.3.4. How can I stop attributes showing at all instead of it saying NO/N/a there's no attribute attached to a product?
Kind regards
Try going to the Manage Attributes interface in admin and finding the attributes you wish to hide. Then change the "Visible on Product View Page on Front-end" setting to no.
http://docs.magento.com/m1/ee/user_guide/catalog/attribute-frontend-properties.html
Sorry how do I do that? kind regards?
This is the line that outputs the product attribute table values: https://github.com/OpenMage/magento-mirror/blob/magento-1.9/app/design/frontend/base/default/templat...
HI, I've just noticed the theme I applied the coding is the below? Do I need to add anything to the code?
<?php
/**
* @package artichoke
* @copyright Copyright (c) 2010-2015 MeigeeTeam. (http://www.meigeeteam.com)
*/
/**
* Product additional attributes template
*
* @see Mage_Catalog_Block_Product_View_Attributes
*/
?>
<?php
$_helper = $this->helper('catalog/output');
$_product = $this->getProduct()
?>
<?php if($_additional = $this->getAdditionalData()): ?>
<h2><?php echo $this->__('Additional Information') ?></h2>
<table class="table table-responsive table-bordered" id="product-attribute-specs-table">
<tbody>
<?php foreach ($_additional as $_data): ?>
<tr>
<th class="label"><?php echo (Mage::app()->getLayout()->checkVersion('1.7.x.x') ? $this->htmlEscape : $this->escapeHtml).($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>
<?php endif;?>
It will be much the same. Inside the for loop, you will want to check the value of $_data['value'] and only output lines within the for loop if they're not equal to N/A or false.