I have successfully display all collection of products and product attribute value from a specific category ID. However I can't figure out how to display the product attribute label. The attribute labels are hard coded but I want it to be auto generated.
How can I display all product attribute value and their respective labels that are allowed to be seen on frontend?
So far this is what I've got
<?php
$idValue = 10;
$catagory_model = Mage::getModel('catalog/category')->load($idValue); //where $category_id is the id of the category
$collection = Mage::getResourceModel('catalog/product_collection');
$collection->addCategoryFilter($catagory_model); //category filter
$collection->addAttributeToFilter('status',1); //only enabled product
$collection->addAttributeToSelect('*'); //add product attribute to be fetched
$collection->addStoreFilter();
?>
<table class="full-width-tbl">
<thead>
<tr>
<th>Part Number</th>
<th>Model</th>
</tr>
</thead>
<tbody>
<?php foreach ($collection as $_product): ?>
<tr itemscope itemtype="http://schema.org/IndividualProduct">
<td itemprop="name" style="display:none;"><?php echo $_product->getPart_number() ?></td>
<td itemprop="sku"><?php echo $_product->getModel() ?></td>
</tr>
<?php endforeach ?>
</tbody>
</table>