Version Notes
fixed qty ordered in Order Pdf - thanks wally101
included module Fooman Common - allows to get notified when EmailAttachments is updated
Download this release
Release Info
Developer | Magento Core Team |
Extension | Fooman_EmailAttachments |
Version | 0.6.2 |
Comparing to | |
See all releases |
Code changes from version 0.6.1 to 0.6.2
- app/code/community/Fooman/Common/Helper/Data.php +5 -0
- app/code/community/Fooman/Common/etc/config.xml +49 -0
- app/code/community/Fooman/Common/etc/system.xml +29 -0
- app/code/community/Fooman/EmailAttachments/Model/Order/Pdf/Items/Order/Default.php +1 -1
- app/code/community/Fooman/EmailAttachments/Model/Updates.php +36 -0
- app/code/community/Fooman/EmailAttachments/etc/config.xml +9 -2
- app/code/community/Fooman/EmailAttachments/etc/system.xml +28 -0
- app/etc/modules/Fooman_Common.xml +9 -0
- package.xml +5 -4
app/code/community/Fooman/Common/Helper/Data.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Fooman_Common_Helper_Data extends Mage_Core_Helper_Abstract
|
3 |
+
{
|
4 |
+
|
5 |
+
}
|
app/code/community/Fooman/Common/etc/config.xml
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/*
|
4 |
+
* @author Kristof Ringleff
|
5 |
+
* @package Fooman_Common
|
6 |
+
* @copyright Copyright (c) 2009 Fooman Limited (http://www.fooman.co.nz)
|
7 |
+
*/
|
8 |
+
-->
|
9 |
+
<config>
|
10 |
+
<modules>
|
11 |
+
<Fooman_Common>
|
12 |
+
<version>1.0.0</version>
|
13 |
+
</Fooman_Common>
|
14 |
+
</modules>
|
15 |
+
<global>
|
16 |
+
<models>
|
17 |
+
<foomancommon>
|
18 |
+
<class>Fooman_Common_Model</class>
|
19 |
+
</foomancommon>
|
20 |
+
</models>
|
21 |
+
<helpers>
|
22 |
+
<foomancommon>
|
23 |
+
<class>Fooman_Common_Helper</class>
|
24 |
+
</foomancommon>
|
25 |
+
</helpers>
|
26 |
+
</global>
|
27 |
+
<adminhtml>
|
28 |
+
<acl>
|
29 |
+
<resources>
|
30 |
+
<admin>
|
31 |
+
<children>
|
32 |
+
<system>
|
33 |
+
<children>
|
34 |
+
<config>
|
35 |
+
<children>
|
36 |
+
<foomancommon translate="title" module="foomancommon">
|
37 |
+
<title>Surcharge</title>
|
38 |
+
<sort_order>50</sort_order>
|
39 |
+
</foomancommon>
|
40 |
+
</children>
|
41 |
+
</config>
|
42 |
+
</children>
|
43 |
+
</system>
|
44 |
+
</children>
|
45 |
+
</admin>
|
46 |
+
</resources>
|
47 |
+
</acl>
|
48 |
+
</adminhtml>
|
49 |
+
</config>
|
app/code/community/Fooman/Common/etc/system.xml
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<fooman translate="label" module="foomancommon">
|
5 |
+
<label>Fooman Extensions</label>
|
6 |
+
<sort_order>500</sort_order>
|
7 |
+
</fooman>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<foomancommon>
|
11 |
+
<label>All</label>
|
12 |
+
<tab>fooman</tab>
|
13 |
+
<show_in_default>1</show_in_default>
|
14 |
+
<show_in_website>1</show_in_website>
|
15 |
+
<show_in_store>1</show_in_store>
|
16 |
+
<sort_order>100</sort_order>
|
17 |
+
<groups>
|
18 |
+
<notifications translate="label" module="foomancommon">
|
19 |
+
<label>Update Notifications</label>
|
20 |
+
<comment>To receive notifications please make sure that your Magento cron.php is set up. Please refer to the Magento documentation on how to do this.</comment>
|
21 |
+
<sort_order>100</sort_order>
|
22 |
+
<show_in_default>1</show_in_default>
|
23 |
+
<show_in_website>1</show_in_website>
|
24 |
+
<show_in_store>0</show_in_store>
|
25 |
+
</notifications>
|
26 |
+
</groups>
|
27 |
+
</foomancommon>
|
28 |
+
</sections>
|
29 |
+
</config>
|
app/code/community/Fooman/EmailAttachments/Model/Order/Pdf/Items/Order/Default.php
CHANGED
@@ -71,7 +71,7 @@ class Fooman_EmailAttachments_Model_Order_Pdf_Items_Order_Default extends Mage_S
|
|
71 |
|
72 |
$this->_setFontRegular();
|
73 |
|
74 |
-
$page->drawText($item->
|
75 |
|
76 |
/* in case Product name is longer than 80 chars - it is written in a few lines */
|
77 |
foreach (Mage::helper('core/string')->str_split($item->getName(), 60, true, true) as $key => $part) {
|
71 |
|
72 |
$this->_setFontRegular();
|
73 |
|
74 |
+
$page->drawText($item->getQtyOrdered()*1, 435, $pdf->y, 'UTF-8');
|
75 |
|
76 |
/* in case Product name is longer than 80 chars - it is written in a few lines */
|
77 |
foreach (Mage::helper('core/string')->str_split($item->getName(), 60, true, true) as $key => $part) {
|
app/code/community/Fooman/EmailAttachments/Model/Updates.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Fooman_EmailAttachments_Model_Updates extends Mage_AdminNotification_Model_Feed
|
4 |
+
{
|
5 |
+
const RSS_UPDATES_URL = 'store.fooman.co.nz/extensions/news/cat/emailattachments/updates';
|
6 |
+
const XML_GET_EMAILATTACHMENTS_UPDATES_PATH = 'foomancommon/notifications/enableemailattachmentsupdates';
|
7 |
+
|
8 |
+
public function getFeedUrl()
|
9 |
+
{
|
10 |
+
if (is_null($this->_feedUrl)) {
|
11 |
+
$this->_feedUrl = (Mage::getStoreConfigFlag(self::XML_USE_HTTPS_PATH) ? 'https://' : 'http://')
|
12 |
+
. self::RSS_UPDATES_URL;
|
13 |
+
}
|
14 |
+
return $this->_feedUrl;
|
15 |
+
}
|
16 |
+
|
17 |
+
public function getLastUpdate()
|
18 |
+
{
|
19 |
+
return Mage::app()->loadCache('emailattachments_notifications_lastcheck');
|
20 |
+
}
|
21 |
+
|
22 |
+
public function setLastUpdate()
|
23 |
+
{
|
24 |
+
Mage::app()->saveCache(time(), 'emailattachments_notifications_lastcheck');
|
25 |
+
return $this;
|
26 |
+
}
|
27 |
+
|
28 |
+
public function checkUpdate()
|
29 |
+
{
|
30 |
+
if(Mage::getStoreConfigFlag(self::XML_GET_EMAILATTACHMENTS_UPDATES_PATH)){
|
31 |
+
Mage::log('Looking for updates - Fooman EmailAttachments');
|
32 |
+
parent::checkUpdate();
|
33 |
+
}
|
34 |
+
}
|
35 |
+
|
36 |
+
}
|
app/code/community/Fooman/EmailAttachments/etc/config.xml
CHANGED
@@ -115,6 +115,13 @@
|
|
115 |
<attachagreement>0</attachagreement>
|
116 |
</creditmemo_comment>
|
117 |
</sales_email>
|
118 |
-
|
119 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
</config>
|
115 |
<attachagreement>0</attachagreement>
|
116 |
</creditmemo_comment>
|
117 |
</sales_email>
|
118 |
+
</default>
|
119 |
+
<crontab>
|
120 |
+
<jobs>
|
121 |
+
<emailattachments_updates>
|
122 |
+
<schedule><cron_expr>* */8 * * *</cron_expr></schedule>
|
123 |
+
<run><model>emailattachments/updates::checkUpdate</model></run>
|
124 |
+
</emailattachments_updates>
|
125 |
+
</jobs>
|
126 |
+
</crontab>
|
127 |
</config>
|
app/code/community/Fooman/EmailAttachments/etc/system.xml
CHANGED
@@ -1,5 +1,33 @@
|
|
1 |
<config>
|
2 |
<sections>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
<sales_email>
|
4 |
<groups>
|
5 |
<order>
|
1 |
<config>
|
2 |
<sections>
|
3 |
+
<foomancommon>
|
4 |
+
<label>All</label>
|
5 |
+
<tab>fooman</tab>
|
6 |
+
<show_in_default>1</show_in_default>
|
7 |
+
<show_in_website>1</show_in_website>
|
8 |
+
<show_in_store>1</show_in_store>
|
9 |
+
<sort_order>100</sort_order>
|
10 |
+
<groups>
|
11 |
+
<notifications>
|
12 |
+
<label>Update Notifications</label>
|
13 |
+
<sort_order>100</sort_order>
|
14 |
+
<show_in_default>1</show_in_default>
|
15 |
+
<show_in_website>1</show_in_website>
|
16 |
+
<show_in_store>1</show_in_store>
|
17 |
+
<fields>
|
18 |
+
<enableemailattachmentsupdates translate="label" module="surcharge">
|
19 |
+
<label>Receive Updates for Fooman EmailAttachments</label>
|
20 |
+
<frontend_type>select</frontend_type>
|
21 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
22 |
+
<sort_order>10</sort_order>
|
23 |
+
<show_in_default>1</show_in_default>
|
24 |
+
<show_in_website>0</show_in_website>
|
25 |
+
<show_in_store>0</show_in_store>
|
26 |
+
</enableemailattachmentsupdates>
|
27 |
+
</fields>
|
28 |
+
</notifications>
|
29 |
+
</groups>
|
30 |
+
</foomancommon>
|
31 |
<sales_email>
|
32 |
<groups>
|
33 |
<order>
|
app/etc/modules/Fooman_Common.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Fooman_Common>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Fooman_Common>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Fooman_EmailAttachments</name>
|
4 |
-
<version>0.6.
|
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,11 +17,12 @@
|
|
17 |
<li>Attaches html and text files for terms and conditions</li>
|
18 |
<li>Fine grained control offers complete control over what to attach to which email</li>
|
19 |
</ul></description>
|
20 |
-
<notes>
|
|
|
21 |
<authors><author><name>Kristof Ringleff</name><user>auto-converted</user><email>kristof@fooman.co.nz</email></author></authors>
|
22 |
<date>2010-02-02</date>
|
23 |
-
<time>
|
24 |
-
<contents><target name="mage"><dir name="app"><dir name="etc"><dir name="modules"><file name="Fooman_EmailAttachments.xml" hash="041c20e1806af133c1c1505af9902001"/></dir></dir></dir></target><target name="magelocale"><dir name="ar_SA"><file name="Fooman_EmailAttachments.csv" hash="c653bf4b26d7ac954c5fb3394cbf2653"/></dir><dir name="ca_ES"><file name="Fooman_EmailAttachments.csv" hash="31107a54463027629fed579432fdcd8c"/></dir><dir name="cs_CZ"><file name="Fooman_EmailAttachments.csv" hash="fce300285622235cd80a645dc5aa8382"/></dir><dir name="da_DK"><file name="Fooman_EmailAttachments.csv" hash="3b1dee9dde319b81cb03bcfbc57a57d5"/></dir><dir name="de_DE"><file name="Fooman_EmailAttachments.csv" hash="61946faad710768a205047d3f3c5889f"/></dir><dir name="en_US"><file name="Fooman_EmailAttachments.csv" hash="f9d75b13d0be941c33898a54867323b8"/></dir><dir name="es_ES"><file name="Fooman_EmailAttachments.csv" hash="f4b2ab5723ef54716d7b7ffdc00204be"/></dir><dir name="et_EE"><file name="Fooman_EmailAttachments.csv" hash="d9afb71b7dae74bf0e567c26f52ae50e"/></dir><dir name="fr_FR"><file name="Fooman_EmailAttachments.csv" hash="526ecbd634202fcd53d3fb641fde87e2"/></dir><dir name="he_IL"><file name="Fooman_EmailAttachments.csv" hash="6478ff8f6f8543302f3203b5e0af8b58"/></dir><dir name="it_IT"><file name="Fooman_EmailAttachments.csv" hash="f9d75b13d0be941c33898a54867323b8"/></dir><dir name="ja_JP"><file name="Fooman_EmailAttachments.csv" hash="89ada77934097d8b1797c72e4683bb10"/></dir><dir name="lt_LT"><file name="Fooman_EmailAttachments.csv" hash="78e709478214cc8d4bd55802018849eb"/></dir><dir name="lv_LV"><file name="Fooman_EmailAttachments.csv" hash="03aace6d823f388dc040598e82193373"/></dir><dir name="nl_NL"><file name="Fooman_EmailAttachments.csv" hash="b6dec1d624e379d0e03b6776cfcf4c1b"/></dir><dir name="no_NO"><file name="Fooman_EmailAttachments.csv" hash="68fcb45435c886c4dfc138d1ad0c38fe"/></dir><dir name="pt_BR"><file name="Fooman_EmailAttachments.csv" hash="51d014e78cb0ad1758a18c9627a6c7cf"/></dir><dir name="ro_RO"><file name="Fooman_EmailAttachments.csv" hash="47dca737528774fbc73676e18cabae95"/></dir><dir name="sl_SI"><file name="Fooman_EmailAttachments.csv" hash="abb511fd9b0d49a28c1e54801a3f0782"/></dir><dir name="sv_SE"><file name="Fooman_EmailAttachments.csv" hash="94850ba599bcbcfa7846d930fc827c30"/></dir><dir name="th_TH"><file name="Fooman_EmailAttachments.csv" hash="f9d75b13d0be941c33898a54867323b8"/></dir></target><target name="magecommunity"><dir name="Fooman"><dir name="EmailAttachments"><dir name="Block"><file name="View.php" hash="d1236b00671ee81013b2aecc86bae50c"/></dir><dir name="controllers"><dir name="Admin"><file name="OrderController.php" hash="c1328e7fcc80eb2cbc7ee0db333a9e7c"/></dir><dir name="Customer"><file name="OrderController.php" hash="3cbb3980c722ed239216780cd8b23372"/></dir></dir><dir name="etc"><file name="config.xml" hash="
|
25 |
<compatible/>
|
26 |
<dependencies/>
|
27 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Fooman_EmailAttachments</name>
|
4 |
+
<version>0.6.2</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 |
<li>Attaches html and text files for terms and conditions</li>
|
18 |
<li>Fine grained control offers complete control over what to attach to which email</li>
|
19 |
</ul></description>
|
20 |
+
<notes>fixed qty ordered in Order Pdf - thanks wally101
|
21 |
+
included module Fooman Common - allows to get notified when EmailAttachments is updated</notes>
|
22 |
<authors><author><name>Kristof Ringleff</name><user>auto-converted</user><email>kristof@fooman.co.nz</email></author></authors>
|
23 |
<date>2010-02-02</date>
|
24 |
+
<time>11:03:45</time>
|
25 |
+
<contents><target name="mage"><dir name="app"><dir name="etc"><dir name="modules"><file name="Fooman_Common.xml" hash="2555b2dd668865790df287b5cca61e35"/><file name="Fooman_EmailAttachments.xml" hash="041c20e1806af133c1c1505af9902001"/></dir></dir></dir></target><target name="magelocale"><dir name="ar_SA"><file name="Fooman_EmailAttachments.csv" hash="c653bf4b26d7ac954c5fb3394cbf2653"/></dir><dir name="ca_ES"><file name="Fooman_EmailAttachments.csv" hash="31107a54463027629fed579432fdcd8c"/></dir><dir name="cs_CZ"><file name="Fooman_EmailAttachments.csv" hash="fce300285622235cd80a645dc5aa8382"/></dir><dir name="da_DK"><file name="Fooman_EmailAttachments.csv" hash="3b1dee9dde319b81cb03bcfbc57a57d5"/></dir><dir name="de_DE"><file name="Fooman_EmailAttachments.csv" hash="61946faad710768a205047d3f3c5889f"/></dir><dir name="en_US"><file name="Fooman_EmailAttachments.csv" hash="f9d75b13d0be941c33898a54867323b8"/></dir><dir name="es_ES"><file name="Fooman_EmailAttachments.csv" hash="f4b2ab5723ef54716d7b7ffdc00204be"/></dir><dir name="et_EE"><file name="Fooman_EmailAttachments.csv" hash="d9afb71b7dae74bf0e567c26f52ae50e"/></dir><dir name="fr_FR"><file name="Fooman_EmailAttachments.csv" hash="526ecbd634202fcd53d3fb641fde87e2"/></dir><dir name="he_IL"><file name="Fooman_EmailAttachments.csv" hash="6478ff8f6f8543302f3203b5e0af8b58"/></dir><dir name="it_IT"><file name="Fooman_EmailAttachments.csv" hash="f9d75b13d0be941c33898a54867323b8"/></dir><dir name="ja_JP"><file name="Fooman_EmailAttachments.csv" hash="89ada77934097d8b1797c72e4683bb10"/></dir><dir name="lt_LT"><file name="Fooman_EmailAttachments.csv" hash="78e709478214cc8d4bd55802018849eb"/></dir><dir name="lv_LV"><file name="Fooman_EmailAttachments.csv" hash="03aace6d823f388dc040598e82193373"/></dir><dir name="nl_NL"><file name="Fooman_EmailAttachments.csv" hash="b6dec1d624e379d0e03b6776cfcf4c1b"/></dir><dir name="no_NO"><file name="Fooman_EmailAttachments.csv" hash="68fcb45435c886c4dfc138d1ad0c38fe"/></dir><dir name="pt_BR"><file name="Fooman_EmailAttachments.csv" hash="51d014e78cb0ad1758a18c9627a6c7cf"/></dir><dir name="ro_RO"><file name="Fooman_EmailAttachments.csv" hash="47dca737528774fbc73676e18cabae95"/></dir><dir name="sl_SI"><file name="Fooman_EmailAttachments.csv" hash="abb511fd9b0d49a28c1e54801a3f0782"/></dir><dir name="sv_SE"><file name="Fooman_EmailAttachments.csv" hash="94850ba599bcbcfa7846d930fc827c30"/></dir><dir name="th_TH"><file name="Fooman_EmailAttachments.csv" hash="f9d75b13d0be941c33898a54867323b8"/></dir></target><target name="magecommunity"><dir name="Fooman"><dir name="Common"><dir name="etc"><file name="config.xml" hash="8f7f8f70c47460a14609f58adff640d6"/><file name="system.xml" hash="342b9c19cbf4ba7ce8f7ce12030b12f4"/></dir><dir name="Helper"><file name="Data.php" hash="eea52c26a21af20b1c201eed88103d4b"/></dir></dir><dir name="EmailAttachments"><dir name="Block"><file name="View.php" hash="d1236b00671ee81013b2aecc86bae50c"/></dir><dir name="controllers"><dir name="Admin"><file name="OrderController.php" hash="c1328e7fcc80eb2cbc7ee0db333a9e7c"/></dir><dir name="Customer"><file name="OrderController.php" hash="3cbb3980c722ed239216780cd8b23372"/></dir></dir><dir name="etc"><file name="config.xml" hash="245372760a4094cadf0a673b1e0b459b"/><file name="system.xml" hash="505dfd2ffa1f2454130d895c48b8562e"/></dir><dir name="Helper"><file name="Data.php" hash="7136d506e3cb192aac561296091e1f59"/></dir><dir name="Model"><dir name="Order"><dir name="Pdf"><dir name="Items"><dir name="Order"><file name="Default.php" hash="280d30d64592540e4c90bec96ef51f80"/><file name="Grouped.php" hash="378d9c10a18deba0f4844d9b08d39041"/></dir></dir><file name="Order.php" hash="54d82cd4869a3b98473b89bfcc9a1f72"/></dir><file name="Creditmemo.php" hash="c35a7d629717cdac851a12bc1302eead"/><file name="Invoice.php" hash="b3a1d6cdd0747633f55faf72b698e759"/><file name="Shipment.php" hash="d2041f2299166b612af48a7462a16157"/></dir><file name="Observer.php" hash="d4976ed726918e5e37cf30f38326eb4c"/><file name="Order.php" hash="f27e8f45fd14be0416766431171ef763"/><file name="Updates.php" hash="7bee51da61f188d75dd7707bc6301e9d"/></dir></dir></dir></target></contents>
|
26 |
<compatible/>
|
27 |
<dependencies/>
|
28 |
</package>
|