Question

I need to change the product details of magento packing slip currently they are showing as follows enter image description here

but I need to display as below to reduce the space taken for one product

enter image description here

Which file should I look for doing this I have looked at

app/code/core/Mage/Sales/Model/Order/Pdf/Shipment.php

and

app/code/core/Mage/Sales/Model/Order/Pdf/Items/Invoice/Default.php

but no luck :(

Was it helpful?

Solution

The file that is responsible for this task is:

app/code/core/Mage/Sales/Model/Order/Pdf/Shipment/Packaging.php for simple product.

code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php for bundle product.

For Items Rendering

app/code/core/Mage/Sales/Model/Order/Pdf/Items/Shipment/Default.php

OTHER TIPS

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 as appropriate and OFFSET with the left offset.

/* Add table head */ … $page->drawText(Mage::helper(‘sales’)->__(‘ATTR_TITLE’), OFFSET, $this->y, ‘UTF-8′); if (!empty($settings[‘table_header’])) { $page->drawText(Mage::helper(‘sales’)-> (‘ATTR_TITLE’), OFFSET, $this->y, ‘UTF-8′); } There is no definitive solution as you need to change a few other details to limit column widths in other areas depending on where you are trying to put your values (ie. description is usually made narrower and forced to line-wrap).

Referenced from: http://www.magentocommerce.com/boards/viewthread/18142/P15/#t20162

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top