Hello I have read many posts about this, and while it works its not complete.
For example; Attribute 1= shoesize and attribute 2 = shoe color. Both are in a dropdown
Here is the code get attribute name and value that that doesn't belongs to any product
$attributeCode = 'YOUR_ATTRIBUTE_CODE';
$product = Mage::getModel('catalog/product');
$productCollection = Mage::getResourceModel('eav/entity_attribute_collection')
->setEntityTypeFilter($product->getResource()->getTypeId())
->addFieldToFilter('attribute_code', $attributeCode);
$attribute = $productCollection->getFirstItem()->setEntity($product->getResource());
print_r($attribute->getData()); // print out the available attributes
$options = $attribute->getSource()->getAllOptions(false);
print_r($options); // print out attribute options
Try this:
$_pp2 = Mage::getModel('catalog/product')->load( $_product->getId() );
echo $_pp2->getdm();
in:
<?php $i=0; foreach ($_productCollection as $_product): ?>
<?php if ($i++%$_columnCount==0): ?>
Attribute Code:dm
Type: Text area
in view.phtml
echo $_product->get>getdm(); ?>
you can just config it in attribute edit page
Used in Product Listing -> Yes
Another way
$_product = Mage::getModel('catalog/product')->load($this->getProduct()->getId());
If you create an attribute like yours "shoesize" then you can access by following code.
If your attribute type Text Field ( $_product should loaded ) :
<?php
echo $_product->getShoesize();
// if your arribute was shoe_size then
echo $_product->getShoeSize();
?>
If your attribute type Multiple Select or Dropdown, to get all attribute value :
<?php
echo $_product->getAttributeText('shoesize');
?>