Reputation: 1633
I'd like to show all the attributes of a simple product in the grouped product view.
Is there any easy way to do this?
echo $this->htmlEscape($_item->getAttName()
works, but then I would have to edit the file every time I had a new attribute, not to mention it would bloat the code if dozens of attributes exist.
Is there anything set up on magento to do this without much hassle?
Thank you!
Attached is an image that illustrates what I'm saying.!
Upvotes: 1
Views: 1280
Reputation: 18702
Try this in grouped.phtml inside the foreach loop:
foreach($oItem->getAttributes() as $attr):
echo $attr->getAttributeCode().' '.$attr->getAttributeValue();
endforeach;
Obviously you'll need to change the structure of the values that you echo out, but it should work.
Cheers, JD
Upvotes: 3