I'm using Fooman's EmailAttachments extension on Magento CE 1.9.2.4 - or I try to. This is my config.xml:
<?xml version="1.0" encoding="UTF-8"?> <config>
<modules>
<NewName_EmailAttachments>
<version>1.0</version>
</NewName_EmailAttachments>
</modules>
<global>
<models>
<emailattachments>
<rewrite>
<order_pdf_order>NewName_EmailAttachments_Model_Order_Pdf_Order</order_pdf_order>
<order_pdf_bundleitems>NewName_EmailAttachments_Model_Order_Pdf_BundleItems</order_pdf_bundleitems>
</rewrite>
</emailattachments>
</models>
</global>
<stores>
<admin>
<design>
<theme>
<default>Newdefault</default>
</theme>
</design>
</admin>
</stores> </config>
As you can see I also tried to make it use a custom admin backend design so I can use my own translation files. This worked for other classes I made overwrites. Any ideas why not here?
This is the module's config:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<NewName_EmailAttachments>
<active>true</active>
<codePool>local</codePool>
<depends>
<Fooman_EmailAttachments />
</depends>
</NewName_EmailAttachments>
</modules>
</config>
The really interesting now is that the overwrite of Order_Pdf_Order works but the overwrite of Order_Pdf_BundleItems doesn't. Magento still takes the core class where the Fooman overwrite points to. How can I change that? Is there something more to do? To make it complete, here are the class definitions of the override files:
class NewName_EmailAttachments_Model_Order_Pdf_Order extends Fooman_EmailAttachments_Model_Order_Pdf_Order
{
...
and
class NewName_EmailAttachments_Model_Order_Pdf_BundleItems extends Fooman_EmailAttachments_Model_Order_Pdf_BundleItems
{
...
Thanks for your help!