22 Jan

Display Attributes on Invoice or Packing Slip in Magento

Add this to Mage/Sales/Model/Order/Pdf/Items/Invoice/Default.php, replace ATTRNAME as appropriate. public function draw() { ... $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $this->getSku($item), array('ATTRNAME')); if ($product) { $lines[0][] = array( 'text' => Mage::helper('core/string')->str_split($product->getData('ATTRNAME'), 15), 'feed' => 305 ); } Then add this to Mage/Sales/Model/Order/Pdf/Invoice.php, replace ATTR_TITLE … Continue reading