Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

help showing attributes in invoice
Total Posts:  56
Joined:  2009-02-04

I have successfully added certain product attributes to the downloadable items in the cart list by using the following code in :
/downloadable/checkout/cart/item/default.phtml :

<?php echo $this->__('Composer: '); 
Mage::getModel('catalog/product')->load($this->getProduct()->getId())->getAttributeText('composer'); echo $this->__(' '); echo Mage::getModel('catalog/product')->load($this->getProduct()->getId())->getcomposer_percentage();?>
<?php echo $this->__('Publisher: '); 
Mage::getModel('catalog/product')->load($this->getProduct()->getId())->getpublisher(); echo $this->__(' '); echo Mage::getModel('catalog/product')->load($this->getProduct()->getId())->getpublisher_percentage();?>

this shows in the cart a small bit of text under the product name that looks like this:
Composer: composer’s name 100% BMI
Publisher: publisher’s name 100% BMI

the composer attribute has a dropdown input in the backend, and the other three are text field inputs.

what I can’t figure out is how to display the same text in the customer’s invoice view. I tried placing the same code in:
but i the page doesn’ t finish loading and in firebug i’ve found this error:
<b>Fatal error</b>
: Call to a member function getId() on a non-object in

why does this work in the cart but not in the invoice?

another thing I have to do is to show this text on the customer’s invoice EMAIL.

can anyone help me out?

Magento Community Magento Community
Magento Community
Magento Community
Sr. Member
Total Posts:  217
Joined:  2009-05-20
Manchester, UK

This might help:

Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top