This is the code for listing all attributes by name
<?
global $product;
echo $product->list_attributes();?>
<?
$attributes = $product->get_attributes(); $attribute_name = ''; foreach ( $attributes as $attribute ) { $attribute_name = $attribute['name'];
echo $attribute_name; }
?>
This is code for showing the items from an attribute
$terms = get_the_terms( $product->id, 'pa_attributenameis');
foreach ( $terms as $term ) {
echo $term->name;?>
attributenameis = the name of the attribute