Question

I am using Magento 1.7. If a coupon code is used I am trying to include it in the PDF invoice. I have been trying the suggestions in this thread http://www.magentocommerce.com/boards/viewthread/56110/ changing app/code/core/Mage/Sales/Model/Order/Pdf/Invoice.php however any changes I make to this file do not appear to do anything to the generated PDF. I also tried overriding it in app/code/local/Mage/Sales/Model/Order/Pdf/Invoice.php and making any changes to this file did not make any difference.

Any suggestions much appreciated, I have spent a long time trying to find answers.

edit

Added this

 /* print coupon code on invoice */
 if($order->getCouponCode()!=""){
    $this->y -= 12;
    $page->drawText('Code: '.$order->getCouponCode(), 450, $this->y, 'UTF-8');
 }

  /* print gift certificate code on invoice */
  if($order->getGiftcertCode()!=""){
     $this->y -= 12;
     $page->drawText('Code: '.$order->getGiftcertCode(), 450, $this->y, 'UTF-8');
  }

In app/code/local/Mage/Sales/Model/Order/Pdf/Invoice.pdf before $this->insertTotals($page, $invoice) on line 149.

No correct solution

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