Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How to overload sendEmail function? [solved]
 
sprinnet
Sr. Member
 
Avatar
Total Posts:  140
Joined:  2009-01-12
Prague, Czech Republic
 

I try to attach PDF invoice to E-mail…

I’ve created the next files:

\etc\modules\MyName_PdfAttachment.xml:
\code\local\MyName\PdfAttachment\Model\PdfAttachment.php:
\code\local\MyName\PdfAttachment\Model\PdfInvoice.php:
\code\local\MyName\PdfAttachment\etc\config.xml:

<?xml version="1.0"?>
<config>
    <
modules>
        <
MyName_PdfAttachment>
            <
version>0.1.0</version>
        </
MyName_PdfAttachment>
    </
modules>
    <global>
        <
models>
            <
core>
                <
rewrite>
                    <
email_template>MyName_PdfAttachment_Model_PdfAttachment</email_template>
                </
rewrite>
            </
core>
            <
sales>
                <
rewrite>
                    <
order_invoice>MyName_PdfAttachment_Model_PdfInvoice</order_invoice>
                </
rewrite>
            </
sales>
        </
models>
        </global>
    <default>
    </default>
</
config>

Method send ( MyName_PdfAttachment_Model_PdfAttachment ) works, but sendEmail (MyName_PdfAttachment_Model_PdfInvoice) doesn’t work excaim
What’s wrong?

---

Problem was solved by rename <Sales> to <sales>

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top