Version Notes
0.9.2 Release
Download this release
Release Info
Developer | Magento Core Team |
Extension | Fooman_EmailAttachments |
Version | 0.10.6 |
Comparing to | |
See all releases |
Code changes from version 0.10.4 to 0.10.6
app/code/community/Fooman/EmailAttachments/Model/Observer.php
CHANGED
@@ -77,18 +77,18 @@ class Fooman_EmailAttachments_Model_Observer
|
|
77 |
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachpdf', $storeId)) {
|
78 |
//Create Pdf and attach to email - play nicely with PdfCustomiser
|
79 |
$pdf = Mage::getModel('emailattachments/order_pdf_order')->getPdf(array($order));
|
80 |
-
|
81 |
$pdf, $mailTemplate, $this->getOrderAttachmentName($order)
|
82 |
);
|
83 |
}
|
84 |
|
85 |
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachagreement', $storeId)) {
|
86 |
-
|
87 |
}
|
88 |
|
89 |
$fileAttachment = Mage::getStoreConfig('sales_email/' . $configPath . '/attachfile', $storeId);
|
90 |
if ($fileAttachment) {
|
91 |
-
|
92 |
}
|
93 |
}
|
94 |
|
@@ -120,7 +120,7 @@ class Fooman_EmailAttachments_Model_Observer
|
|
120 |
if ($emails && Mage::getStoreConfig('sales_email/' . $configPath . '/sendpackingslip', $storeId)) {
|
121 |
$template = Mage::getStoreConfig(self::XML_PATH_ORDER_PACKINGSLIP_TEMPLATE, $storeId);
|
122 |
$pdf = Mage::getModel('sales/order_pdf_shipment')->getPdf(array(), array($order->getId()));
|
123 |
-
|
124 |
$pdf, $mailTemplate, Mage::helper('sales')->__('Shipment') . "_" . $order->getIncrementId()
|
125 |
);
|
126 |
foreach ($emails as $email) {
|
@@ -157,7 +157,7 @@ class Fooman_EmailAttachments_Model_Observer
|
|
157 |
$this->_fixUnsavedComments($invoice);
|
158 |
//Create Pdf and attach to email - play nicely with PdfCustomiser
|
159 |
$pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf(array($invoice));
|
160 |
-
|
161 |
$pdf,
|
162 |
$mailTemplate,
|
163 |
$this->getInvoiceAttachmentName($invoice)
|
@@ -165,12 +165,12 @@ class Fooman_EmailAttachments_Model_Observer
|
|
165 |
}
|
166 |
|
167 |
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachagreement', $storeId)) {
|
168 |
-
|
169 |
}
|
170 |
|
171 |
$fileAttachment = Mage::getStoreConfig('sales_email/' . $configPath . '/attachfile', $storeId);
|
172 |
if ($fileAttachment) {
|
173 |
-
|
174 |
}
|
175 |
}
|
176 |
|
@@ -196,14 +196,14 @@ class Fooman_EmailAttachments_Model_Observer
|
|
196 |
$this->_fixUnsavedComments($shipment);
|
197 |
//Create Pdf and attach to email - play nicely with PdfCustomiser
|
198 |
$pdf = Mage::getModel('sales/order_pdf_shipment')->getPdf(array($shipment));
|
199 |
-
|
200 |
$pdf, $mailTemplate, $this->getShipmentAttachmentName($shipment)
|
201 |
);
|
202 |
/*
|
203 |
$pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf(
|
204 |
$shipment->getOrder()->getInvoiceCollection()
|
205 |
);
|
206 |
-
|
207 |
$pdf,
|
208 |
$mailTemplate,
|
209 |
Mage::helper('sales')->__('Invoices for Order') . "_" . $shipment->getOrder()->getIncrementId()
|
@@ -212,12 +212,12 @@ class Fooman_EmailAttachments_Model_Observer
|
|
212 |
}
|
213 |
|
214 |
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachagreement', $storeId)) {
|
215 |
-
|
216 |
}
|
217 |
|
218 |
$fileAttachment = Mage::getStoreConfig('sales_email/' . $configPath . '/attachfile', $storeId);
|
219 |
if ($fileAttachment) {
|
220 |
-
|
221 |
}
|
222 |
}
|
223 |
|
@@ -243,18 +243,18 @@ class Fooman_EmailAttachments_Model_Observer
|
|
243 |
$this->_fixUnsavedComments($creditmemo);
|
244 |
//Create Pdf and attach to email - play nicely with PdfCustomiser
|
245 |
$pdf = Mage::getModel('sales/order_pdf_creditmemo')->getPdf(array($creditmemo));
|
246 |
-
|
247 |
$pdf, $mailTemplate, $this->getCreditmemoAttachmentName($creditmemo)
|
248 |
);
|
249 |
}
|
250 |
|
251 |
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachagreement', $storeId)) {
|
252 |
-
|
253 |
}
|
254 |
|
255 |
$fileAttachment = Mage::getStoreConfig('sales_email/' . $configPath . '/attachfile', $storeId);
|
256 |
if ($fileAttachment) {
|
257 |
-
|
258 |
}
|
259 |
}
|
260 |
|
@@ -282,18 +282,18 @@ class Fooman_EmailAttachments_Model_Observer
|
|
282 |
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachpdf', $storeId)) {
|
283 |
//Create Pdf and attach to email - play nicely with PdfCustomiser
|
284 |
$pdf = Mage::getModel('emailattachments/order_pdf_order')->getPdf(array($order));
|
285 |
-
|
286 |
$pdf, $mailer, $this->getOrderAttachmentName($order)
|
287 |
);
|
288 |
}
|
289 |
|
290 |
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachagreement', $storeId)) {
|
291 |
-
|
292 |
}
|
293 |
|
294 |
$fileAttachment = Mage::getStoreConfig('sales_email/' . $configPath . '/attachfile', $storeId);
|
295 |
if ($fileAttachment) {
|
296 |
-
|
297 |
}
|
298 |
}
|
299 |
}
|
77 |
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachpdf', $storeId)) {
|
78 |
//Create Pdf and attach to email - play nicely with PdfCustomiser
|
79 |
$pdf = Mage::getModel('emailattachments/order_pdf_order')->getPdf(array($order));
|
80 |
+
Mage::helper('emailattachments')->addAttachment(
|
81 |
$pdf, $mailTemplate, $this->getOrderAttachmentName($order)
|
82 |
);
|
83 |
}
|
84 |
|
85 |
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachagreement', $storeId)) {
|
86 |
+
Mage::helper('emailattachments')->addAgreements($order->getStoreId(), $mailTemplate);
|
87 |
}
|
88 |
|
89 |
$fileAttachment = Mage::getStoreConfig('sales_email/' . $configPath . '/attachfile', $storeId);
|
90 |
if ($fileAttachment) {
|
91 |
+
Mage::helper('emailattachments')->addFileAttachment($fileAttachment, $mailTemplate);
|
92 |
}
|
93 |
}
|
94 |
|
120 |
if ($emails && Mage::getStoreConfig('sales_email/' . $configPath . '/sendpackingslip', $storeId)) {
|
121 |
$template = Mage::getStoreConfig(self::XML_PATH_ORDER_PACKINGSLIP_TEMPLATE, $storeId);
|
122 |
$pdf = Mage::getModel('sales/order_pdf_shipment')->getPdf(array(), array($order->getId()));
|
123 |
+
Mage::helper('emailattachments')->addAttachment(
|
124 |
$pdf, $mailTemplate, Mage::helper('sales')->__('Shipment') . "_" . $order->getIncrementId()
|
125 |
);
|
126 |
foreach ($emails as $email) {
|
157 |
$this->_fixUnsavedComments($invoice);
|
158 |
//Create Pdf and attach to email - play nicely with PdfCustomiser
|
159 |
$pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf(array($invoice));
|
160 |
+
Mage::helper('emailattachments')->addAttachment(
|
161 |
$pdf,
|
162 |
$mailTemplate,
|
163 |
$this->getInvoiceAttachmentName($invoice)
|
165 |
}
|
166 |
|
167 |
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachagreement', $storeId)) {
|
168 |
+
Mage::helper('emailattachments')->addAgreements($storeId, $mailTemplate);
|
169 |
}
|
170 |
|
171 |
$fileAttachment = Mage::getStoreConfig('sales_email/' . $configPath . '/attachfile', $storeId);
|
172 |
if ($fileAttachment) {
|
173 |
+
Mage::helper('emailattachments')->addFileAttachment($fileAttachment, $mailTemplate);
|
174 |
}
|
175 |
}
|
176 |
|
196 |
$this->_fixUnsavedComments($shipment);
|
197 |
//Create Pdf and attach to email - play nicely with PdfCustomiser
|
198 |
$pdf = Mage::getModel('sales/order_pdf_shipment')->getPdf(array($shipment));
|
199 |
+
Mage::helper('emailattachments')->addAttachment(
|
200 |
$pdf, $mailTemplate, $this->getShipmentAttachmentName($shipment)
|
201 |
);
|
202 |
/*
|
203 |
$pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf(
|
204 |
$shipment->getOrder()->getInvoiceCollection()
|
205 |
);
|
206 |
+
Mage::helper('emailattachments')->addAttachment(
|
207 |
$pdf,
|
208 |
$mailTemplate,
|
209 |
Mage::helper('sales')->__('Invoices for Order') . "_" . $shipment->getOrder()->getIncrementId()
|
212 |
}
|
213 |
|
214 |
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachagreement', $storeId)) {
|
215 |
+
Mage::helper('emailattachments')->addAgreements($storeId, $mailTemplate);
|
216 |
}
|
217 |
|
218 |
$fileAttachment = Mage::getStoreConfig('sales_email/' . $configPath . '/attachfile', $storeId);
|
219 |
if ($fileAttachment) {
|
220 |
+
Mage::helper('emailattachments')->addFileAttachment($fileAttachment, $mailTemplate);
|
221 |
}
|
222 |
}
|
223 |
|
243 |
$this->_fixUnsavedComments($creditmemo);
|
244 |
//Create Pdf and attach to email - play nicely with PdfCustomiser
|
245 |
$pdf = Mage::getModel('sales/order_pdf_creditmemo')->getPdf(array($creditmemo));
|
246 |
+
Mage::helper('emailattachments')->addAttachment(
|
247 |
$pdf, $mailTemplate, $this->getCreditmemoAttachmentName($creditmemo)
|
248 |
);
|
249 |
}
|
250 |
|
251 |
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachagreement', $storeId)) {
|
252 |
+
Mage::helper('emailattachments')->addAgreements($storeId, $mailTemplate);
|
253 |
}
|
254 |
|
255 |
$fileAttachment = Mage::getStoreConfig('sales_email/' . $configPath . '/attachfile', $storeId);
|
256 |
if ($fileAttachment) {
|
257 |
+
Mage::helper('emailattachments')->addFileAttachment($fileAttachment, $mailTemplate);
|
258 |
}
|
259 |
}
|
260 |
|
282 |
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachpdf', $storeId)) {
|
283 |
//Create Pdf and attach to email - play nicely with PdfCustomiser
|
284 |
$pdf = Mage::getModel('emailattachments/order_pdf_order')->getPdf(array($order));
|
285 |
+
Mage::helper('emailattachments')->addAttachment(
|
286 |
$pdf, $mailer, $this->getOrderAttachmentName($order)
|
287 |
);
|
288 |
}
|
289 |
|
290 |
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachagreement', $storeId)) {
|
291 |
+
Mage::helper('emailattachments')->addAgreements($order->getStoreId(), $mailer);
|
292 |
}
|
293 |
|
294 |
$fileAttachment = Mage::getStoreConfig('sales_email/' . $configPath . '/attachfile', $storeId);
|
295 |
if ($fileAttachment) {
|
296 |
+
Mage::helper('emailattachments')->addFileAttachment($fileAttachment, $mailer);
|
297 |
}
|
298 |
}
|
299 |
}
|
app/code/community/Fooman/EmailAttachments/Model/Selftester.php
CHANGED
@@ -86,7 +86,6 @@ class Fooman_EmailAttachments_Model_Selftester extends Fooman_Common_Model_Selft
|
|
86 |
'app/locale/ru_RU/Fooman_EmailAttachments.csv',
|
87 |
'app/locale/lv_LV/Fooman_EmailAttachments.csv',
|
88 |
'app/locale/fi_FI/Fooman_EmailAttachments.csv',
|
89 |
-
'app/locale/en_US/template/email/sales/order_new_packingslip.html',
|
90 |
'app/locale/en_US/Fooman_EmailAttachments.csv',
|
91 |
'app/locale/ro_RO/Fooman_EmailAttachments.csv',
|
92 |
'app/locale/de_DE/Fooman_EmailAttachments.csv',
|
86 |
'app/locale/ru_RU/Fooman_EmailAttachments.csv',
|
87 |
'app/locale/lv_LV/Fooman_EmailAttachments.csv',
|
88 |
'app/locale/fi_FI/Fooman_EmailAttachments.csv',
|
|
|
89 |
'app/locale/en_US/Fooman_EmailAttachments.csv',
|
90 |
'app/locale/ro_RO/Fooman_EmailAttachments.csv',
|
91 |
'app/locale/de_DE/Fooman_EmailAttachments.csv',
|
app/code/community/Fooman/EmailAttachments/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Fooman_EmailAttachments>
|
5 |
-
<version>0.10.
|
6 |
<depends>
|
7 |
</depends>
|
8 |
</Fooman_EmailAttachments>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Fooman_EmailAttachments>
|
5 |
+
<version>0.10.6</version>
|
6 |
<depends>
|
7 |
</depends>
|
8 |
</Fooman_EmailAttachments>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Fooman_EmailAttachments</name>
|
4 |
-
<version>0.10.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -17,9 +17,9 @@
|
|
17 |
Fine grained options offer complete control over what to attach to which email</description>
|
18 |
<notes>0.9.2 Release</notes>
|
19 |
<authors><author><name>Kristof Ringleff</name><user>auto-converted</user><email>kristof@fooman.co.nz</email></author><author><name>Kristof Ringleff</name><user>auto-converted</user><email>kristof@fooman.co.nz</email></author></authors>
|
20 |
-
<date>2015-
|
21 |
-
<time>
|
22 |
-
<contents><target name="magecommunity"><dir name="Fooman"><dir name="EmailAttachments"><dir name="Block"><dir name="Adminhtml"><file name="Extensioninfo.php" hash="b71b6d6e6c11254588100f0f5b6b9c10"/></dir></dir><dir name="Helper"><file name="Data.php" hash="216e6925234cd6d9ef07a451d9b4d1c1"/></dir><dir name="Model"><dir name="Core"><dir name="App"><file name="Emulation.php" hash="6b0db295ff798b3286e8fbfcc061dbba"/></dir><dir name="Email"><dir name="Template"><file name="Mailer.php" hash="caf26b4981bb2588ea9c80f789ea327c"/></dir><file name="Queue.php" hash="f3fd963cf345662ece3b6b29b07b1de2"/></dir></dir><dir name="Order"><dir name="Pdf"><file name="Order.php" hash="b8d3bcb8add888068c4ca67caae78b79"/></dir></dir><dir name="System"><file name="File.php" hash="70b05b8e860088b0d2769d7a79c38e0c"/></dir><file name="Observer.php" hash="
|
23 |
<compatible/>
|
24 |
<dependencies><required><package><name>Fooman_Common</name><channel>community</channel><min></min><max></max></package></required></dependencies>
|
25 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Fooman_EmailAttachments</name>
|
4 |
+
<version>0.10.6</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
17 |
Fine grained options offer complete control over what to attach to which email</description>
|
18 |
<notes>0.9.2 Release</notes>
|
19 |
<authors><author><name>Kristof Ringleff</name><user>auto-converted</user><email>kristof@fooman.co.nz</email></author><author><name>Kristof Ringleff</name><user>auto-converted</user><email>kristof@fooman.co.nz</email></author></authors>
|
20 |
+
<date>2015-06-15</date>
|
21 |
+
<time>01:10:26</time>
|
22 |
+
<contents><target name="magecommunity"><dir name="Fooman"><dir name="EmailAttachments"><dir name="Block"><dir name="Adminhtml"><file name="Extensioninfo.php" hash="b71b6d6e6c11254588100f0f5b6b9c10"/></dir></dir><dir name="Helper"><file name="Data.php" hash="216e6925234cd6d9ef07a451d9b4d1c1"/></dir><dir name="Model"><dir name="Core"><dir name="App"><file name="Emulation.php" hash="6b0db295ff798b3286e8fbfcc061dbba"/></dir><dir name="Email"><dir name="Template"><file name="Mailer.php" hash="caf26b4981bb2588ea9c80f789ea327c"/></dir><file name="Queue.php" hash="f3fd963cf345662ece3b6b29b07b1de2"/></dir></dir><dir name="Order"><dir name="Pdf"><file name="Order.php" hash="b8d3bcb8add888068c4ca67caae78b79"/></dir></dir><dir name="System"><file name="File.php" hash="70b05b8e860088b0d2769d7a79c38e0c"/></dir><file name="Observer.php" hash="09d2c1c6238afdc160617af7dd3033ab"/><file name="Selftester.php" hash="307c4e231b50dc1a55a43ea00fe246fb"/></dir><dir name="controllers"><dir name="Admin"><file name="OrderController.php" hash="e6b7c1937dd4f41fe376c799b2b80fdf"/></dir><dir name="Customer"><file name="OrderController.php" hash="bc8d1ae57801fcdf5bc1d5abbac0b879"/></dir></dir><dir name="etc"><file name="config.xml" hash="3cd11cdcd64a4f4ad94d13fab4ff9206"/><file name="system.xml" hash="2b1df0a77b34af861b84602a002f136c"/></dir><file name="LICENSE.txt" hash="59563e7be45096d0833dade102989042"/><file name="modman" hash="9f838aa064e82521f44aa0c12cfaac0c"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Fooman_EmailAttachments.xml" hash="041c20e1806af133c1c1505af9902001"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Fooman_EmailAttachments.csv" hash="572cca36b6b4a051b7722cb6488a636a"/></dir><dir name="de_DE"><file name="Fooman_EmailAttachments.csv" hash="7113fa7ee43f7daeb5511123d014ed57"/></dir><dir name="nl_NL"><file name="Fooman_EmailAttachments.csv" hash="379a96bf751644c476f9ba770736fbe2"/></dir><dir name="fr_FR"><file name="Fooman_EmailAttachments.csv" hash="9a1527774e75286333932659b90da09d"/></dir><dir name="es_ES"><file name="Fooman_EmailAttachments.csv" hash="1b9628695c1c2295b915bd1c06edcb84"/></dir><dir name="ro_RO"><file name="Fooman_EmailAttachments.csv" hash="2a24c0da13bfafb658325b6bf4c44f1d"/></dir><dir name="th_TH"><file name="Fooman_EmailAttachments.csv" hash="572cca36b6b4a051b7722cb6488a636a"/></dir><dir name="da_DK"><file name="Fooman_EmailAttachments.csv" hash="129927e87ec7d8b3d4466a58e5215b09"/></dir><dir name="ar_SA"><file name="Fooman_EmailAttachments.csv" hash="00b09a522a8edfb796a0668ef4faedc4"/></dir><dir name="ca_ES"><file name="Fooman_EmailAttachments.csv" hash="a81b65ca792f534072511a18a91423c9"/></dir><dir name="cs_CZ"><file name="Fooman_EmailAttachments.csv" hash="86f4cac9569ca2708b44a5240496d00a"/></dir><dir name="et_EE"><file name="Fooman_EmailAttachments.csv" hash="206f6d731c2e2ef3664869a6be68b95f"/></dir><dir name="he_IL"><file name="Fooman_EmailAttachments.csv" hash="81b7326525ee4839e41be971709f9e96"/></dir><dir name="it_IT"><file name="Fooman_EmailAttachments.csv" hash="d5a0dd8ea51c030c33efdb5159f3c549"/></dir><dir name="ja_JP"><file name="Fooman_EmailAttachments.csv" hash="5618c215a5cbb924d2951c879d42573f"/></dir><dir name="lt_LT"><file name="Fooman_EmailAttachments.csv" hash="18fff03b09d88b8b938bed19639b4f8f"/></dir><dir name="lv_LV"><file name="Fooman_EmailAttachments.csv" hash="15714286f2b7e009f7674a9f747a1cd4"/></dir><dir name="no_NO"><file name="Fooman_EmailAttachments.csv" hash="9d201c51cfc24326a0a677b2f7cd838e"/></dir><dir name="pt_BR"><file name="Fooman_EmailAttachments.csv" hash="463ca55f2f52b4422ff2f275f8649b85"/></dir><dir name="sl_SI"><file name="Fooman_EmailAttachments.csv" hash="288a189ee828dc6b91b72f20bc771452"/></dir><dir name="sv_SE"><file name="Fooman_EmailAttachments.csv" hash="d9a51a4c763d9cb0739d57a4f1d9c18c"/></dir><dir name="fi_FI"><file name="Fooman_EmailAttachments.csv" hash="53f5fa6e60fb26effdd36422d8bf24f9"/></dir><dir name="gr_GR"><file name="Fooman_EmailAttachments.csv" hash="22959ba9d6c58a89db59db26edf9b163"/></dir><dir name="hr_HR"><file name="Fooman_EmailAttachments.csv" hash="6564938bfeefdc2ca37f183943bc5873"/></dir><dir name="ko_KR"><file name="Fooman_EmailAttachments.csv" hash="951a785b40eb519b6f460fccc7718b24"/></dir><dir name="nb_NO"><file name="Fooman_EmailAttachments.csv" hash="9d201c51cfc24326a0a677b2f7cd838e"/></dir><dir name="pl_PL"><file name="Fooman_EmailAttachments.csv" hash="db51bd721228cf6f3b8f25702282cced"/></dir><dir name="ru_RU"><file name="Fooman_EmailAttachments.csv" hash="5c111bca22d66855aa3f999a74b1fdba"/></dir><dir name="zh_CN"><file name="Fooman_EmailAttachments.csv" hash="f35148d8703229c2945565b3d8559455"/></dir><dir name="fa_IR"><file name="Fooman_EmailAttachments.csv" hash="02f8af4fe42307f3a0ef12d897c64f47"/></dir><dir name="sk_SK"><file name="Fooman_EmailAttachments.csv" hash="86c42277437d0f293754892581f523ed"/></dir><dir name="hu_HU"><file name="Fooman_EmailAttachments.csv" hash="4136ac55aebaff443434d80612bd6371"/></dir></target></contents>
|
23 |
<compatible/>
|
24 |
<dependencies><required><package><name>Fooman_Common</name><channel>community</channel><min></min><max></max></package></required></dependencies>
|
25 |
</package>
|