|
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: '); echo Mage::getModel('catalog/product')->load($this->getProduct()->getId())->getAttributeText('composer'); echo $this->__(' '); echo Mage::getModel('catalog/product')->load($this->getProduct()->getId())->getcomposer_percentage();?> <br/> <?php echo $this->__('Publisher: '); echo 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:
/downloadable/sales/order/invoice/items/renderer/downloadable.phtml
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
<b>/downloadable/sales/order/invoice/items/renderer/downloadable.phtml</b>
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?
thanks
|