Add item numbers to items in Magento Invoice PDF -


i trying should simple, stuck.

i trying add serial numbers (1,2,3 etc) items in magento's invoice pdf under column called serial number.

any clues on how this? thanks!

this 2 files responsible displaying invoice pdf content app\code\core\mage\sales\model\order\pdf\items\invoice\default.php app\code\core\mage\sales\model\order\pdf\invoice.php overwrite 2 files or put in local folder

now add serial number header in file app\code\core\mage\sales\model\order\pdf\invoice.php can fin _drawheader function add before products column

$lines[0][] = array(         'text' => mage::helper('sales')->__('serial number'),         'feed' => 35     ); 

now go app\code\core\mage\sales\model\order\pdf\items\invoice\default.php file can find draw() function

from $this->getitem(); can find item count , put loop here displaying serial numbers like

for($j=1; $j<=count($this->getitem());$j++) {  $lines[$j][] = array(                 'text'  => $j,                 'font'  => 'bold',                 'align' => 'right'             ); } 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -