here is the complete step by step procedure
Step 1 : Copy /app/code/core/Mage/Sales/Model/Order/Pdf/Invoice.php to /app/code/local/Mage/Sales/Model/Order/Pdf/Invoice.php
Step 2 : Find the line $page = $this->insertTotals($page, $invoice); in the getPdf function. This was line 107 for me.
Step 3 : Add the following in the above and save the file
/* added by Wright Creative Labs */ /* print coupon code on invoice */ if($order->getCouponCode()!=""){ $this->y -=12; $page->drawText('Coupon Used: '.$order->getCouponCode(), 450, $this->y, 'UTF-8'); } /* print gift certificate code on invoice */ if($order->getGiftcertCode()!=""){ $this->y -=12; $page->drawText('Coupon Used: '.$order->getGiftcertCode(), 450, $this->y, 'UTF-8'); }
thats it. now you can able to print the coupon and gift certificate in backend sales order.
No comments:
Post a Comment