Details
This magento extension allow you to easily attach pdf with any emails sent from magento.
You only need to add html code between pdf tags in your email templates and it will be converted to a pdf file and attached to the emails.
- v. 1.0.1: fixing issue when pdf is sent in some case
- v. 1.0.0: introducing the extension
INSTALLATION GUIDE
- Uncompress module to your magento root directory
- Download html2pdf library and uncompress it in app/code/community/J2t/Emailpdf/lib (you should have a folder name html2pdf_vX.XX_php5)
- Flush your magento cache
- Log out and log back to admin
- Configure the module in system > configuration > Customer | J2T Email PDF
SPECIAL INSTRUCTION:
If you are using Advancedsmtp please modify the following files:
- app/code/community/Mage/Advancedsmtp/etc/config.xml
>> comment out these lines (by adding <!-- before <rewrite> and --> after </rewrite> tag):
<rewrite>
<email_template>Mage_Advancedsmtp_Model_Email_Template</email_template>
<email>Mage_Advancedsmtp_Model_Email</email>
</rewrite>
- app/code/community/J2t/Emailpdf/Model/Emailtemplate.php
>> replace: class J2t_Emailpdf_Model_Emailtemplate extends Mage_Core_Model_Email_Template
by: class J2t_Emailpdf_Model_Emailtemplate extends Mage_Advancedsmtp_Model_Email_Template
If you are using J2T SMS Gateway please modify the following files:
- app/code/community/Mage/Advancedsmtp/etc/config.xml
>> comment out these lines (by adding <!-- before <rewrite> and --> after </rewrite> tag):
<core>
<rewrite>
<email_template>J2t_Smsgateway_Model_Emailtemplate</email_template>
</rewrite>
</core>
- app/code/community/J2t/Emailpdf/Model/Emailtemplate.php
>> replace: class J2t_Emailpdf_Model_Emailtemplate extends Mage_Core_Model_Email_Template
by: class J2t_Emailpdf_Model_Emailtemplate extends J2t_Smsgateway_Model_Emailtemplate
To attach a pdf in emails, just a valid HTML to your email template between pdf tags. You can process as below:
... html code of my email template...
<pdf><strong>my pdf page</pdf>
Note that you can use all the available variables in your email template!
UNINSTALL PROCEDURE
- undo modifications the above modifications
- replace 'true' by 'false' in app/etc/modules/J2t_Emailpdf.xml
