Howtoattachinvoicepdfwithinvoiceemailinmagento

Page 1

How to Attach Invoice PDF With Invoice Email in Magento In this tutorial, I am going to give you "how to Attach Invoice PDF With Invoice Email in Magento" You can easily implement thsi after reading this .We have explained step by step prcosess in a simple way, Should read this . Sometime we need to send a invoice pdf in a invoice mail in magento, so here I am explaining how to add invoice pdf in invoice mail.


1) Override the app/code/core/Mage/Core/Model/Email/Template/Mailer.php file in your module 2) Add one protected variable $pdftemplate 3) Edit the send() function 4) at line around 70 put the following code 1. 2. 3. 4.

if ($this->pdftemplate) $pdftemplate = $this->variable; else $pdftemplate = Mage::getModel('core/email_template');

5) At the end of the class put 1. 2. 3.

public function addAttachment(Zend_Pdf $pdf, $filename){ $file = $pdf->render(); $this->pdftemplate =

Mage::getModel('core/email_template');

Read full blog :- Attach Invoice PDF With Invoice Email in Magento You can check more informative blogs and tutorials related Web Developerment & Programming go to blogs section and can also browse the magento, Wordpress, php, iOS developer forum for posting and viewing latest questions in simple and easy way.


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.