Version Notes
0.9.2 Release
Download this release
Release Info
Developer | Magento Core Team |
Extension | Fooman_EmailAttachments |
Version | 0.9.13 |
Comparing to | |
See all releases |
Code changes from version 0.9.6 to 0.9.13
- app/code/community/Fooman/Common/Block/Adminhtml/Extensioninfo.php +0 -42
- app/code/community/Fooman/Common/Helper/Data.php +0 -43
- app/code/community/Fooman/Common/LICENSE.txt +0 -48
- app/code/community/Fooman/Common/Model/Selftester.php +0 -185
- app/code/community/Fooman/Common/Model/Selftester/Abstract.php +0 -126
- app/code/community/Fooman/Common/Model/Selftester/Db.php +0 -146
- app/code/community/Fooman/Common/controllers/Adminhtml/SelftesterController.php +0 -56
- app/code/community/Fooman/Common/etc/config.xml +0 -76
- app/code/community/Fooman/Common/etc/system.xml +0 -37
- app/code/community/Fooman/EmailAttachments/Block/Adminhtml/Extensioninfo.php +8 -0
- app/code/community/Fooman/EmailAttachments/Block/View.php +0 -19
- app/code/community/Fooman/EmailAttachments/Helper/Data.php +53 -8
- app/code/community/Fooman/EmailAttachments/Model/Core/Email/Template/Mailer.php +132 -119
- app/code/community/Fooman/EmailAttachments/Model/Observer.php +67 -44
- app/code/community/Fooman/EmailAttachments/Model/Order/Pdf/Order.php +71 -74
- app/code/community/Fooman/EmailAttachments/Model/Selftester.php +25 -1
- app/code/community/Fooman/EmailAttachments/Model/Updates.php +0 -36
- app/code/community/Fooman/EmailAttachments/controllers/Admin/OrderController.php +1 -42
- app/code/community/Fooman/EmailAttachments/etc/config.xml +2 -2
- app/code/community/Fooman/EmailAttachments/etc/system.xml +57 -1
- app/code/community/Fooman/EmailAttachments/modman +35 -0
- app/etc/modules/Fooman_Common.xml +0 -9
- app/locale/ar_SA/Fooman_EmailAttachments.csv +1 -1
- app/locale/es_ES/Fooman_EmailAttachments.csv +7 -7
- app/locale/fa_IR/Fooman_EmailAttachments.csv +1 -1
- app/locale/fr_FR/Fooman_EmailAttachments.csv +2 -2
- app/locale/gr_GR/Fooman_EmailAttachments.csv +2 -2
- app/locale/hu_HU/Fooman_EmailAttachments.csv +7 -0
- app/locale/it_IT/Fooman_EmailAttachments.csv +7 -7
- app/locale/nl_NL/Fooman_EmailAttachments.csv +2 -2
- app/locale/ro_RO/Fooman_EmailAttachments.csv +7 -7
- app/locale/sv_SE/Fooman_EmailAttachments.csv +7 -7
- package.xml +5 -5
app/code/community/Fooman/Common/Block/Adminhtml/Extensioninfo.php
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Fooman Common
|
4 |
-
*
|
5 |
-
* @package Fooman_Common
|
6 |
-
* @author Kristof Ringleff <kristof@fooman.co.nz>
|
7 |
-
* @copyright Copyright (c) 2012 Fooman Limited (http://www.fooman.co.nz)
|
8 |
-
*
|
9 |
-
* For the full copyright and license information, please view the LICENSE
|
10 |
-
* file that was distributed with this source code.
|
11 |
-
*/
|
12 |
-
|
13 |
-
class Fooman_Common_Block_Adminhtml_Extensioninfo extends Mage_Adminhtml_Block_System_Config_Form_Field
|
14 |
-
{
|
15 |
-
protected $_hasSelftest = false;
|
16 |
-
protected $_idString = '';
|
17 |
-
protected $_moduleName = '';
|
18 |
-
|
19 |
-
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
20 |
-
{
|
21 |
-
$this->setTemplate('fooman/common/selftester.phtml');
|
22 |
-
$this->setShowSelftestButton(false);
|
23 |
-
if ($this->_hasSelftest) {
|
24 |
-
if (Mage::getModel($this->_idString . '/selftester')) {
|
25 |
-
$this->setShowSelftestButton(true);
|
26 |
-
$this->setSelftestButtonUrl(
|
27 |
-
Mage::helper('adminhtml')->getUrl(
|
28 |
-
'adminhtml/selftester',
|
29 |
-
array(
|
30 |
-
'module' => $this->_idString,
|
31 |
-
'moduleName' => $this->_moduleName
|
32 |
-
)
|
33 |
-
)
|
34 |
-
);
|
35 |
-
$element->setReadonly(true, true);
|
36 |
-
}
|
37 |
-
}
|
38 |
-
$this->setConfigVersion((string)Mage::getConfig()->getModuleConfig($this->_moduleName)->version);
|
39 |
-
|
40 |
-
return $this->_toHtml();
|
41 |
-
}
|
42 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fooman/Common/Helper/Data.php
DELETED
@@ -1,43 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* @author Kristof Ringleff
|
5 |
-
* @package Fooman_Common
|
6 |
-
* @copyright Copyright (c) 2009 Fooman Limited (http://www.fooman.co.nz)
|
7 |
-
*
|
8 |
-
* For the full copyright and license information, please view the LICENSE
|
9 |
-
* file that was distributed with this source code.
|
10 |
-
*/
|
11 |
-
|
12 |
-
class Fooman_Common_Helper_Data extends Mage_Core_Helper_Abstract
|
13 |
-
{
|
14 |
-
/**
|
15 |
-
* Helper function to create a hash from a base64 Fooman serial number
|
16 |
-
*
|
17 |
-
* @param $serial
|
18 |
-
*
|
19 |
-
* @return string
|
20 |
-
*/
|
21 |
-
public function convertSerialToId($serial)
|
22 |
-
{
|
23 |
-
return hash('sha256', str_replace(array("\r\n", "\n", "\r", " ", PHP_EOL), '', $serial));
|
24 |
-
}
|
25 |
-
|
26 |
-
public function getOverlayFileName()
|
27 |
-
{
|
28 |
-
if (file_exists(BP .DS.'skin'.DS.'adminhtml'.DS.'default'.DS.'default'.DS.'lib'.DS.'prototype'.DS.'windows'.DS.'themes'.DS.'magento.css')) {
|
29 |
-
return 'lib/prototype/windows/themes/magento.css';
|
30 |
-
} else {
|
31 |
-
return 'prototype/windows/themes/magento.css';
|
32 |
-
}
|
33 |
-
}
|
34 |
-
|
35 |
-
public function getOverlayFileType()
|
36 |
-
{
|
37 |
-
if (file_exists(BP .DS.'skin'.DS.'adminhtml'.DS.'default'.DS.'default'.DS.'lib'.DS.'prototype'.DS.'windows'.DS.'themes'.DS.'magento.css')) {
|
38 |
-
return 'skin_css';
|
39 |
-
} else {
|
40 |
-
return 'js_css';
|
41 |
-
}
|
42 |
-
}
|
43 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fooman/Common/LICENSE.txt
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
|
2 |
-
Open Software License ("OSL") v. 3.0
|
3 |
-
|
4 |
-
This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:
|
5 |
-
|
6 |
-
Licensed under the Open Software License version 3.0
|
7 |
-
|
8 |
-
1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:
|
9 |
-
|
10 |
-
1. to reproduce the Original Work in copies, either alone or as part of a collective work;
|
11 |
-
|
12 |
-
2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;
|
13 |
-
|
14 |
-
3. to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License;
|
15 |
-
|
16 |
-
4. to perform the Original Work publicly; and
|
17 |
-
|
18 |
-
5. to display the Original Work publicly.
|
19 |
-
|
20 |
-
2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.
|
21 |
-
|
22 |
-
3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.
|
23 |
-
|
24 |
-
4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.
|
25 |
-
|
26 |
-
5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).
|
27 |
-
|
28 |
-
6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.
|
29 |
-
|
30 |
-
7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.
|
31 |
-
|
32 |
-
8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.
|
33 |
-
|
34 |
-
9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including 'fair use' or 'fair dealing'). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).
|
35 |
-
|
36 |
-
10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.
|
37 |
-
|
38 |
-
11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.
|
39 |
-
|
40 |
-
12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.
|
41 |
-
|
42 |
-
13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.
|
43 |
-
|
44 |
-
14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
45 |
-
|
46 |
-
15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.
|
47 |
-
|
48 |
-
16. Modification of This License. This License is Copyright � 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fooman/Common/Model/Selftester.php
DELETED
@@ -1,185 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Fooman Common
|
4 |
-
*
|
5 |
-
* @package Fooman_Common
|
6 |
-
* @author Kristof Ringleff <kristof@fooman.co.nz>
|
7 |
-
* @copyright Copyright (c) 2012 Fooman Limited (http://www.fooman.co.nz)
|
8 |
-
*
|
9 |
-
* For the full copyright and license information, please view the LICENSE
|
10 |
-
* file that was distributed with this source code.
|
11 |
-
*/
|
12 |
-
|
13 |
-
class Fooman_Common_Model_Selftester extends Fooman_Common_Model_Selftester_Abstract
|
14 |
-
{
|
15 |
-
public $messages = array();
|
16 |
-
public $errorOccurred = false;
|
17 |
-
protected $_fix = false;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Start the selftest
|
21 |
-
*
|
22 |
-
* @return $this
|
23 |
-
*/
|
24 |
-
public function main ()
|
25 |
-
{
|
26 |
-
$this->messages[] = 'Starting ' . get_class($this);
|
27 |
-
$failed = false;
|
28 |
-
try {
|
29 |
-
if (!$this->selfCheckLocation()) {
|
30 |
-
$failed = true;
|
31 |
-
}
|
32 |
-
if (Mage::app()->getRequest()->getParam('fix') == 'true') {
|
33 |
-
$this->_fix = true;
|
34 |
-
}
|
35 |
-
if (!$this->checkFileLocations()) {
|
36 |
-
$failed = true;
|
37 |
-
}
|
38 |
-
if (!$this->magentoRewrites()) {
|
39 |
-
$failed = true;
|
40 |
-
}
|
41 |
-
if (!$this->dbCheck()) {
|
42 |
-
$failed = true;
|
43 |
-
}
|
44 |
-
if (!$this->hasSettings()) {
|
45 |
-
$failed = true;
|
46 |
-
}
|
47 |
-
if (!$failed) {
|
48 |
-
$this->messages[] = 'Result: success';
|
49 |
-
} else {
|
50 |
-
$this->messages[] = 'Result: failure';
|
51 |
-
$this->errorOccurred = true;
|
52 |
-
}
|
53 |
-
} catch (Exception $e) {
|
54 |
-
$this->errorOccurred = true;
|
55 |
-
$this->messages[] = $e->getMessage();
|
56 |
-
}
|
57 |
-
$this->messages[] = 'Self-test finished';
|
58 |
-
return $this;
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* preliminary tests if the selftest can find a Magento instance
|
63 |
-
*
|
64 |
-
* @return bool
|
65 |
-
* @throws Exception
|
66 |
-
*/
|
67 |
-
public function selfCheckLocation()
|
68 |
-
{
|
69 |
-
if (file_exists('app' . DIRECTORY_SEPARATOR . 'Mage.php')) {
|
70 |
-
require_once 'app' . DIRECTORY_SEPARATOR . 'Mage.php';
|
71 |
-
Mage::app();
|
72 |
-
$this->messages[] = "Default store loaded";
|
73 |
-
$this->_getVersions();
|
74 |
-
} else {
|
75 |
-
$this->messages[] = 'Can\'t instantiate Magento. Is the file uploaded to your root Magento folder?';
|
76 |
-
throw new Exception();
|
77 |
-
}
|
78 |
-
return true;
|
79 |
-
}
|
80 |
-
|
81 |
-
public function shouldFix()
|
82 |
-
{
|
83 |
-
return $this->_fix;
|
84 |
-
}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* test if all expected files exist and can be read/opened
|
88 |
-
*
|
89 |
-
* @return bool
|
90 |
-
*/
|
91 |
-
public function checkFileLocations()
|
92 |
-
{
|
93 |
-
$returnVal = true;
|
94 |
-
$this->messages[] = "Checking file locations";
|
95 |
-
foreach ($this->_getFiles() as $currentRow) {
|
96 |
-
|
97 |
-
if (empty($currentRow)) {
|
98 |
-
continue;
|
99 |
-
}
|
100 |
-
try {
|
101 |
-
if (!file_exists($currentRow)) {
|
102 |
-
throw new Exception('File ' . $currentRow . ' does not exist');
|
103 |
-
}
|
104 |
-
if (!is_readable($currentRow)) {
|
105 |
-
throw new Exception(
|
106 |
-
'Can\'t read file ' . $currentRow . ' - please check file permissions and file owner.'
|
107 |
-
);
|
108 |
-
}
|
109 |
-
|
110 |
-
$handleExtFile = fopen($currentRow, "r");
|
111 |
-
if (!$handleExtFile) {
|
112 |
-
throw new Exception(
|
113 |
-
'Can\'t read file contents ' . $currentRow
|
114 |
-
. ' - please check if the file got corrupted in the upload process.'
|
115 |
-
);
|
116 |
-
}
|
117 |
-
fclose($handleExtFile);
|
118 |
-
} catch (Exception $e) {
|
119 |
-
$this->messages[] = $e->getMessage();
|
120 |
-
$returnVal = false;
|
121 |
-
}
|
122 |
-
}
|
123 |
-
return $returnVal;
|
124 |
-
}
|
125 |
-
|
126 |
-
/**
|
127 |
-
* check that rewrites return expected classes
|
128 |
-
*
|
129 |
-
* @return bool
|
130 |
-
*/
|
131 |
-
public function magentoRewrites ()
|
132 |
-
{
|
133 |
-
$returnVal = true;
|
134 |
-
$this->messages[] = "Checking rewrites";
|
135 |
-
|
136 |
-
foreach ($this->_getRewrites() as $currentRow) {
|
137 |
-
|
138 |
-
if (empty($currentRow) || !$currentRow) {
|
139 |
-
continue;
|
140 |
-
}
|
141 |
-
try {
|
142 |
-
$this->_testRewriteRow($currentRow);
|
143 |
-
} catch (Exception $e) {
|
144 |
-
$this->messages[] = $e->getMessage();
|
145 |
-
$returnVal = false;
|
146 |
-
}
|
147 |
-
}
|
148 |
-
return $returnVal;
|
149 |
-
}
|
150 |
-
|
151 |
-
/**
|
152 |
-
* check the database for expected tables, columns and attributes
|
153 |
-
*
|
154 |
-
* @return bool
|
155 |
-
*/
|
156 |
-
public function dbCheck()
|
157 |
-
{
|
158 |
-
//we don't use getModel since the common extension might not yet be installed correctly
|
159 |
-
$dbCheckModel = new Fooman_Common_Model_Selftester_Db();
|
160 |
-
return $dbCheckModel->dbCheck($this);
|
161 |
-
}
|
162 |
-
|
163 |
-
/**
|
164 |
-
* retrieve current database info relevant for debugging
|
165 |
-
*
|
166 |
-
* @return bool
|
167 |
-
*/
|
168 |
-
public function hasSettings()
|
169 |
-
{
|
170 |
-
foreach ($this->_getSettings() as $table => $tableValues) {
|
171 |
-
|
172 |
-
$this->messages[] = $table;
|
173 |
-
foreach ($tableValues as $setting) {
|
174 |
-
$msg = array();
|
175 |
-
foreach ($setting as $key => $value) {
|
176 |
-
$msg[] = $key . ': ' . $value;
|
177 |
-
}
|
178 |
-
$this->messages[] = implode(' | ', $msg);
|
179 |
-
}
|
180 |
-
|
181 |
-
}
|
182 |
-
return true;
|
183 |
-
}
|
184 |
-
|
185 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fooman/Common/Model/Selftester/Abstract.php
DELETED
@@ -1,126 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Fooman Common
|
4 |
-
*
|
5 |
-
* @package Fooman_Common
|
6 |
-
* @author Kristof Ringleff <kristof@fooman.co.nz>
|
7 |
-
* @copyright Copyright (c) 2012 Fooman Limited (http://www.fooman.co.nz)
|
8 |
-
*
|
9 |
-
* For the full copyright and license information, please view the LICENSE
|
10 |
-
* file that was distributed with this source code.
|
11 |
-
*/
|
12 |
-
|
13 |
-
class Fooman_Common_Model_Selftester_Abstract extends Mage_Core_Model_Abstract
|
14 |
-
{
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Helper to test for rewrites
|
18 |
-
*
|
19 |
-
* @param array $currentRow The rewrite info
|
20 |
-
*
|
21 |
-
* @throws Exception
|
22 |
-
*
|
23 |
-
* @return void
|
24 |
-
*/
|
25 |
-
protected function _testRewriteRow(array $currentRow)
|
26 |
-
{
|
27 |
-
switch ($currentRow[0]) {
|
28 |
-
case 'resource-model':
|
29 |
-
$model = Mage::getResourceModel($currentRow[1]);
|
30 |
-
if (get_class($model) != $currentRow[2]) {
|
31 |
-
throw new Exception(
|
32 |
-
'Trying to load class ' . $currentRow[2] . 'returns ' . get_class($model)
|
33 |
-
. '. Please refresh your Magento configuration cache and check
|
34 |
-
if you have any conflicting extensions installed.'
|
35 |
-
);
|
36 |
-
}
|
37 |
-
break;
|
38 |
-
|
39 |
-
case 'model':
|
40 |
-
$model = Mage::getModel($currentRow[1]);
|
41 |
-
if (!($model instanceof $currentRow[2])) {
|
42 |
-
throw new Exception(
|
43 |
-
'Trying to load class ' . $currentRow[2] . ' returns ' . get_class($model)
|
44 |
-
. '. Please refresh your Magento configuration cache and check
|
45 |
-
if you have any conflicting extensions installed.'
|
46 |
-
);
|
47 |
-
}
|
48 |
-
if (get_class($model) != $currentRow[2]) {
|
49 |
-
throw new Exception(
|
50 |
-
'Trying to load class ' . $currentRow[2] . ' returns correct instance but unexpected class '
|
51 |
-
. get_class($model). '. Please refresh your Magento configuration cache and check
|
52 |
-
if you have any conflicting extensions installed.'
|
53 |
-
);
|
54 |
-
}
|
55 |
-
break;
|
56 |
-
case 'block':
|
57 |
-
$block = Mage::app()->getLayout()->createBlock($currentRow[1]);
|
58 |
-
if (!($block instanceof $currentRow[2])) {
|
59 |
-
throw new Exception(
|
60 |
-
'Trying to load block ' . $currentRow[2] . ' returns ' . get_class($block)
|
61 |
-
. '. Please refresh your Magento configuration cache and check
|
62 |
-
if you have any conflicting extensions installed.'
|
63 |
-
);
|
64 |
-
}
|
65 |
-
if (get_class($block) != $currentRow[2]) {
|
66 |
-
throw new Exception(
|
67 |
-
'Trying to load block ' . $currentRow[2] . ' returns correct instance but unexpected class '
|
68 |
-
. get_class($block). '. Please refresh your Magento configuration cache and check
|
69 |
-
if you have any conflicting extensions installed.'
|
70 |
-
);
|
71 |
-
}
|
72 |
-
break;
|
73 |
-
}
|
74 |
-
}
|
75 |
-
|
76 |
-
/**
|
77 |
-
* add Mage version to messages
|
78 |
-
*
|
79 |
-
* @return void
|
80 |
-
*/
|
81 |
-
public function _getVersions()
|
82 |
-
{
|
83 |
-
$this->messages[] = "Magento version: " . Mage::getVersion();
|
84 |
-
}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* stub for retrieval of database fields
|
88 |
-
*
|
89 |
-
* @return array
|
90 |
-
*/
|
91 |
-
public function _getDbFields()
|
92 |
-
{
|
93 |
-
return array();
|
94 |
-
}
|
95 |
-
|
96 |
-
/**
|
97 |
-
* stub for retrieval of rewrite information
|
98 |
-
*
|
99 |
-
* @return array
|
100 |
-
*/
|
101 |
-
public function _getRewrites ()
|
102 |
-
{
|
103 |
-
return array();
|
104 |
-
}
|
105 |
-
|
106 |
-
/**
|
107 |
-
* stub for list of files
|
108 |
-
*
|
109 |
-
* @return array
|
110 |
-
*/
|
111 |
-
public function _getFiles ()
|
112 |
-
{
|
113 |
-
return array();
|
114 |
-
}
|
115 |
-
|
116 |
-
/**
|
117 |
-
* stub for db settings
|
118 |
-
*
|
119 |
-
* @return array
|
120 |
-
*/
|
121 |
-
public function _getSettings()
|
122 |
-
{
|
123 |
-
return array();
|
124 |
-
}
|
125 |
-
|
126 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fooman/Common/Model/Selftester/Db.php
DELETED
@@ -1,146 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Fooman Common
|
4 |
-
*
|
5 |
-
* @package Fooman_Common
|
6 |
-
* @author Kristof Ringleff <kristof@fooman.co.nz>
|
7 |
-
* @copyright Copyright (c) 2012 Fooman Limited (http://www.fooman.co.nz)
|
8 |
-
*
|
9 |
-
* For the full copyright and license information, please view the LICENSE
|
10 |
-
* file that was distributed with this source code.
|
11 |
-
*/
|
12 |
-
|
13 |
-
class Fooman_Common_Model_Selftester_Db extends Mage_Core_Model_Abstract
|
14 |
-
{
|
15 |
-
public $messages = array();
|
16 |
-
public $errorOccurred = false;
|
17 |
-
protected $_dbOkay = true;
|
18 |
-
|
19 |
-
|
20 |
-
/**
|
21 |
-
* check the database for expected tables, columns and attributes
|
22 |
-
*
|
23 |
-
* @param Fooman_Common_Model_Selftester $selftester
|
24 |
-
*
|
25 |
-
* @return bool
|
26 |
-
*/
|
27 |
-
public function dbCheck (Fooman_Common_Model_Selftester $selftester)
|
28 |
-
{
|
29 |
-
$localError = false;
|
30 |
-
$selftester->messages[] = "Checking database";
|
31 |
-
$installer = new Mage_Sales_Model_Mysql4_Setup('sales_setup');
|
32 |
-
$installer->startSetup();
|
33 |
-
|
34 |
-
foreach ($selftester->_getDbFields() as $field) {
|
35 |
-
switch ($field[0]) {
|
36 |
-
case 'eav':
|
37 |
-
$localError = $this->_dbCheckEav($selftester, $field, $installer, $localError);
|
38 |
-
break;
|
39 |
-
case 'sql-column':
|
40 |
-
$localError = $this->_dbCheckSqlColumn($selftester, $field, $installer, $localError);
|
41 |
-
break;
|
42 |
-
}
|
43 |
-
}
|
44 |
-
$installer->endSetup();
|
45 |
-
if (empty($localError)) {
|
46 |
-
return true;
|
47 |
-
} else {
|
48 |
-
if ($this->_dbOkay == false) {
|
49 |
-
$selftester->messages[]
|
50 |
-
= "<p>The selftest has found some problems with your database install.
|
51 |
-
You can attempt to fix this by clicking this <a href=\""
|
52 |
-
. htmlentities(Mage::helper('core/http')->getServer('PHP_SELF', ''))
|
53 |
-
. "?fix=true\">link</a>.</p><p style=\"color:red;\"><em>A DATABASE BACKUP IS strongly
|
54 |
-
RECOMMENDED BEFORE ATTEMPTING THIS!</em></p>";
|
55 |
-
}
|
56 |
-
return false;
|
57 |
-
}
|
58 |
-
}
|
59 |
-
|
60 |
-
/**
|
61 |
-
* check the DB for an expected EAV attribute
|
62 |
-
*
|
63 |
-
* @param Fooman_Common_Model_Selftester $selftester
|
64 |
-
* @param $field
|
65 |
-
* @param $installer
|
66 |
-
* @param $localError
|
67 |
-
*
|
68 |
-
* @return bool
|
69 |
-
*/
|
70 |
-
protected function _dbCheckEav(Fooman_Common_Model_Selftester $selftester, $field, $installer, $localError)
|
71 |
-
{
|
72 |
-
try {
|
73 |
-
$attribute = Mage::getModel('eav/entity_attribute')->loadByCode($field[1], $field[2]);
|
74 |
-
if (!$attribute->getId() > 0) {
|
75 |
-
$localError = true;
|
76 |
-
throw new Exception('eav attribute ' . $field[2] . ' is not installed');
|
77 |
-
}
|
78 |
-
$selftester->messages[] = "[OK] eav attribute " . $field[2]." with id ".$attribute->getId()."";
|
79 |
-
} catch (Exception $e) {
|
80 |
-
if ($selftester->shouldFix()) {
|
81 |
-
$selftester->messages[] = "Attempting fix for eav attribute " . $field[2]."";
|
82 |
-
try {
|
83 |
-
$installer->addAttribute($field[1], $field[2], $field[3]);
|
84 |
-
$selftester->messages[] = "[FIX OK] eav attribute " . $field[2]." fixed";
|
85 |
-
} catch (Exception $e) {
|
86 |
-
$selftester->messages[] = "[FAILED] fixing eav attribute " . $field[2]."";
|
87 |
-
$this->_dbOkay = false;
|
88 |
-
$selftester->messages[] = $e->getMessage();
|
89 |
-
$localError = true;
|
90 |
-
}
|
91 |
-
} else {
|
92 |
-
$selftester->messages[] = "[FAILED] eav attribute " . $field[2] . "";
|
93 |
-
$this->_dbOkay = false;
|
94 |
-
$selftester->messages[] = "[ERR] ".$e->getMessage();
|
95 |
-
$localError = true;
|
96 |
-
}
|
97 |
-
}
|
98 |
-
return $localError;
|
99 |
-
}
|
100 |
-
|
101 |
-
|
102 |
-
/**
|
103 |
-
* check the DB for an expected table column
|
104 |
-
*
|
105 |
-
* @param Fooman_Common_Model_Selftester $selftester
|
106 |
-
* @param $field
|
107 |
-
* @param $installer
|
108 |
-
* @param $localError
|
109 |
-
*
|
110 |
-
* @return bool
|
111 |
-
*/
|
112 |
-
protected function _dbCheckSqlColumn(Fooman_Common_Model_Selftester $selftester, $field, $installer, $localError)
|
113 |
-
{
|
114 |
-
try {
|
115 |
-
if (!$installer->getConnection()->tableColumnExists($field[1], $field[2])) {
|
116 |
-
throw new Exception(sprintf('Did not find column %s in table %s'), $field[2], $field[1]);
|
117 |
-
}
|
118 |
-
$selftester->messages[] = "[OK] column " . $field[2]."";
|
119 |
-
} catch (Exception $e) {
|
120 |
-
if ($selftester->shouldFix()) {
|
121 |
-
$selftester->messages[] = "Attempting fix for column " . $field[2]."";
|
122 |
-
try {
|
123 |
-
$installer->getConnection()->addColumn(
|
124 |
-
$installer->getTable($field[1]),
|
125 |
-
$field[2],
|
126 |
-
$field[3]
|
127 |
-
);
|
128 |
-
$selftester->messages[] = "[FIX OK] column " . $field[2]." fixed";
|
129 |
-
} catch (Exception $e) {
|
130 |
-
$selftester->messages[] = "[FAILED] fixing column " . $field[2]."";
|
131 |
-
$this->_dbOkay = false;
|
132 |
-
$selftester->messages[] = $e->getMessage();
|
133 |
-
$localError = true;
|
134 |
-
}
|
135 |
-
} else {
|
136 |
-
$selftester->messages[] = "[FAILED] column " . $field[2]."";
|
137 |
-
$this->_dbOkay = false;
|
138 |
-
$selftester->messages[] = "[ERR] ".$e->getMessage();
|
139 |
-
$localError = true;
|
140 |
-
}
|
141 |
-
}
|
142 |
-
return $localError;
|
143 |
-
|
144 |
-
}
|
145 |
-
|
146 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fooman/Common/controllers/Adminhtml/SelftesterController.php
DELETED
@@ -1,56 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Fooman_Common_Adminhtml_SelftesterController extends Mage_Adminhtml_Controller_Action
|
4 |
-
{
|
5 |
-
protected function _initAction()
|
6 |
-
{
|
7 |
-
return $this;
|
8 |
-
}
|
9 |
-
|
10 |
-
public function indexAction()
|
11 |
-
{
|
12 |
-
//Here we actually run the process of selftesting. All messages are returned to the session
|
13 |
-
$module = $this->getRequest()->getParam('module');
|
14 |
-
$selftester = Mage::getModel($module . '/selftester')->main();
|
15 |
-
//Here we get db version of the given module code
|
16 |
-
if (Mage::getModel('core/mysql4_resource')->getDbVersion($module . '_setup')) {
|
17 |
-
$dbVersion = Mage::getModel('core/mysql4_resource')->getDbVersion($module . '_setup');
|
18 |
-
} else {
|
19 |
-
$dbVersion = 'Not Available';
|
20 |
-
}
|
21 |
-
|
22 |
-
//Here we get data version of the given module code
|
23 |
-
if (Mage::getModel('core/mysql4_resource')->getDataVersion($module . '_setup')) {
|
24 |
-
$dataVersion = Mage::getModel('core/mysql4_resource')->getDataVersion($module . '_setup');
|
25 |
-
} else {
|
26 |
-
$dataVersion = 'Not Available';
|
27 |
-
}
|
28 |
-
//Here we get configuration version of the given module name
|
29 |
-
$moduleName = $this->getRequest()->getParam('moduleName');
|
30 |
-
$configVersion = (string)Mage::getConfig()->getModuleConfig($moduleName)->version;
|
31 |
-
$selftester->messages = array_merge(
|
32 |
-
array(
|
33 |
-
'Config Version: ' . $configVersion,
|
34 |
-
'DB Version: ' . $dbVersion,
|
35 |
-
'Data Version: ' . $dataVersion,
|
36 |
-
), $selftester->messages
|
37 |
-
);
|
38 |
-
|
39 |
-
if (!$selftester->errorOccurred) {
|
40 |
-
Mage::getSingleton('core/session')->addSuccess(implode("<br/>", $selftester->messages));
|
41 |
-
} else {
|
42 |
-
Mage::getSingleton('core/session')->addError(implode("<br/>", $selftester->messages));
|
43 |
-
}
|
44 |
-
//Here we load appropriate layout. In our case its popup
|
45 |
-
$layout = $this->getLayout();
|
46 |
-
$layout->getUpdate()->load('selftest_popup');
|
47 |
-
$layout->generateXml();
|
48 |
-
$layout->generateBlocks();
|
49 |
-
$output = $layout->getOutput();
|
50 |
-
|
51 |
-
$this->getResponse()->setBody($output);
|
52 |
-
//Here we clear all the messages of the current session, because otherwise we will get a number
|
53 |
-
//of duplicates from the previous page loads.
|
54 |
-
Mage::getSingleton('core/session')->getMesssages(true);
|
55 |
-
}
|
56 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fooman/Common/etc/config.xml
DELETED
@@ -1,76 +0,0 @@
|
|
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.1.1</version>
|
13 |
-
</Fooman_Common>
|
14 |
-
</modules>
|
15 |
-
<global>
|
16 |
-
<blocks>
|
17 |
-
<foomancommon>
|
18 |
-
<class>Fooman_Common_Block</class>
|
19 |
-
</foomancommon>
|
20 |
-
</blocks>
|
21 |
-
<models>
|
22 |
-
<foomancommon>
|
23 |
-
<class>Fooman_Common_Model</class>
|
24 |
-
</foomancommon>
|
25 |
-
</models>
|
26 |
-
<helpers>
|
27 |
-
<foomancommon>
|
28 |
-
<class>Fooman_Common_Helper</class>
|
29 |
-
</foomancommon>
|
30 |
-
</helpers>
|
31 |
-
</global>
|
32 |
-
<admin>
|
33 |
-
<routers>
|
34 |
-
<adminhtml>
|
35 |
-
<args>
|
36 |
-
<modules>
|
37 |
-
<foomancommon after="Mage_Adminhtml">Fooman_Common_Adminhtml</foomancommon>
|
38 |
-
</modules>
|
39 |
-
</args>
|
40 |
-
</adminhtml>
|
41 |
-
</routers>
|
42 |
-
</admin>
|
43 |
-
<adminhtml>
|
44 |
-
<layout>
|
45 |
-
<updates>
|
46 |
-
<foomancommon>
|
47 |
-
<file>fooman_common.xml</file>
|
48 |
-
</foomancommon>
|
49 |
-
</updates>
|
50 |
-
</layout>
|
51 |
-
<acl>
|
52 |
-
<resources>
|
53 |
-
<admin>
|
54 |
-
<children>
|
55 |
-
<foomancommon translate="title" module="foomancommon">
|
56 |
-
<title>Fooman Selftests</title>
|
57 |
-
<sort_order>-100</sort_order>
|
58 |
-
</foomancommon>
|
59 |
-
<system>
|
60 |
-
<children>
|
61 |
-
<config>
|
62 |
-
<children>
|
63 |
-
<foomancommon translate="title" module="foomancommon">
|
64 |
-
<title>Fooman</title>
|
65 |
-
<sort_order>50</sort_order>
|
66 |
-
</foomancommon>
|
67 |
-
</children>
|
68 |
-
</config>
|
69 |
-
</children>
|
70 |
-
</system>
|
71 |
-
</children>
|
72 |
-
</admin>
|
73 |
-
</resources>
|
74 |
-
</acl>
|
75 |
-
</adminhtml>
|
76 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fooman/Common/etc/system.xml
DELETED
@@ -1,37 +0,0 @@
|
|
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>Support</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 |
-
<extensions translate="label" module="foomancommon">
|
27 |
-
<label>Extensions Installed</label>
|
28 |
-
<comment>Here you can find a list of all Fooman extensions currently installed on your system.</comment>
|
29 |
-
<sort_order>101</sort_order>
|
30 |
-
<show_in_default>1</show_in_default>
|
31 |
-
<show_in_website>1</show_in_website>
|
32 |
-
<show_in_store>0</show_in_store>
|
33 |
-
</extensions>
|
34 |
-
</groups>
|
35 |
-
</foomancommon>
|
36 |
-
</sections>
|
37 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fooman/EmailAttachments/Block/Adminhtml/Extensioninfo.php
CHANGED
@@ -1,4 +1,12 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
class Fooman_EmailAttachments_Block_Adminhtml_Extensioninfo extends Fooman_Common_Block_Adminhtml_Extensioninfo
|
4 |
{
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* @author Kristof Ringleff
|
4 |
+
* @package Fooman_EmailAttachments
|
5 |
+
* @copyright Copyright (c) 2009 Fooman Limited (http://www.fooman.co.nz)
|
6 |
+
*
|
7 |
+
* For the full copyright and license information, please view the LICENSE
|
8 |
+
* file that was distributed with this source code.
|
9 |
+
*/
|
10 |
|
11 |
class Fooman_EmailAttachments_Block_Adminhtml_Extensioninfo extends Fooman_Common_Block_Adminhtml_Extensioninfo
|
12 |
{
|
app/code/community/Fooman/EmailAttachments/Block/View.php
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Fooman_EmailAttachments_Block_View extends Mage_Adminhtml_Block_Sales_Order_View {
|
3 |
-
|
4 |
-
public function __construct() {
|
5 |
-
parent::__construct();
|
6 |
-
$this->_addButton('print', array(
|
7 |
-
'label' => Mage::helper('sales')->__('Print'),
|
8 |
-
'class' => 'save',
|
9 |
-
'onclick' => 'setLocation(\''.$this->getPrintUrl().'\')'
|
10 |
-
)
|
11 |
-
);
|
12 |
-
}
|
13 |
-
|
14 |
-
public function getPrintUrl() {
|
15 |
-
return $this->getUrl('emailattachments/admin_order/print', array(
|
16 |
-
'order_id' => $this->getOrder()->getId()
|
17 |
-
));
|
18 |
-
}
|
19 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Fooman/EmailAttachments/Helper/Data.php
CHANGED
@@ -29,7 +29,11 @@ class Fooman_EmailAttachments_Helper_Data extends Mage_Core_Helper_Abstract
|
|
29 |
$this->debug('ADDING ATTACHMENT: ' . $name);
|
30 |
$file = $pdf->render();
|
31 |
$mailObj->getMail()->createAttachment(
|
32 |
-
$file,
|
|
|
|
|
|
|
|
|
33 |
);
|
34 |
$this->debug('FINISHED ADDING ATTACHMENT: ' . $name);
|
35 |
} catch (Exception $e) {
|
@@ -54,8 +58,11 @@ class Fooman_EmailAttachments_Helper_Data extends Mage_Core_Helper_Abstract
|
|
54 |
$filePath = Mage::getBaseDir('media') . DS . 'pdfs' . DS .$file;
|
55 |
if (file_exists($filePath)) {
|
56 |
$mailObj->getMail()->createAttachment(
|
57 |
-
file_get_contents($filePath),
|
58 |
-
|
|
|
|
|
|
|
59 |
);
|
60 |
}
|
61 |
$this->debug('FINISHED ADDING ATTACHMENT: ' . $file);
|
@@ -88,7 +95,7 @@ class Fooman_EmailAttachments_Helper_Data extends Mage_Core_Helper_Abstract
|
|
88 |
$cmsHelper = Mage::helper('cms');
|
89 |
if (Mage::helper('core')->isModuleEnabled('Fooman_PdfCustomiser')) {
|
90 |
$pdf = Mage::getModel('pdfcustomiser/agreement')->getPdf(array($storeId=> $agreement));
|
91 |
-
$this->addAttachment($pdf, $mailObj,
|
92 |
} else {
|
93 |
$processor = $cmsHelper->getPageTemplateProcessor();
|
94 |
$content = $processor->filter($agreement->getContent());
|
@@ -97,13 +104,13 @@ class Fooman_EmailAttachments_Helper_Data extends Mage_Core_Helper_Abstract
|
|
97 |
. $content . '</body></html>';
|
98 |
$mailObj->getMail()->createAttachment(
|
99 |
$html, 'text/html', Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64,
|
100 |
-
|
101 |
);
|
102 |
} else {
|
103 |
$mailObj->getMail()->createAttachment(
|
104 |
Mage::helper('core')->escapeHtml($content), 'text/plain',
|
105 |
Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64,
|
106 |
-
|
107 |
);
|
108 |
}
|
109 |
}
|
@@ -137,10 +144,15 @@ class Fooman_EmailAttachments_Helper_Data extends Mage_Core_Helper_Abstract
|
|
137 |
return false;
|
138 |
}
|
139 |
|
|
|
|
|
|
|
|
|
|
|
140 |
public function addButton($block)
|
141 |
{
|
142 |
$block->addButton(
|
143 |
-
'
|
144 |
'label' => Mage::helper('sales')->__('Print'),
|
145 |
'class' => 'save',
|
146 |
'onclick' => 'setLocation(\'' . $this->getPrintUrl($block) . '\')'
|
@@ -164,6 +176,14 @@ class Fooman_EmailAttachments_Helper_Data extends Mage_Core_Helper_Abstract
|
|
164 |
);
|
165 |
}
|
166 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
public function getEmails($configPath, $storeId)
|
168 |
{
|
169 |
$data = Mage::getStoreConfig($configPath, $storeId);
|
@@ -172,4 +192,29 @@ class Fooman_EmailAttachments_Helper_Data extends Mage_Core_Helper_Abstract
|
|
172 |
}
|
173 |
return false;
|
174 |
}
|
175 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
$this->debug('ADDING ATTACHMENT: ' . $name);
|
30 |
$file = $pdf->render();
|
31 |
$mailObj->getMail()->createAttachment(
|
32 |
+
$file,
|
33 |
+
'application/pdf',
|
34 |
+
Zend_Mime::DISPOSITION_ATTACHMENT,
|
35 |
+
Zend_Mime::ENCODING_BASE64,
|
36 |
+
$name . '.pdf'
|
37 |
);
|
38 |
$this->debug('FINISHED ADDING ATTACHMENT: ' . $name);
|
39 |
} catch (Exception $e) {
|
58 |
$filePath = Mage::getBaseDir('media') . DS . 'pdfs' . DS .$file;
|
59 |
if (file_exists($filePath)) {
|
60 |
$mailObj->getMail()->createAttachment(
|
61 |
+
file_get_contents($filePath),
|
62 |
+
'application/pdf',
|
63 |
+
Zend_Mime::DISPOSITION_ATTACHMENT,
|
64 |
+
Zend_Mime::ENCODING_BASE64,
|
65 |
+
basename($filePath)
|
66 |
);
|
67 |
}
|
68 |
$this->debug('FINISHED ADDING ATTACHMENT: ' . $file);
|
95 |
$cmsHelper = Mage::helper('cms');
|
96 |
if (Mage::helper('core')->isModuleEnabled('Fooman_PdfCustomiser')) {
|
97 |
$pdf = Mage::getModel('pdfcustomiser/agreement')->getPdf(array($storeId=> $agreement));
|
98 |
+
$this->addAttachment($pdf, $mailObj, $this->_encodedFileName($agreement->getName()));
|
99 |
} else {
|
100 |
$processor = $cmsHelper->getPageTemplateProcessor();
|
101 |
$content = $processor->filter($agreement->getContent());
|
104 |
. $content . '</body></html>';
|
105 |
$mailObj->getMail()->createAttachment(
|
106 |
$html, 'text/html', Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64,
|
107 |
+
$this->_encodedFileName($agreement->getName() . '.html')
|
108 |
);
|
109 |
} else {
|
110 |
$mailObj->getMail()->createAttachment(
|
111 |
Mage::helper('core')->escapeHtml($content), 'text/plain',
|
112 |
Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64,
|
113 |
+
$this->_encodedFileName($agreement->getName() . '.txt')
|
114 |
);
|
115 |
}
|
116 |
}
|
144 |
return false;
|
145 |
}
|
146 |
|
147 |
+
/**
|
148 |
+
* add print button to block
|
149 |
+
*
|
150 |
+
* @param $block
|
151 |
+
*/
|
152 |
public function addButton($block)
|
153 |
{
|
154 |
$block->addButton(
|
155 |
+
'fooman_print', array(
|
156 |
'label' => Mage::helper('sales')->__('Print'),
|
157 |
'class' => 'save',
|
158 |
'onclick' => 'setLocation(\'' . $this->getPrintUrl($block) . '\')'
|
176 |
);
|
177 |
}
|
178 |
|
179 |
+
/**
|
180 |
+
* get array of email addresses
|
181 |
+
*
|
182 |
+
* @param $configPath
|
183 |
+
* @param $storeId
|
184 |
+
*
|
185 |
+
* @return array|bool
|
186 |
+
*/
|
187 |
public function getEmails($configPath, $storeId)
|
188 |
{
|
189 |
$data = Mage::getStoreConfig($configPath, $storeId);
|
192 |
}
|
193 |
return false;
|
194 |
}
|
195 |
+
|
196 |
+
protected function _encodedFileName($subject)
|
197 |
+
{
|
198 |
+
return sprintf('=?utf-8?B?%s?=', base64_encode($subject));
|
199 |
+
}
|
200 |
+
|
201 |
+
public function getOrderAttachmentName($order)
|
202 |
+
{
|
203 |
+
return Mage::helper('sales')->__('Order') . "_" . $order->getIncrementId();
|
204 |
+
}
|
205 |
+
|
206 |
+
public function getInvoiceAttachmentName($invoice)
|
207 |
+
{
|
208 |
+
return Mage::helper('sales')->__('Invoice') . "_" . $invoice->getIncrementId();
|
209 |
+
}
|
210 |
+
|
211 |
+
public function getShipmentAttachmentName($shipment)
|
212 |
+
{
|
213 |
+
return Mage::helper('sales')->__('Shipment') . "_" . $shipment->getIncrementId();
|
214 |
+
}
|
215 |
+
|
216 |
+
public function getCreditmemoAttachmentName($creditmemo)
|
217 |
+
{
|
218 |
+
return Mage::helper('sales')->__('Credit Memo') . "_" . $creditmemo->getIncrementId();
|
219 |
+
}
|
220 |
+
}
|
app/code/community/Fooman/EmailAttachments/Model/Core/Email/Template/Mailer.php
CHANGED
@@ -18,10 +18,10 @@ class Fooman_EmailAttachments_Model_Core_Email_Template_Mailer extends Mage_Core
|
|
18 |
*/
|
19 |
public function send()
|
20 |
{
|
21 |
-
$emailTemplate = Mage::getModel('core/email_template');
|
22 |
$helper = Mage::helper('emailattachments');
|
23 |
// Send all emails from corresponding list
|
24 |
while (!empty($this->_emailInfos)) {
|
|
|
25 |
$emailInfo = array_pop($this->_emailInfos);
|
26 |
$helper->debug('NEW EMAIL------------------------------------------');
|
27 |
$helper->debug($emailInfo->getToNames());
|
@@ -29,7 +29,7 @@ class Fooman_EmailAttachments_Model_Core_Email_Template_Mailer extends Mage_Core
|
|
29 |
// Handle "Bcc" recepients of the current email
|
30 |
$emailTemplate->addBcc($emailInfo->getBccEmails());
|
31 |
// Set required design parameters and delegate email sending to Mage_Core_Model_Email_Template
|
32 |
-
$
|
33 |
->sendTransactional(
|
34 |
$this->getTemplateId(),
|
35 |
$this->getSender(),
|
@@ -38,7 +38,7 @@ class Fooman_EmailAttachments_Model_Core_Email_Template_Mailer extends Mage_Core
|
|
38 |
$this->getTemplateParams(),
|
39 |
$this->getStoreId()
|
40 |
);
|
41 |
-
|
42 |
}
|
43 |
return $this;
|
44 |
}
|
@@ -57,127 +57,140 @@ class Fooman_EmailAttachments_Model_Core_Email_Template_Mailer extends Mage_Core
|
|
57 |
//compare template id to work out what we are currently sending
|
58 |
switch ($this->getTemplateId()) {
|
59 |
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
}
|
182 |
}
|
183 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
*/
|
19 |
public function send()
|
20 |
{
|
|
|
21 |
$helper = Mage::helper('emailattachments');
|
22 |
// Send all emails from corresponding list
|
23 |
while (!empty($this->_emailInfos)) {
|
24 |
+
$emailTemplate = Mage::getModel('core/email_template');
|
25 |
$emailInfo = array_pop($this->_emailInfos);
|
26 |
$helper->debug('NEW EMAIL------------------------------------------');
|
27 |
$helper->debug($emailInfo->getToNames());
|
29 |
// Handle "Bcc" recepients of the current email
|
30 |
$emailTemplate->addBcc($emailInfo->getBccEmails());
|
31 |
// Set required design parameters and delegate email sending to Mage_Core_Model_Email_Template
|
32 |
+
$emailTemplate->setDesignConfig(array('area' => 'frontend', 'store' => $this->getStoreId()))
|
33 |
->sendTransactional(
|
34 |
$this->getTemplateId(),
|
35 |
$this->getSender(),
|
38 |
$this->getTemplateParams(),
|
39 |
$this->getStoreId()
|
40 |
);
|
41 |
+
$helper->debug('FINISHED SENDING');
|
42 |
}
|
43 |
return $this;
|
44 |
}
|
57 |
//compare template id to work out what we are currently sending
|
58 |
switch ($this->getTemplateId()) {
|
59 |
|
60 |
+
//Order
|
61 |
+
case Mage::getStoreConfig(Mage_Sales_Model_Order::XML_PATH_EMAIL_TEMPLATE, $storeId):
|
62 |
+
case Mage::getStoreConfig(Mage_Sales_Model_Order::XML_PATH_EMAIL_GUEST_TEMPLATE, $storeId):
|
63 |
+
Mage::dispatchEvent(
|
64 |
+
'fooman_emailattachments_before_send_order',
|
65 |
+
array(
|
66 |
+
'update' => false,
|
67 |
+
'template' => $emailTemplate,
|
68 |
+
'object' => $templateParams['order'],
|
69 |
+
'email_info' => $emailInfo
|
70 |
+
)
|
71 |
+
);
|
72 |
+
break;
|
73 |
+
//Order Updates
|
74 |
+
case Mage::getStoreConfig(Mage_Sales_Model_Order::XML_PATH_UPDATE_EMAIL_TEMPLATE, $storeId):
|
75 |
+
case Mage::getStoreConfig(Mage_Sales_Model_Order::XML_PATH_UPDATE_EMAIL_GUEST_TEMPLATE, $storeId):
|
76 |
+
Mage::dispatchEvent(
|
77 |
+
'fooman_emailattachments_before_send_order',
|
78 |
+
array(
|
79 |
+
'update' => true,
|
80 |
+
'template' => $emailTemplate,
|
81 |
+
'object' => $templateParams['order'],
|
82 |
+
'email_info' => $emailInfo
|
83 |
+
)
|
84 |
+
);
|
85 |
+
break;
|
86 |
|
87 |
+
//Invoice
|
88 |
+
case Mage::getStoreConfig(Mage_Sales_Model_Order_Invoice::XML_PATH_EMAIL_TEMPLATE, $storeId):
|
89 |
+
case Mage::getStoreConfig(Mage_Sales_Model_Order_Invoice::XML_PATH_EMAIL_GUEST_TEMPLATE, $storeId):
|
90 |
+
Mage::dispatchEvent(
|
91 |
+
'fooman_emailattachments_before_send_invoice',
|
92 |
+
array(
|
93 |
+
'update' => false,
|
94 |
+
'template' => $emailTemplate,
|
95 |
+
'object' => $templateParams['invoice'],
|
96 |
+
'email_info' => $emailInfo
|
97 |
+
)
|
98 |
+
);
|
99 |
+
break;
|
100 |
|
101 |
+
//Invoice Updates
|
102 |
+
case Mage::getStoreConfig(Mage_Sales_Model_Order_Invoice::XML_PATH_UPDATE_EMAIL_TEMPLATE, $storeId):
|
103 |
+
case Mage::getStoreConfig(Mage_Sales_Model_Order_Invoice::XML_PATH_UPDATE_EMAIL_GUEST_TEMPLATE, $storeId):
|
104 |
+
Mage::dispatchEvent(
|
105 |
+
'fooman_emailattachments_before_send_invoice',
|
106 |
+
array(
|
107 |
+
'update' => true,
|
108 |
+
'template' => $emailTemplate,
|
109 |
+
'object' => $templateParams['invoice'],
|
110 |
+
'email_info' => $emailInfo
|
111 |
+
)
|
112 |
+
);
|
113 |
+
break;
|
114 |
|
115 |
+
//Shipment
|
116 |
+
case Mage::getStoreConfig(Mage_Sales_Model_Order_Shipment::XML_PATH_EMAIL_TEMPLATE, $storeId):
|
117 |
+
case Mage::getStoreConfig(Mage_Sales_Model_Order_Shipment::XML_PATH_EMAIL_GUEST_TEMPLATE, $storeId):
|
118 |
+
Mage::dispatchEvent(
|
119 |
+
'fooman_emailattachments_before_send_shipment',
|
120 |
+
array(
|
121 |
+
'update' => false,
|
122 |
+
'template' => $emailTemplate,
|
123 |
+
'object' => $templateParams['shipment'],
|
124 |
+
'email_info' => $emailInfo
|
125 |
+
)
|
126 |
+
);
|
127 |
+
break;
|
128 |
|
129 |
+
//Shipment Updates
|
130 |
+
case Mage::getStoreConfig(Mage_Sales_Model_Order_Shipment::XML_PATH_UPDATE_EMAIL_TEMPLATE, $storeId):
|
131 |
+
case Mage::getStoreConfig(Mage_Sales_Model_Order_Shipment::XML_PATH_UPDATE_EMAIL_GUEST_TEMPLATE, $storeId):
|
132 |
+
Mage::dispatchEvent(
|
133 |
+
'fooman_emailattachments_before_send_shipment',
|
134 |
+
array(
|
135 |
+
'update' => true,
|
136 |
+
'template' => $emailTemplate,
|
137 |
+
'object' => $templateParams['shipment'],
|
138 |
+
'email_info' => $emailInfo
|
139 |
+
)
|
140 |
+
);
|
141 |
+
break;
|
142 |
|
143 |
+
//Creditmemo
|
144 |
+
case Mage::getStoreConfig(Mage_Sales_Model_Order_Creditmemo::XML_PATH_EMAIL_TEMPLATE, $storeId):
|
145 |
+
case Mage::getStoreConfig(Mage_Sales_Model_Order_Creditmemo::XML_PATH_EMAIL_GUEST_TEMPLATE, $storeId):
|
146 |
+
Mage::dispatchEvent(
|
147 |
+
'fooman_emailattachments_before_send_creditmemo',
|
148 |
+
array(
|
149 |
+
'update' => false,
|
150 |
+
'template' => $emailTemplate,
|
151 |
+
'object' => $templateParams['creditmemo'],
|
152 |
+
'email_info' => $emailInfo
|
153 |
+
)
|
154 |
+
);
|
155 |
+
break;
|
156 |
|
157 |
+
//Creditmemo Updates
|
158 |
+
case Mage::getStoreConfig(Mage_Sales_Model_Order_Creditmemo::XML_PATH_UPDATE_EMAIL_TEMPLATE, $storeId):
|
159 |
+
case Mage::getStoreConfig(
|
160 |
+
Mage_Sales_Model_Order_Creditmemo::XML_PATH_UPDATE_EMAIL_GUEST_TEMPLATE, $storeId
|
161 |
+
):
|
162 |
+
Mage::dispatchEvent(
|
163 |
+
'fooman_emailattachments_before_send_creditmemo',
|
164 |
+
array(
|
165 |
+
'update' => true,
|
166 |
+
'template' => $emailTemplate,
|
167 |
+
'object' => $templateParams['creditmemo'],
|
168 |
+
'email_info' => $emailInfo
|
169 |
+
)
|
170 |
+
);
|
171 |
+
break;
|
172 |
+
default:
|
173 |
+
Mage::dispatchEvent(
|
174 |
+
'fooman_emailattachments_before_send',
|
175 |
+
array(
|
176 |
+
'template' => $emailTemplate,
|
177 |
+
'params' => $templateParams,
|
178 |
+
'email_info' => $emailInfo
|
179 |
+
)
|
180 |
+
);
|
181 |
}
|
182 |
}
|
183 |
+
|
184 |
+
public function sendMageEvent($name, $update, $emailTemplate, $object, $emailInfo)
|
185 |
+
{
|
186 |
+
Mage::dispatchEvent(
|
187 |
+
$name,
|
188 |
+
array(
|
189 |
+
'update' => $update,
|
190 |
+
'template' => $emailTemplate,
|
191 |
+
'object' => $object,
|
192 |
+
'email_info' => $emailInfo
|
193 |
+
)
|
194 |
+
);
|
195 |
+
}
|
196 |
+
}
|
app/code/community/Fooman/EmailAttachments/Model/Observer.php
CHANGED
@@ -15,7 +15,7 @@ class Fooman_EmailAttachments_Model_Observer
|
|
15 |
const XML_PATH_ORDER_PACKINGSLIP_TEMPLATE = 'sales_email/order/shipment_template';
|
16 |
const XML_PATH_EMAIL_COPY_TO = 'sales_email/order/shipment_to';
|
17 |
|
18 |
-
const KEY_PACKING_SLIP_PROCESSED ='emailattachments-packingslip-processed';
|
19 |
|
20 |
/**
|
21 |
* observe core_block_abstract_prepare_layout_after to add a Print Orders
|
@@ -29,14 +29,15 @@ class Fooman_EmailAttachments_Model_Observer
|
|
29 |
//add button to dropdown
|
30 |
if ($block instanceof Mage_Adminhtml_Block_Widget_Grid_Massaction
|
31 |
|| $block instanceof
|
32 |
-
|
33 |
) {
|
34 |
if ($block->getRequest()->getControllerName() == 'sales_order'
|
35 |
|| $block->getRequest()->getControllerName() == 'adminhtml_sales_order'
|
36 |
|| $block->getRequest()->getControllerName() == 'sales_archive'
|
|
|
37 |
) {
|
38 |
$block->addItem(
|
39 |
-
'
|
40 |
'label'=> Mage::helper('emailattachments')->__('Print Orders'),
|
41 |
'url' => Mage::helper('adminhtml')->getUrl(
|
42 |
'emailattachments/admin_order/pdforders',
|
@@ -57,42 +58,43 @@ class Fooman_EmailAttachments_Model_Observer
|
|
57 |
*
|
58 |
* @param $observer
|
59 |
*/
|
60 |
-
public function beforeSendOrder
|
61 |
{
|
62 |
$update = $observer->getEvent()->getUpdate();
|
63 |
$mailTemplate = $observer->getEvent()->getTemplate();
|
64 |
$order = $observer->getEvent()->getObject();
|
|
|
65 |
$configPath = $update ? 'order_comment' : 'order';
|
66 |
|
67 |
-
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachpdf', $
|
68 |
//Create Pdf and attach to email - play nicely with PdfCustomiser
|
69 |
-
$appEmulation = Mage::getSingleton('core/app_emulation');
|
70 |
-
$initial = $appEmulation->startEnvironmentEmulation(
|
71 |
-
Mage_Core_Model_App::ADMIN_STORE_ID, Mage_Core_Model_App_Area::AREA_ADMINHTML, true
|
72 |
-
);
|
73 |
$pdf = Mage::getModel('emailattachments/order_pdf_order')->getPdf(array($order));
|
74 |
-
$appEmulation->stopEnvironmentEmulation($initial);
|
75 |
$mailTemplate = Mage::helper('emailattachments')->addAttachment(
|
76 |
-
$pdf, $mailTemplate,
|
77 |
);
|
78 |
}
|
79 |
|
80 |
-
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachagreement', $
|
81 |
$mailTemplate = Mage::helper('emailattachments')->addAgreements($order->getStoreId(), $mailTemplate);
|
82 |
}
|
83 |
|
84 |
-
$fileAttachment = Mage::getStoreConfig('sales_email/' . $configPath . '/attachfile', $
|
85 |
if ($fileAttachment) {
|
86 |
$mailTemplate = Mage::helper('emailattachments')->addFileAttachment($fileAttachment, $mailTemplate);
|
87 |
}
|
88 |
}
|
89 |
|
|
|
|
|
|
|
|
|
|
|
90 |
/**
|
91 |
* listen to order email send event to send packing slip
|
92 |
*
|
93 |
* @param $observer
|
94 |
*/
|
95 |
-
public function sendPackingSlip
|
96 |
{
|
97 |
if (!Mage::registry(self::KEY_PACKING_SLIP_PROCESSED)) {
|
98 |
Mage::register(self::KEY_PACKING_SLIP_PROCESSED, true);
|
@@ -104,26 +106,25 @@ class Fooman_EmailAttachments_Model_Observer
|
|
104 |
$mailTemplate = Mage::getModel('core/email_template');
|
105 |
$order = $observer->getEvent()->getObject();
|
106 |
$configPath = $update ? 'order_comment' : 'order';
|
107 |
-
$
|
|
|
108 |
|
109 |
-
if ($emails && Mage::getStoreConfig('sales_email/' . $configPath . '/sendpackingslip', $
|
110 |
-
$template = Mage::getStoreConfig(self::XML_PATH_ORDER_PACKINGSLIP_TEMPLATE, $
|
111 |
-
$pdf = Mage::getModel('sales/order_pdf_shipment')->getPdf(array(),array($order->getId()));
|
112 |
$mailTemplate = Mage::helper('emailattachments')->addAttachment(
|
113 |
$pdf, $mailTemplate, Mage::helper('sales')->__('Shipment') . "_" . $order->getIncrementId()
|
114 |
);
|
115 |
foreach ($emails as $email) {
|
116 |
-
$mailTemplate->setDesignConfig(array('area' => 'frontend', 'store' => $
|
117 |
->sendTransactional(
|
118 |
$template,
|
119 |
Mage::getStoreConfig(
|
120 |
-
Mage_Sales_Model_Order_Shipment::XML_PATH_EMAIL_IDENTITY, $
|
121 |
),
|
122 |
$email,
|
123 |
'',
|
124 |
-
array(
|
125 |
-
'order' => $order
|
126 |
-
)
|
127 |
);
|
128 |
}
|
129 |
}
|
@@ -136,33 +137,39 @@ class Fooman_EmailAttachments_Model_Observer
|
|
136 |
*
|
137 |
* @param $observer
|
138 |
*/
|
139 |
-
public function beforeSendInvoice
|
140 |
{
|
141 |
$update = $observer->getEvent()->getUpdate();
|
142 |
$mailTemplate = $observer->getEvent()->getTemplate();
|
143 |
$invoice = $observer->getEvent()->getObject();
|
|
|
144 |
$configPath = $update ? 'invoice_comment' : 'invoice';
|
145 |
|
146 |
-
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachpdf', $
|
147 |
//Create Pdf and attach to email - play nicely with PdfCustomiser
|
148 |
$pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf(array($invoice));
|
149 |
$mailTemplate = Mage::helper('emailattachments')->addAttachment(
|
150 |
$pdf,
|
151 |
$mailTemplate,
|
152 |
-
|
153 |
);
|
154 |
}
|
155 |
|
156 |
-
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachagreement', $
|
157 |
-
$mailTemplate = Mage::helper('emailattachments')->addAgreements($
|
158 |
}
|
159 |
|
160 |
-
$fileAttachment = Mage::getStoreConfig('sales_email/' . $configPath . '/attachfile', $
|
161 |
if ($fileAttachment) {
|
162 |
$mailTemplate = Mage::helper('emailattachments')->addFileAttachment($fileAttachment, $mailTemplate);
|
163 |
}
|
164 |
}
|
165 |
|
|
|
|
|
|
|
|
|
|
|
166 |
/**
|
167 |
* listen to shipment email send event to attach pdfs and agreements
|
168 |
*
|
@@ -173,32 +180,42 @@ class Fooman_EmailAttachments_Model_Observer
|
|
173 |
$update = $observer->getEvent()->getUpdate();
|
174 |
$mailTemplate = $observer->getEvent()->getTemplate();
|
175 |
$shipment = $observer->getEvent()->getObject();
|
|
|
176 |
$configPath = $update ? 'shipment_comment' : 'shipment';
|
177 |
|
178 |
-
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachpdf', $
|
179 |
//Create Pdf and attach to email - play nicely with PdfCustomiser
|
180 |
$pdf = Mage::getModel('sales/order_pdf_shipment')->getPdf(array($shipment));
|
181 |
$mailTemplate = Mage::helper('emailattachments')->addAttachment(
|
182 |
-
$pdf, $mailTemplate,
|
183 |
);
|
184 |
/*
|
185 |
-
|
186 |
-
$
|
187 |
-
|
188 |
-
|
|
|
|
|
|
|
|
|
189 |
*/
|
190 |
}
|
191 |
|
192 |
-
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachagreement', $
|
193 |
-
$mailTemplate = Mage::helper('emailattachments')->addAgreements($
|
194 |
}
|
195 |
|
196 |
-
$fileAttachment = Mage::getStoreConfig('sales_email/' . $configPath . '/attachfile', $
|
197 |
if ($fileAttachment) {
|
198 |
$mailTemplate = Mage::helper('emailattachments')->addFileAttachment($fileAttachment, $mailTemplate);
|
199 |
}
|
200 |
}
|
201 |
|
|
|
|
|
|
|
|
|
|
|
202 |
/**
|
203 |
* listen to creditmemo email send event to attach pdfs and agreements
|
204 |
*
|
@@ -209,24 +226,30 @@ class Fooman_EmailAttachments_Model_Observer
|
|
209 |
$update = $observer->getEvent()->getUpdate();
|
210 |
$mailTemplate = $observer->getEvent()->getTemplate();
|
211 |
$creditmemo = $observer->getEvent()->getObject();
|
|
|
212 |
$configPath = $update ? 'creditmemo_comment' : 'creditmemo';
|
213 |
|
214 |
-
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachpdf', $
|
215 |
//Create Pdf and attach to email - play nicely with PdfCustomiser
|
216 |
$pdf = Mage::getModel('sales/order_pdf_creditmemo')->getPdf(array($creditmemo));
|
217 |
$mailTemplate = Mage::helper('emailattachments')->addAttachment(
|
218 |
-
$pdf, $mailTemplate,
|
219 |
);
|
220 |
}
|
221 |
|
222 |
-
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachagreement', $
|
223 |
-
$mailTemplate = Mage::helper('emailattachments')->addAgreements($
|
224 |
}
|
225 |
|
226 |
-
$fileAttachment = Mage::getStoreConfig('sales_email/' . $configPath . '/attachfile', $
|
227 |
if ($fileAttachment) {
|
228 |
$mailTemplate = Mage::helper('emailattachments')->addFileAttachment($fileAttachment, $mailTemplate);
|
229 |
}
|
230 |
}
|
231 |
|
232 |
-
|
|
|
|
|
|
|
|
|
|
15 |
const XML_PATH_ORDER_PACKINGSLIP_TEMPLATE = 'sales_email/order/shipment_template';
|
16 |
const XML_PATH_EMAIL_COPY_TO = 'sales_email/order/shipment_to';
|
17 |
|
18 |
+
const KEY_PACKING_SLIP_PROCESSED = 'emailattachments-packingslip-processed';
|
19 |
|
20 |
/**
|
21 |
* observe core_block_abstract_prepare_layout_after to add a Print Orders
|
29 |
//add button to dropdown
|
30 |
if ($block instanceof Mage_Adminhtml_Block_Widget_Grid_Massaction
|
31 |
|| $block instanceof
|
32 |
+
Enterprise_SalesArchive_Block_Adminhtml_Sales_Order_Grid_Massaction
|
33 |
) {
|
34 |
if ($block->getRequest()->getControllerName() == 'sales_order'
|
35 |
|| $block->getRequest()->getControllerName() == 'adminhtml_sales_order'
|
36 |
|| $block->getRequest()->getControllerName() == 'sales_archive'
|
37 |
+
|| $block->getRequest()->getControllerName() == 'orderspro_order'
|
38 |
) {
|
39 |
$block->addItem(
|
40 |
+
'fooman_pdforders_order', array(
|
41 |
'label'=> Mage::helper('emailattachments')->__('Print Orders'),
|
42 |
'url' => Mage::helper('adminhtml')->getUrl(
|
43 |
'emailattachments/admin_order/pdforders',
|
58 |
*
|
59 |
* @param $observer
|
60 |
*/
|
61 |
+
public function beforeSendOrder($observer)
|
62 |
{
|
63 |
$update = $observer->getEvent()->getUpdate();
|
64 |
$mailTemplate = $observer->getEvent()->getTemplate();
|
65 |
$order = $observer->getEvent()->getObject();
|
66 |
+
$storeId = $order->getStoreId();
|
67 |
$configPath = $update ? 'order_comment' : 'order';
|
68 |
|
69 |
+
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachpdf', $storeId)) {
|
70 |
//Create Pdf and attach to email - play nicely with PdfCustomiser
|
|
|
|
|
|
|
|
|
71 |
$pdf = Mage::getModel('emailattachments/order_pdf_order')->getPdf(array($order));
|
|
|
72 |
$mailTemplate = Mage::helper('emailattachments')->addAttachment(
|
73 |
+
$pdf, $mailTemplate, $this->getOrderAttachmentName($order)
|
74 |
);
|
75 |
}
|
76 |
|
77 |
+
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachagreement', $storeId)) {
|
78 |
$mailTemplate = Mage::helper('emailattachments')->addAgreements($order->getStoreId(), $mailTemplate);
|
79 |
}
|
80 |
|
81 |
+
$fileAttachment = Mage::getStoreConfig('sales_email/' . $configPath . '/attachfile', $storeId);
|
82 |
if ($fileAttachment) {
|
83 |
$mailTemplate = Mage::helper('emailattachments')->addFileAttachment($fileAttachment, $mailTemplate);
|
84 |
}
|
85 |
}
|
86 |
|
87 |
+
public function getOrderAttachmentName($order)
|
88 |
+
{
|
89 |
+
return Mage::helper('emailattachments')->getOrderAttachmentName($order);
|
90 |
+
}
|
91 |
+
|
92 |
/**
|
93 |
* listen to order email send event to send packing slip
|
94 |
*
|
95 |
* @param $observer
|
96 |
*/
|
97 |
+
public function sendPackingSlip($observer)
|
98 |
{
|
99 |
if (!Mage::registry(self::KEY_PACKING_SLIP_PROCESSED)) {
|
100 |
Mage::register(self::KEY_PACKING_SLIP_PROCESSED, true);
|
106 |
$mailTemplate = Mage::getModel('core/email_template');
|
107 |
$order = $observer->getEvent()->getObject();
|
108 |
$configPath = $update ? 'order_comment' : 'order';
|
109 |
+
$storeId = $order->getStoreId();
|
110 |
+
$emails = Mage::helper('emailattachments')->getEmails(self::XML_PATH_EMAIL_COPY_TO, $storeId);
|
111 |
|
112 |
+
if ($emails && Mage::getStoreConfig('sales_email/' . $configPath . '/sendpackingslip', $storeId)) {
|
113 |
+
$template = Mage::getStoreConfig(self::XML_PATH_ORDER_PACKINGSLIP_TEMPLATE, $storeId);
|
114 |
+
$pdf = Mage::getModel('sales/order_pdf_shipment')->getPdf(array(), array($order->getId()));
|
115 |
$mailTemplate = Mage::helper('emailattachments')->addAttachment(
|
116 |
$pdf, $mailTemplate, Mage::helper('sales')->__('Shipment') . "_" . $order->getIncrementId()
|
117 |
);
|
118 |
foreach ($emails as $email) {
|
119 |
+
$mailTemplate->setDesignConfig(array('area' => 'frontend', 'store' => $storeId))
|
120 |
->sendTransactional(
|
121 |
$template,
|
122 |
Mage::getStoreConfig(
|
123 |
+
Mage_Sales_Model_Order_Shipment::XML_PATH_EMAIL_IDENTITY, $storeId
|
124 |
),
|
125 |
$email,
|
126 |
'',
|
127 |
+
array('order' => $order)
|
|
|
|
|
128 |
);
|
129 |
}
|
130 |
}
|
137 |
*
|
138 |
* @param $observer
|
139 |
*/
|
140 |
+
public function beforeSendInvoice($observer)
|
141 |
{
|
142 |
$update = $observer->getEvent()->getUpdate();
|
143 |
$mailTemplate = $observer->getEvent()->getTemplate();
|
144 |
$invoice = $observer->getEvent()->getObject();
|
145 |
+
$storeId = $invoice->getStoreId();
|
146 |
$configPath = $update ? 'invoice_comment' : 'invoice';
|
147 |
|
148 |
+
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachpdf', $storeId)) {
|
149 |
//Create Pdf and attach to email - play nicely with PdfCustomiser
|
150 |
$pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf(array($invoice));
|
151 |
$mailTemplate = Mage::helper('emailattachments')->addAttachment(
|
152 |
$pdf,
|
153 |
$mailTemplate,
|
154 |
+
$this->getInvoiceAttachmentName($invoice)
|
155 |
);
|
156 |
}
|
157 |
|
158 |
+
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachagreement', $storeId)) {
|
159 |
+
$mailTemplate = Mage::helper('emailattachments')->addAgreements($storeId, $mailTemplate);
|
160 |
}
|
161 |
|
162 |
+
$fileAttachment = Mage::getStoreConfig('sales_email/' . $configPath . '/attachfile', $storeId);
|
163 |
if ($fileAttachment) {
|
164 |
$mailTemplate = Mage::helper('emailattachments')->addFileAttachment($fileAttachment, $mailTemplate);
|
165 |
}
|
166 |
}
|
167 |
|
168 |
+
public function getInvoiceAttachmentName($invoice)
|
169 |
+
{
|
170 |
+
return Mage::helper('emailattachments')->getInvoiceAttachmentName($invoice);
|
171 |
+
}
|
172 |
+
|
173 |
/**
|
174 |
* listen to shipment email send event to attach pdfs and agreements
|
175 |
*
|
180 |
$update = $observer->getEvent()->getUpdate();
|
181 |
$mailTemplate = $observer->getEvent()->getTemplate();
|
182 |
$shipment = $observer->getEvent()->getObject();
|
183 |
+
$storeId = $shipment->getStoreId();
|
184 |
$configPath = $update ? 'shipment_comment' : 'shipment';
|
185 |
|
186 |
+
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachpdf', $storeId)) {
|
187 |
//Create Pdf and attach to email - play nicely with PdfCustomiser
|
188 |
$pdf = Mage::getModel('sales/order_pdf_shipment')->getPdf(array($shipment));
|
189 |
$mailTemplate = Mage::helper('emailattachments')->addAttachment(
|
190 |
+
$pdf, $mailTemplate, $this->getShipmentAttachmentName($shipment)
|
191 |
);
|
192 |
/*
|
193 |
+
$pdf = Mage::getModel('sales/order_pdf_shipment')->getPdf(
|
194 |
+
$shipment->getOrder()->getInvoiceCollection()
|
195 |
+
);
|
196 |
+
$mailTemplate = Mage::helper('emailattachments')->addAttachment(
|
197 |
+
$pdf,
|
198 |
+
$mailTemplate,
|
199 |
+
Mage::helper('sales')->__('Invoices for Order') . "_" . $shipment->getOrder()->getIncrementId()
|
200 |
+
);
|
201 |
*/
|
202 |
}
|
203 |
|
204 |
+
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachagreement', $storeId)) {
|
205 |
+
$mailTemplate = Mage::helper('emailattachments')->addAgreements($storeId, $mailTemplate);
|
206 |
}
|
207 |
|
208 |
+
$fileAttachment = Mage::getStoreConfig('sales_email/' . $configPath . '/attachfile', $storeId);
|
209 |
if ($fileAttachment) {
|
210 |
$mailTemplate = Mage::helper('emailattachments')->addFileAttachment($fileAttachment, $mailTemplate);
|
211 |
}
|
212 |
}
|
213 |
|
214 |
+
public function getShipmentAttachmentName($shipment)
|
215 |
+
{
|
216 |
+
return Mage::helper('emailattachments')->getShipmentAttachmentName($shipment);
|
217 |
+
}
|
218 |
+
|
219 |
/**
|
220 |
* listen to creditmemo email send event to attach pdfs and agreements
|
221 |
*
|
226 |
$update = $observer->getEvent()->getUpdate();
|
227 |
$mailTemplate = $observer->getEvent()->getTemplate();
|
228 |
$creditmemo = $observer->getEvent()->getObject();
|
229 |
+
$storeId = $creditmemo->getStoreId();
|
230 |
$configPath = $update ? 'creditmemo_comment' : 'creditmemo';
|
231 |
|
232 |
+
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachpdf', $storeId)) {
|
233 |
//Create Pdf and attach to email - play nicely with PdfCustomiser
|
234 |
$pdf = Mage::getModel('sales/order_pdf_creditmemo')->getPdf(array($creditmemo));
|
235 |
$mailTemplate = Mage::helper('emailattachments')->addAttachment(
|
236 |
+
$pdf, $mailTemplate, $this->getCreditmemoAttachmentName($creditmemo)
|
237 |
);
|
238 |
}
|
239 |
|
240 |
+
if (Mage::getStoreConfig('sales_email/' . $configPath . '/attachagreement', $storeId)) {
|
241 |
+
$mailTemplate = Mage::helper('emailattachments')->addAgreements($storeId, $mailTemplate);
|
242 |
}
|
243 |
|
244 |
+
$fileAttachment = Mage::getStoreConfig('sales_email/' . $configPath . '/attachfile', $storeId);
|
245 |
if ($fileAttachment) {
|
246 |
$mailTemplate = Mage::helper('emailattachments')->addFileAttachment($fileAttachment, $mailTemplate);
|
247 |
}
|
248 |
}
|
249 |
|
250 |
+
public function getCreditmemoAttachmentName($creditmemo)
|
251 |
+
{
|
252 |
+
return Mage::helper('emailattachments')->getCreditmemoAttachmentName($creditmemo);
|
253 |
+
}
|
254 |
+
|
255 |
+
}
|
app/code/community/Fooman/EmailAttachments/Model/Order/Pdf/Order.php
CHANGED
@@ -2,46 +2,15 @@
|
|
2 |
|
3 |
/**
|
4 |
* @author Kristof Ringleff
|
|
|
5 |
* @package Fooman_EmailAttachments
|
6 |
* @copyright Copyright (c) 2009 Fooman Limited (http://www.fooman.co.nz)
|
|
|
7 |
*
|
8 |
* For the full copyright and license information, please view the LICENSE
|
9 |
* file that was distributed with this source code.
|
10 |
*/
|
11 |
|
12 |
-
/**
|
13 |
-
* Magento
|
14 |
-
*
|
15 |
-
* NOTICE OF LICENSE
|
16 |
-
*
|
17 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
18 |
-
* that is bundled with this package in the file LICENSE.txt.
|
19 |
-
* It is also available through the world-wide-web at this URL:
|
20 |
-
* http://opensource.org/licenses/osl-3.0.php
|
21 |
-
* If you did not receive a copy of the license and are unable to
|
22 |
-
* obtain it through the world-wide-web, please send an email
|
23 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
24 |
-
*
|
25 |
-
* DISCLAIMER
|
26 |
-
*
|
27 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
28 |
-
* versions in the future. If you wish to customize Magento for your
|
29 |
-
* needs please refer to http://www.magentocommerce.com for more information.
|
30 |
-
*
|
31 |
-
* @category Mage
|
32 |
-
* @package Mage_Sales
|
33 |
-
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
34 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
35 |
-
*/
|
36 |
-
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Sales Order Invoice PDF model
|
40 |
-
*
|
41 |
-
* @category Mage
|
42 |
-
* @package Mage_Sales
|
43 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
44 |
-
*/
|
45 |
class Fooman_EmailAttachments_Model_Order_Pdf_Order extends Mage_Sales_Model_Order_Pdf_Invoice
|
46 |
{
|
47 |
|
@@ -61,7 +30,7 @@ class Fooman_EmailAttachments_Model_Order_Pdf_Order extends Mage_Sales_Model_Ord
|
|
61 |
$this->_setPdf($pdf);
|
62 |
$style = new Zend_Pdf_Style();
|
63 |
$this->_setFontBold($style, 10);
|
64 |
-
|
65 |
foreach ($orders as $order) {
|
66 |
//could be order id
|
67 |
if ( !$order instanceof Mage_Sales_Model_Order) {
|
@@ -69,6 +38,7 @@ class Fooman_EmailAttachments_Model_Order_Pdf_Order extends Mage_Sales_Model_Ord
|
|
69 |
}
|
70 |
|
71 |
if ($order->getStoreId()) {
|
|
|
72 |
Mage::app()->getLocale()->emulate($order->getStoreId());
|
73 |
Mage::app()->setCurrentStore($order->getStoreId());
|
74 |
}
|
@@ -99,51 +69,16 @@ class Fooman_EmailAttachments_Model_Order_Pdf_Order extends Mage_Sales_Model_Ord
|
|
99 |
$page->drawRectangle(25, $this->y, 570, $this->y - 15);
|
100 |
$this->y -=10;
|
101 |
|
102 |
-
|
103 |
-
$page->setFillColor(new Zend_Pdf_Color_RGB(0.4, 0.4, 0.4));
|
104 |
-
$page->drawText(Mage::helper('sales')->__('Products'), 35, $this->y, 'UTF-8');
|
105 |
-
$page->drawText(Mage::helper('sales')->__('SKU'), 255, $this->y, 'UTF-8');
|
106 |
-
$page->drawText(Mage::helper('sales')->__('Price'), 380, $this->y, 'UTF-8');
|
107 |
-
$page->drawText(Mage::helper('sales')->__('Qty'), 430, $this->y, 'UTF-8');
|
108 |
-
$page->drawText(Mage::helper('sales')->__('Tax'), 480, $this->y, 'UTF-8');
|
109 |
-
$page->drawText(Mage::helper('sales')->__('Subtotal'), 535, $this->y, 'UTF-8');
|
110 |
-
|
111 |
-
$this->y -=15;
|
112 |
|
113 |
$page->setFillColor(new Zend_Pdf_Color_GrayScale(0));
|
114 |
|
115 |
-
|
116 |
-
foreach ($order->getAllItems() as $item) {
|
117 |
-
if ($item->getParentItem()) {
|
118 |
-
continue;
|
119 |
-
}
|
120 |
-
|
121 |
-
if ($this->y < 15) {
|
122 |
-
$page = $this->newPage(array('table_header' => true));
|
123 |
-
}
|
124 |
-
|
125 |
-
/* Draw item */
|
126 |
-
//temporarily set item as if we were printing an invoice
|
127 |
-
$item->setQty($item->getQtyOrdered());
|
128 |
-
$item->setOrderItem($item);
|
129 |
-
$page = $this->_drawItem($item, $page, $order);
|
130 |
-
}
|
131 |
|
132 |
/* Add totals */
|
133 |
$order->setOrder($order);
|
134 |
$page = $this->insertTotals($page, $order);
|
135 |
-
|
136 |
-
if (Mage::helper('core')->isModuleEnabled('Magemaven_OrderComment')
|
137 |
-
&& ($order->getCustomerComment() || $order->getCustomerNote())
|
138 |
-
) {
|
139 |
-
$comment = Mage::helper('ordercomment')->escapeHtml(
|
140 |
-
$order->getCustomerComment() ? $order->getCustomerComment() : $order->getCustomerNote()
|
141 |
-
);
|
142 |
-
$this->y -= 15;
|
143 |
-
$page->drawText(Mage::helper('ordercomment')->__('Order Comment'), 35, $this->y, 'UTF-8');
|
144 |
-
$this->y -= 15;
|
145 |
-
$page->drawText($comment, 35, $this->y, 'UTF-8');
|
146 |
-
}
|
147 |
|
148 |
if ($order->getStoreId()) {
|
149 |
Mage::app()->getLocale()->revert();
|
@@ -151,8 +86,70 @@ class Fooman_EmailAttachments_Model_Order_Pdf_Order extends Mage_Sales_Model_Ord
|
|
151 |
}
|
152 |
|
153 |
$this->_afterGetPdf();
|
154 |
-
|
155 |
return $pdf;
|
156 |
}
|
157 |
|
158 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
/**
|
4 |
* @author Kristof Ringleff
|
5 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
6 |
* @package Fooman_EmailAttachments
|
7 |
* @copyright Copyright (c) 2009 Fooman Limited (http://www.fooman.co.nz)
|
8 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
9 |
*
|
10 |
* For the full copyright and license information, please view the LICENSE
|
11 |
* file that was distributed with this source code.
|
12 |
*/
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
class Fooman_EmailAttachments_Model_Order_Pdf_Order extends Mage_Sales_Model_Order_Pdf_Invoice
|
15 |
{
|
16 |
|
30 |
$this->_setPdf($pdf);
|
31 |
$style = new Zend_Pdf_Style();
|
32 |
$this->_setFontBold($style, 10);
|
33 |
+
$currentStoreId = Mage::app()->getStore()->getId();
|
34 |
foreach ($orders as $order) {
|
35 |
//could be order id
|
36 |
if ( !$order instanceof Mage_Sales_Model_Order) {
|
38 |
}
|
39 |
|
40 |
if ($order->getStoreId()) {
|
41 |
+
Mage::getSingleton('customer/address_config')->setStore($order->getStoreId());
|
42 |
Mage::app()->getLocale()->emulate($order->getStoreId());
|
43 |
Mage::app()->setCurrentStore($order->getStoreId());
|
44 |
}
|
69 |
$page->drawRectangle(25, $this->y, 570, $this->y - 15);
|
70 |
$this->y -=10;
|
71 |
|
72 |
+
$page = $this->_printTableHead($page);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
$page->setFillColor(new Zend_Pdf_Color_GrayScale(0));
|
75 |
|
76 |
+
$page = $this->_printItems($order, $page);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
/* Add totals */
|
79 |
$order->setOrder($order);
|
80 |
$page = $this->insertTotals($page, $order);
|
81 |
+
$page = $this->_printComments($order, $page);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
|
83 |
if ($order->getStoreId()) {
|
84 |
Mage::app()->getLocale()->revert();
|
86 |
}
|
87 |
|
88 |
$this->_afterGetPdf();
|
89 |
+
Mage::app()->setCurrentStore($currentStoreId);
|
90 |
return $pdf;
|
91 |
}
|
92 |
|
93 |
+
protected function _printItems($order, $page)
|
94 |
+
{
|
95 |
+
/* Add body */
|
96 |
+
foreach ($order->getAllItems() as $item) {
|
97 |
+
if ($item->getParentItem()) {
|
98 |
+
continue;
|
99 |
+
}
|
100 |
+
|
101 |
+
if ($this->y < 15) {
|
102 |
+
$page = $this->newPage(array('table_header' => true));
|
103 |
+
}
|
104 |
+
|
105 |
+
/* Draw item */
|
106 |
+
//temporarily set item as if we were printing an invoice
|
107 |
+
$item->setQty($item->getQtyOrdered());
|
108 |
+
$item->setOrderItem($item);
|
109 |
+
$page = $this->_drawItem($item, $page, $order);
|
110 |
+
}
|
111 |
+
return $page;
|
112 |
+
}
|
113 |
+
|
114 |
+
protected function _printComments($order, Zend_Pdf_Page $page)
|
115 |
+
{
|
116 |
+
if (Mage::helper('core')->isModuleEnabled('Magemaven_OrderComment')
|
117 |
+
&& ($order->getCustomerComment() || $order->getCustomerNote())
|
118 |
+
) {
|
119 |
+
$comment = Mage::helper('ordercomment')->escapeHtml(
|
120 |
+
$order->getCustomerComment() ? $order->getCustomerComment() : $order->getCustomerNote()
|
121 |
+
);
|
122 |
+
$this->y -= 15;
|
123 |
+
$page->drawText(Mage::helper('ordercomment')->__('Order Comment'), 35, $this->y, 'UTF-8');
|
124 |
+
$this->y -= 15;
|
125 |
+
$leftToPrint = explode(' ', $comment);
|
126 |
+
$availableWidth = $page->getWidth();
|
127 |
+
while (!empty($leftToPrint)) {
|
128 |
+
$currentLine = $leftToPrint;
|
129 |
+
$leftToPrint = array();
|
130 |
+
while ($this->widthForStringUsingFontSize(
|
131 |
+
implode(' ', $currentLine), $page->getFont(), $page->getFontSize()
|
132 |
+
) > $availableWidth) {
|
133 |
+
$leftToPrint[] = array_pop($currentLine);
|
134 |
+
}
|
135 |
+
$page->drawText(implode(' ', $currentLine), 35, $this->y, 'UTF-8');
|
136 |
+
}
|
137 |
+
}
|
138 |
+
return $page;
|
139 |
+
}
|
140 |
+
|
141 |
+
protected function _printTableHead($page)
|
142 |
+
{
|
143 |
+
/* Add table head */
|
144 |
+
$page->setFillColor(new Zend_Pdf_Color_RGB(0.4, 0.4, 0.4));
|
145 |
+
$page->drawText(Mage::helper('sales')->__('Products'), 35, $this->y, 'UTF-8');
|
146 |
+
$page->drawText(Mage::helper('sales')->__('SKU'), 255, $this->y, 'UTF-8');
|
147 |
+
$page->drawText(Mage::helper('sales')->__('Price'), 380, $this->y, 'UTF-8');
|
148 |
+
$page->drawText(Mage::helper('sales')->__('Qty'), 430, $this->y, 'UTF-8');
|
149 |
+
$page->drawText(Mage::helper('sales')->__('Tax'), 480, $this->y, 'UTF-8');
|
150 |
+
$page->drawText(Mage::helper('sales')->__('Subtotal'), 535, $this->y, 'UTF-8');
|
151 |
+
|
152 |
+
$this->y -=15;
|
153 |
+
return $page;
|
154 |
+
}
|
155 |
+
}
|
app/code/community/Fooman/EmailAttachments/Model/Selftester.php
CHANGED
@@ -1,13 +1,31 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
class Fooman_EmailAttachments_Model_Selftester extends Fooman_Common_Model_Selftester
|
3 |
{
|
4 |
|
|
|
|
|
|
|
5 |
public function _getVersions ()
|
6 |
{
|
7 |
parent::_getVersions();
|
8 |
-
$this->messages[] = "Fooman_EmailAttachments Config version: "
|
|
|
9 |
}
|
10 |
|
|
|
|
|
|
|
|
|
|
|
11 |
public function _getRewrites ()
|
12 |
{
|
13 |
return array(
|
@@ -15,8 +33,13 @@ class Fooman_EmailAttachments_Model_Selftester extends Fooman_Common_Model_Selft
|
|
15 |
);
|
16 |
}
|
17 |
|
|
|
|
|
|
|
|
|
18 |
public function _getFiles ()
|
19 |
{
|
|
|
20 |
return array(
|
21 |
"app/code/community/Fooman/EmailAttachments/controllers/Customer/OrderController.php",
|
22 |
"app/code/community/Fooman/EmailAttachments/controllers/Admin/OrderController.php",
|
@@ -60,6 +83,7 @@ class Fooman_EmailAttachments_Model_Selftester extends Fooman_Common_Model_Selft
|
|
60 |
"app/locale/zh_CN/Fooman_EmailAttachments.csv",
|
61 |
"app/locale/lv_LV/Fooman_EmailAttachments.csv",
|
62 |
);
|
|
|
63 |
}
|
64 |
}
|
65 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* @author Kristof Ringleff
|
4 |
+
* @package Fooman_EmailAttachments
|
5 |
+
* @copyright Copyright (c) 2009 Fooman Limited (http://www.fooman.co.nz)
|
6 |
+
*
|
7 |
+
* For the full copyright and license information, please view the LICENSE
|
8 |
+
* file that was distributed with this source code.
|
9 |
+
*/
|
10 |
+
|
11 |
class Fooman_EmailAttachments_Model_Selftester extends Fooman_Common_Model_Selftester
|
12 |
{
|
13 |
|
14 |
+
/**
|
15 |
+
* get extension version information
|
16 |
+
*/
|
17 |
public function _getVersions ()
|
18 |
{
|
19 |
parent::_getVersions();
|
20 |
+
$this->messages[] = "Fooman_EmailAttachments Config version: "
|
21 |
+
. (string) Mage::getConfig()->getModuleConfig('Fooman_EmailAttachments')->version;
|
22 |
}
|
23 |
|
24 |
+
/**
|
25 |
+
* list of extension rewrites
|
26 |
+
*
|
27 |
+
* @return array
|
28 |
+
*/
|
29 |
public function _getRewrites ()
|
30 |
{
|
31 |
return array(
|
33 |
);
|
34 |
}
|
35 |
|
36 |
+
/**
|
37 |
+
* list of extension files
|
38 |
+
* @return array
|
39 |
+
*/
|
40 |
public function _getFiles ()
|
41 |
{
|
42 |
+
//REPLACE
|
43 |
return array(
|
44 |
"app/code/community/Fooman/EmailAttachments/controllers/Customer/OrderController.php",
|
45 |
"app/code/community/Fooman/EmailAttachments/controllers/Admin/OrderController.php",
|
83 |
"app/locale/zh_CN/Fooman_EmailAttachments.csv",
|
84 |
"app/locale/lv_LV/Fooman_EmailAttachments.csv",
|
85 |
);
|
86 |
+
//REPLACE_END
|
87 |
}
|
88 |
}
|
89 |
|
app/code/community/Fooman/EmailAttachments/Model/Updates.php
DELETED
@@ -1,36 +0,0 @@
|
|
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/controllers/Admin/OrderController.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
|
3 |
/**
|
4 |
* @author Kristof Ringleff
|
@@ -9,8 +10,6 @@
|
|
9 |
* file that was distributed with this source code.
|
10 |
*/
|
11 |
|
12 |
-
require_once BP.'/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php';
|
13 |
-
|
14 |
class Fooman_EmailAttachments_Admin_OrderController extends Mage_Adminhtml_Sales_OrderController
|
15 |
{
|
16 |
|
@@ -84,44 +83,4 @@ class Fooman_EmailAttachments_Admin_OrderController extends Mage_Adminhtml_Sales
|
|
84 |
}
|
85 |
$this->_redirect('*/*');
|
86 |
}
|
87 |
-
|
88 |
-
/**
|
89 |
-
* send picking list for given order_ids
|
90 |
-
*
|
91 |
-
* @return Mage_Core_Controller_Varien_Action
|
92 |
-
*/
|
93 |
-
public function pdfpickingAction()
|
94 |
-
{
|
95 |
-
$orderIds = $this->getRequest()->getPost('order_ids');
|
96 |
-
$flag = false;
|
97 |
-
if (!empty($orderIds)) {
|
98 |
-
foreach ($orderIds as $orderId) {
|
99 |
-
/* @var $order Mage_Sales_Model_Order */
|
100 |
-
$order = Mage::getModel('sales/order')->load($orderId);
|
101 |
-
$flag = true;
|
102 |
-
if (!isset($pdf)) {
|
103 |
-
$pdf = Mage::getModel('emailattachments/order_pdf_order')
|
104 |
-
->getPicking(array($order));
|
105 |
-
} else {
|
106 |
-
$pages = Mage::getModel('emailattachments/order_pdf_order')
|
107 |
-
->getPicking(array($order));
|
108 |
-
$pdf->pages = array_merge($pdf->pages, $pages->pages);
|
109 |
-
}
|
110 |
-
|
111 |
-
}
|
112 |
-
if ($flag) {
|
113 |
-
return $this->_prepareDownloadResponse(
|
114 |
-
'order'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').'.pdf',
|
115 |
-
$pdf->render(),
|
116 |
-
'application/pdf'
|
117 |
-
);
|
118 |
-
} else {
|
119 |
-
$this->_getSession()->addError(
|
120 |
-
$this->__('There are no printable documents related to selected orders')
|
121 |
-
);
|
122 |
-
$this->_redirect('*/*/');
|
123 |
-
}
|
124 |
-
}
|
125 |
-
$this->_redirect('*/*/');
|
126 |
-
}
|
127 |
}
|
1 |
<?php
|
2 |
+
require_once BP.'/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php';
|
3 |
|
4 |
/**
|
5 |
* @author Kristof Ringleff
|
10 |
* file that was distributed with this source code.
|
11 |
*/
|
12 |
|
|
|
|
|
13 |
class Fooman_EmailAttachments_Admin_OrderController extends Mage_Adminhtml_Sales_OrderController
|
14 |
{
|
15 |
|
83 |
}
|
84 |
$this->_redirect('*/*');
|
85 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
}
|
app/code/community/Fooman/EmailAttachments/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Fooman_EmailAttachments>
|
5 |
-
<version>0.9.
|
6 |
<depends>
|
7 |
</depends>
|
8 |
</Fooman_EmailAttachments>
|
@@ -174,4 +174,4 @@
|
|
174 |
</modules>
|
175 |
</suite>
|
176 |
</phpunit>
|
177 |
-
</config>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Fooman_EmailAttachments>
|
5 |
+
<version>0.9.13</version>
|
6 |
<depends>
|
7 |
</depends>
|
8 |
</Fooman_EmailAttachments>
|
174 |
</modules>
|
175 |
</suite>
|
176 |
</phpunit>
|
177 |
+
</config>
|
app/code/community/Fooman/EmailAttachments/etc/system.xml
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
<config>
|
2 |
<sections>
|
3 |
<foomancommon>
|
@@ -23,6 +24,8 @@
|
|
23 |
<fields>
|
24 |
<attachpdf translate="label">
|
25 |
<label>Attach Order as PDF</label>
|
|
|
|
|
26 |
<frontend_type>select</frontend_type>
|
27 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
28 |
<sort_order>50</sort_order>
|
@@ -32,6 +35,9 @@
|
|
32 |
</attachpdf>
|
33 |
<attachagreement translate="label">
|
34 |
<label>Attach Terms and Conditions</label>
|
|
|
|
|
|
|
35 |
<frontend_type>select</frontend_type>
|
36 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
37 |
<sort_order>70</sort_order>
|
@@ -41,6 +47,8 @@
|
|
41 |
</attachagreement>
|
42 |
<attachfile translate="label">
|
43 |
<label>Attach Pdf File</label>
|
|
|
|
|
44 |
<frontend_type>file</frontend_type>
|
45 |
<upload_dir config="system/filesystem/media">pdfs</upload_dir>
|
46 |
<backend_model>emailattachments/system_file</backend_model>
|
@@ -85,6 +93,8 @@
|
|
85 |
<fields>
|
86 |
<attachpdf translate="label">
|
87 |
<label>Attach Order as PDF</label>
|
|
|
|
|
88 |
<frontend_type>select</frontend_type>
|
89 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
90 |
<sort_order>50</sort_order>
|
@@ -94,6 +104,9 @@
|
|
94 |
</attachpdf>
|
95 |
<attachagreement translate="label">
|
96 |
<label>Attach Terms and Conditions</label>
|
|
|
|
|
|
|
97 |
<frontend_type>select</frontend_type>
|
98 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
99 |
<sort_order>70</sort_order>
|
@@ -103,6 +116,8 @@
|
|
103 |
</attachagreement>
|
104 |
<attachfile translate="label">
|
105 |
<label>Attach Pdf File</label>
|
|
|
|
|
106 |
<frontend_type>file</frontend_type>
|
107 |
<upload_dir config="system/filesystem/media">pdfs</upload_dir>
|
108 |
<backend_model>emailattachments/system_file</backend_model>
|
@@ -117,6 +132,8 @@
|
|
117 |
<fields>
|
118 |
<attachpdf translate="label">
|
119 |
<label>Attach Invoice as PDF</label>
|
|
|
|
|
120 |
<frontend_type>select</frontend_type>
|
121 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
122 |
<sort_order>50</sort_order>
|
@@ -126,6 +143,9 @@
|
|
126 |
</attachpdf>
|
127 |
<attachagreement translate="label">
|
128 |
<label>Attach Terms and Conditions</label>
|
|
|
|
|
|
|
129 |
<frontend_type>select</frontend_type>
|
130 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
131 |
<sort_order>70</sort_order>
|
@@ -135,6 +155,8 @@
|
|
135 |
</attachagreement>
|
136 |
<attachfile translate="label">
|
137 |
<label>Attach Pdf File</label>
|
|
|
|
|
138 |
<frontend_type>file</frontend_type>
|
139 |
<upload_dir config="system/filesystem/media">pdfs</upload_dir>
|
140 |
<backend_model>emailattachments/system_file</backend_model>
|
@@ -149,6 +171,8 @@
|
|
149 |
<fields>
|
150 |
<attachpdf translate="label">
|
151 |
<label>Attach Invoice as PDF</label>
|
|
|
|
|
152 |
<frontend_type>select</frontend_type>
|
153 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
154 |
<sort_order>50</sort_order>
|
@@ -158,6 +182,9 @@
|
|
158 |
</attachpdf>
|
159 |
<attachagreement translate="label">
|
160 |
<label>Attach Terms and Conditions</label>
|
|
|
|
|
|
|
161 |
<frontend_type>select</frontend_type>
|
162 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
163 |
<sort_order>70</sort_order>
|
@@ -167,6 +194,8 @@
|
|
167 |
</attachagreement>
|
168 |
<attachfile translate="label">
|
169 |
<label>Attach Pdf File</label>
|
|
|
|
|
170 |
<frontend_type>file</frontend_type>
|
171 |
<upload_dir config="system/filesystem/media">pdfs</upload_dir>
|
172 |
<backend_model>emailattachments/system_file</backend_model>
|
@@ -181,6 +210,8 @@
|
|
181 |
<fields>
|
182 |
<attachpdf translate="label">
|
183 |
<label>Attach Packing Slip as PDF</label>
|
|
|
|
|
184 |
<frontend_type>select</frontend_type>
|
185 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
186 |
<sort_order>50</sort_order>
|
@@ -190,6 +221,9 @@
|
|
190 |
</attachpdf>
|
191 |
<attachagreement translate="label">
|
192 |
<label>Attach Terms and Conditions</label>
|
|
|
|
|
|
|
193 |
<frontend_type>select</frontend_type>
|
194 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
195 |
<sort_order>70</sort_order>
|
@@ -199,6 +233,8 @@
|
|
199 |
</attachagreement>
|
200 |
<attachfile translate="label">
|
201 |
<label>Attach Pdf File</label>
|
|
|
|
|
202 |
<frontend_type>file</frontend_type>
|
203 |
<upload_dir config="system/filesystem/media">pdfs</upload_dir>
|
204 |
<backend_model>emailattachments/system_file</backend_model>
|
@@ -213,6 +249,8 @@
|
|
213 |
<fields>
|
214 |
<attachpdf translate="label">
|
215 |
<label>Attach Packing Slip as PDF</label>
|
|
|
|
|
216 |
<frontend_type>select</frontend_type>
|
217 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
218 |
<sort_order>50</sort_order>
|
@@ -222,6 +260,9 @@
|
|
222 |
</attachpdf>
|
223 |
<attachagreement translate="label">
|
224 |
<label>Attach Terms and Conditions</label>
|
|
|
|
|
|
|
225 |
<frontend_type>select</frontend_type>
|
226 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
227 |
<sort_order>70</sort_order>
|
@@ -231,6 +272,8 @@
|
|
231 |
</attachagreement>
|
232 |
<attachfile translate="label">
|
233 |
<label>Attach Pdf File</label>
|
|
|
|
|
234 |
<frontend_type>file</frontend_type>
|
235 |
<upload_dir config="system/filesystem/media">pdfs</upload_dir>
|
236 |
<backend_model>emailattachments/system_file</backend_model>
|
@@ -245,6 +288,8 @@
|
|
245 |
<fields>
|
246 |
<attachpdf translate="label">
|
247 |
<label>Attach Credit Memo as PDF</label>
|
|
|
|
|
248 |
<frontend_type>select</frontend_type>
|
249 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
250 |
<sort_order>50</sort_order>
|
@@ -254,6 +299,9 @@
|
|
254 |
</attachpdf>
|
255 |
<attachagreement translate="label">
|
256 |
<label>Attach Terms and Conditions</label>
|
|
|
|
|
|
|
257 |
<frontend_type>select</frontend_type>
|
258 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
259 |
<sort_order>70</sort_order>
|
@@ -263,6 +311,8 @@
|
|
263 |
</attachagreement>
|
264 |
<attachfile translate="label">
|
265 |
<label>Attach Pdf File</label>
|
|
|
|
|
266 |
<frontend_type>file</frontend_type>
|
267 |
<upload_dir config="system/filesystem/media">pdfs</upload_dir>
|
268 |
<backend_model>emailattachments/system_file</backend_model>
|
@@ -277,6 +327,8 @@
|
|
277 |
<fields>
|
278 |
<attachpdf translate="label">
|
279 |
<label>Attach Credit Memo as PDF</label>
|
|
|
|
|
280 |
<frontend_type>select</frontend_type>
|
281 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
282 |
<sort_order>50</sort_order>
|
@@ -286,6 +338,9 @@
|
|
286 |
</attachpdf>
|
287 |
<attachagreement translate="label">
|
288 |
<label>Attach Terms and Conditions</label>
|
|
|
|
|
|
|
289 |
<frontend_type>select</frontend_type>
|
290 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
291 |
<sort_order>70</sort_order>
|
@@ -295,6 +350,8 @@
|
|
295 |
</attachagreement>
|
296 |
<attachfile translate="label">
|
297 |
<label>Attach Pdf File</label>
|
|
|
|
|
298 |
<frontend_type>file</frontend_type>
|
299 |
<upload_dir config="system/filesystem/media">pdfs</upload_dir>
|
300 |
<backend_model>emailattachments/system_file</backend_model>
|
@@ -312,4 +369,3 @@
|
|
312 |
|
313 |
|
314 |
|
315 |
-
|
1 |
+
<?xml version="1.0"?>
|
2 |
<config>
|
3 |
<sections>
|
4 |
<foomancommon>
|
24 |
<fields>
|
25 |
<attachpdf translate="label">
|
26 |
<label>Attach Order as PDF</label>
|
27 |
+
<tooltip>When set to Yes, your invoice pdf document will be
|
28 |
+
automatically attached to the invoice email.</tooltip>
|
29 |
<frontend_type>select</frontend_type>
|
30 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
31 |
<sort_order>50</sort_order>
|
35 |
</attachpdf>
|
36 |
<attachagreement translate="label">
|
37 |
<label>Attach Terms and Conditions</label>
|
38 |
+
<tooltip><![CDATA[When set to Yes, your Terms and Conditions pdf document
|
39 |
+
(from <b>Sales > Terms and Conditions</b>) will be automatically attached to the email. Terms
|
40 |
+
and conditions as html and text files are not supported.]]></tooltip>
|
41 |
<frontend_type>select</frontend_type>
|
42 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
43 |
<sort_order>70</sort_order>
|
47 |
</attachagreement>
|
48 |
<attachfile translate="label">
|
49 |
<label>Attach Pdf File</label>
|
50 |
+
<tooltip>Choose to upload any pdf document to automatically attach to the email - for example,
|
51 |
+
your return policy, a coupon or voucher, your latest newsletter.</tooltip>
|
52 |
<frontend_type>file</frontend_type>
|
53 |
<upload_dir config="system/filesystem/media">pdfs</upload_dir>
|
54 |
<backend_model>emailattachments/system_file</backend_model>
|
93 |
<fields>
|
94 |
<attachpdf translate="label">
|
95 |
<label>Attach Order as PDF</label>
|
96 |
+
<tooltip>When set to Yes, your invoice pdf document will be
|
97 |
+
automatically attached to the invoice email.</tooltip>
|
98 |
<frontend_type>select</frontend_type>
|
99 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
100 |
<sort_order>50</sort_order>
|
104 |
</attachpdf>
|
105 |
<attachagreement translate="label">
|
106 |
<label>Attach Terms and Conditions</label>
|
107 |
+
<tooltip><![CDATA[When set to Yes, your Terms and Conditions pdf document
|
108 |
+
(from <b>Sales > Terms and Conditions</b>) will be automatically attached to the email. Terms
|
109 |
+
and conditions as html and text files are not supported.]]></tooltip>
|
110 |
<frontend_type>select</frontend_type>
|
111 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
112 |
<sort_order>70</sort_order>
|
116 |
</attachagreement>
|
117 |
<attachfile translate="label">
|
118 |
<label>Attach Pdf File</label>
|
119 |
+
<tooltip>Choose to upload any pdf document to automatically attach to the email - for example,
|
120 |
+
your return policy, a coupon or voucher, your latest newsletter.</tooltip>
|
121 |
<frontend_type>file</frontend_type>
|
122 |
<upload_dir config="system/filesystem/media">pdfs</upload_dir>
|
123 |
<backend_model>emailattachments/system_file</backend_model>
|
132 |
<fields>
|
133 |
<attachpdf translate="label">
|
134 |
<label>Attach Invoice as PDF</label>
|
135 |
+
<tooltip>When set to Yes, your invoice pdf document will be
|
136 |
+
automatically attached to the invoice email.</tooltip>
|
137 |
<frontend_type>select</frontend_type>
|
138 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
139 |
<sort_order>50</sort_order>
|
143 |
</attachpdf>
|
144 |
<attachagreement translate="label">
|
145 |
<label>Attach Terms and Conditions</label>
|
146 |
+
<tooltip><![CDATA[When set to Yes, your Terms and Conditions pdf document
|
147 |
+
(from <b>Sales > Terms and Conditions</b>) will be automatically attached to the email. Terms
|
148 |
+
and conditions as html and text files are not supported.]]></tooltip>
|
149 |
<frontend_type>select</frontend_type>
|
150 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
151 |
<sort_order>70</sort_order>
|
155 |
</attachagreement>
|
156 |
<attachfile translate="label">
|
157 |
<label>Attach Pdf File</label>
|
158 |
+
<tooltip>Choose to upload any pdf document to automatically attach to the email - for example,
|
159 |
+
your return policy, a coupon or voucher, your latest newsletter.</tooltip>
|
160 |
<frontend_type>file</frontend_type>
|
161 |
<upload_dir config="system/filesystem/media">pdfs</upload_dir>
|
162 |
<backend_model>emailattachments/system_file</backend_model>
|
171 |
<fields>
|
172 |
<attachpdf translate="label">
|
173 |
<label>Attach Invoice as PDF</label>
|
174 |
+
<tooltip>When set to Yes, your invoice pdf document will be
|
175 |
+
automatically attached to the invoice email.</tooltip>
|
176 |
<frontend_type>select</frontend_type>
|
177 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
178 |
<sort_order>50</sort_order>
|
182 |
</attachpdf>
|
183 |
<attachagreement translate="label">
|
184 |
<label>Attach Terms and Conditions</label>
|
185 |
+
<tooltip><![CDATA[When set to Yes, your Terms and Conditions pdf document
|
186 |
+
(from <b>Sales > Terms and Conditions</b>) will be automatically attached to the email. Terms
|
187 |
+
and conditions as html and text files are not supported.]]></tooltip>
|
188 |
<frontend_type>select</frontend_type>
|
189 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
190 |
<sort_order>70</sort_order>
|
194 |
</attachagreement>
|
195 |
<attachfile translate="label">
|
196 |
<label>Attach Pdf File</label>
|
197 |
+
<tooltip>Choose to upload any pdf document to automatically attach to the email - for example,
|
198 |
+
your return policy, a coupon or voucher, your latest newsletter.</tooltip>
|
199 |
<frontend_type>file</frontend_type>
|
200 |
<upload_dir config="system/filesystem/media">pdfs</upload_dir>
|
201 |
<backend_model>emailattachments/system_file</backend_model>
|
210 |
<fields>
|
211 |
<attachpdf translate="label">
|
212 |
<label>Attach Packing Slip as PDF</label>
|
213 |
+
<tooltip>When set to Yes, your packing slip pdf document will be
|
214 |
+
automatically attached to the shipment email.</tooltip>
|
215 |
<frontend_type>select</frontend_type>
|
216 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
217 |
<sort_order>50</sort_order>
|
221 |
</attachpdf>
|
222 |
<attachagreement translate="label">
|
223 |
<label>Attach Terms and Conditions</label>
|
224 |
+
<tooltip><![CDATA[When set to Yes, your Terms and Conditions pdf document
|
225 |
+
(from <b>Sales > Terms and Conditions</b>) will be automatically attached to the email. Terms
|
226 |
+
and conditions as html and text files are not supported.]]></tooltip>
|
227 |
<frontend_type>select</frontend_type>
|
228 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
229 |
<sort_order>70</sort_order>
|
233 |
</attachagreement>
|
234 |
<attachfile translate="label">
|
235 |
<label>Attach Pdf File</label>
|
236 |
+
<tooltip>Choose to upload any pdf document to automatically attach to the email - for example,
|
237 |
+
your return policy, a coupon or voucher, your latest newsletter.</tooltip>
|
238 |
<frontend_type>file</frontend_type>
|
239 |
<upload_dir config="system/filesystem/media">pdfs</upload_dir>
|
240 |
<backend_model>emailattachments/system_file</backend_model>
|
249 |
<fields>
|
250 |
<attachpdf translate="label">
|
251 |
<label>Attach Packing Slip as PDF</label>
|
252 |
+
<tooltip>When set to Yes, your packing slip pdf document will be
|
253 |
+
automatically attached to the shipment email.</tooltip>
|
254 |
<frontend_type>select</frontend_type>
|
255 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
256 |
<sort_order>50</sort_order>
|
260 |
</attachpdf>
|
261 |
<attachagreement translate="label">
|
262 |
<label>Attach Terms and Conditions</label>
|
263 |
+
<tooltip><![CDATA[When set to Yes, your Terms and Conditions pdf document
|
264 |
+
(from <b>Sales > Terms and Conditions</b>) will be automatically attached to the email. Terms
|
265 |
+
and conditions as html and text files are not supported.]]></tooltip>
|
266 |
<frontend_type>select</frontend_type>
|
267 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
268 |
<sort_order>70</sort_order>
|
272 |
</attachagreement>
|
273 |
<attachfile translate="label">
|
274 |
<label>Attach Pdf File</label>
|
275 |
+
<tooltip>Choose to upload any pdf document to automatically attach to the email - for example,
|
276 |
+
your return policy, a coupon or voucher, your latest newsletter.</tooltip>
|
277 |
<frontend_type>file</frontend_type>
|
278 |
<upload_dir config="system/filesystem/media">pdfs</upload_dir>
|
279 |
<backend_model>emailattachments/system_file</backend_model>
|
288 |
<fields>
|
289 |
<attachpdf translate="label">
|
290 |
<label>Attach Credit Memo as PDF</label>
|
291 |
+
<tooltip>When set to Yes, your packing slip pdf document will be
|
292 |
+
automatically attached to the shipment comment email.</tooltip>
|
293 |
<frontend_type>select</frontend_type>
|
294 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
295 |
<sort_order>50</sort_order>
|
299 |
</attachpdf>
|
300 |
<attachagreement translate="label">
|
301 |
<label>Attach Terms and Conditions</label>
|
302 |
+
<tooltip><![CDATA[When set to Yes, your Terms and Conditions pdf document
|
303 |
+
(from <b>Sales > Terms and Conditions</b>) will be automatically attached to the email. Terms
|
304 |
+
and conditions as html and text files are not supported.]]></tooltip>
|
305 |
<frontend_type>select</frontend_type>
|
306 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
307 |
<sort_order>70</sort_order>
|
311 |
</attachagreement>
|
312 |
<attachfile translate="label">
|
313 |
<label>Attach Pdf File</label>
|
314 |
+
<tooltip>Choose to upload any pdf document to automatically attach to the email - for example,
|
315 |
+
your return policy, a coupon or voucher, your latest newsletter.</tooltip>
|
316 |
<frontend_type>file</frontend_type>
|
317 |
<upload_dir config="system/filesystem/media">pdfs</upload_dir>
|
318 |
<backend_model>emailattachments/system_file</backend_model>
|
327 |
<fields>
|
328 |
<attachpdf translate="label">
|
329 |
<label>Attach Credit Memo as PDF</label>
|
330 |
+
<tooltip>When set to Yes, your packing slip pdf document will be
|
331 |
+
automatically attached to the shipment comment email.</tooltip>
|
332 |
<frontend_type>select</frontend_type>
|
333 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
334 |
<sort_order>50</sort_order>
|
338 |
</attachpdf>
|
339 |
<attachagreement translate="label">
|
340 |
<label>Attach Terms and Conditions</label>
|
341 |
+
<tooltip><![CDATA[When set to Yes, your Terms and Conditions pdf document
|
342 |
+
(from <b>Sales > Terms and Conditions</b>) will be automatically attached to the email. Terms
|
343 |
+
and conditions as html and text files are not supported.]]></tooltip>
|
344 |
<frontend_type>select</frontend_type>
|
345 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
346 |
<sort_order>70</sort_order>
|
350 |
</attachagreement>
|
351 |
<attachfile translate="label">
|
352 |
<label>Attach Pdf File</label>
|
353 |
+
<tooltip>Choose to upload any pdf document to automatically attach to the email - for example,
|
354 |
+
your return policy, a coupon or voucher, your latest newsletter.</tooltip>
|
355 |
<frontend_type>file</frontend_type>
|
356 |
<upload_dir config="system/filesystem/media">pdfs</upload_dir>
|
357 |
<backend_model>emailattachments/system_file</backend_model>
|
369 |
|
370 |
|
371 |
|
|
app/code/community/Fooman/EmailAttachments/modman
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
../../../../../app/code/community/Fooman/EmailAttachments/ /app/code/community/Fooman/EmailAttachments/
|
2 |
+
../../../../../app/etc/modules/Fooman_EmailAttachments.xml /app/etc/modules/Fooman_EmailAttachments.xml
|
3 |
+
../../../../../app/locale/ar_SA/Fooman_EmailAttachments.csv /app/locale/ar_SA/Fooman_EmailAttachments.csv
|
4 |
+
../../../../../app/locale/ca_ES/Fooman_EmailAttachments.csv /app/locale/ca_ES/Fooman_EmailAttachments.csv
|
5 |
+
../../../../../app/locale/cs_CZ/Fooman_EmailAttachments.csv /app/locale/cs_CZ/Fooman_EmailAttachments.csv
|
6 |
+
../../../../../app/locale/da_DK/Fooman_EmailAttachments.csv /app/locale/da_DK/Fooman_EmailAttachments.csv
|
7 |
+
../../../../../app/locale/de_DE/Fooman_EmailAttachments.csv /app/locale/de_DE/Fooman_EmailAttachments.csv
|
8 |
+
../../../../../app/locale/en_US/Fooman_EmailAttachments.csv /app/locale/en_US/Fooman_EmailAttachments.csv
|
9 |
+
../../../../../app/locale/en_US/template/email/sales/order_new_packingslip.html /app/locale/en_US/template/email/sales/order_new_packingslip.html
|
10 |
+
../../../../../app/locale/es_ES/Fooman_EmailAttachments.csv /app/locale/es_ES/Fooman_EmailAttachments.csv
|
11 |
+
../../../../../app/locale/et_EE/Fooman_EmailAttachments.csv /app/locale/et_EE/Fooman_EmailAttachments.csv
|
12 |
+
../../../../../app/locale/fa_IR/Fooman_EmailAttachments.csv /app/locale/fa_IR/Fooman_EmailAttachments.csv
|
13 |
+
../../../../../app/locale/fi_FI/Fooman_EmailAttachments.csv /app/locale/fi_FI/Fooman_EmailAttachments.csv
|
14 |
+
../../../../../app/locale/fr_FR/Fooman_EmailAttachments.csv /app/locale/fr_FR/Fooman_EmailAttachments.csv
|
15 |
+
../../../../../app/locale/gr_GR/Fooman_EmailAttachments.csv /app/locale/gr_GR/Fooman_EmailAttachments.csv
|
16 |
+
../../../../../app/locale/he_IL/Fooman_EmailAttachments.csv /app/locale/he_IL/Fooman_EmailAttachments.csv
|
17 |
+
../../../../../app/locale/hr_HR/Fooman_EmailAttachments.csv /app/locale/hr_HR/Fooman_EmailAttachments.csv
|
18 |
+
../../../../../app/locale/hu_HU/Fooman_EmailAttachments.csv /app/locale/hu_HU/Fooman_EmailAttachments.csv
|
19 |
+
../../../../../app/locale/it_IT/Fooman_EmailAttachments.csv /app/locale/it_IT/Fooman_EmailAttachments.csv
|
20 |
+
../../../../../app/locale/ja_JP/Fooman_EmailAttachments.csv /app/locale/ja_JP/Fooman_EmailAttachments.csv
|
21 |
+
../../../../../app/locale/ko_KR/Fooman_EmailAttachments.csv /app/locale/ko_KR/Fooman_EmailAttachments.csv
|
22 |
+
../../../../../app/locale/lt_LT/Fooman_EmailAttachments.csv /app/locale/lt_LT/Fooman_EmailAttachments.csv
|
23 |
+
../../../../../app/locale/lv_LV/Fooman_EmailAttachments.csv /app/locale/lv_LV/Fooman_EmailAttachments.csv
|
24 |
+
../../../../../app/locale/nb_NO/Fooman_EmailAttachments.csv /app/locale/nb_NO/Fooman_EmailAttachments.csv
|
25 |
+
../../../../../app/locale/nl_NL/Fooman_EmailAttachments.csv /app/locale/nl_NL/Fooman_EmailAttachments.csv
|
26 |
+
../../../../../app/locale/no_NO/Fooman_EmailAttachments.csv /app/locale/no_NO/Fooman_EmailAttachments.csv
|
27 |
+
../../../../../app/locale/pl_PL/Fooman_EmailAttachments.csv /app/locale/pl_PL/Fooman_EmailAttachments.csv
|
28 |
+
../../../../../app/locale/pt_BR/Fooman_EmailAttachments.csv /app/locale/pt_BR/Fooman_EmailAttachments.csv
|
29 |
+
../../../../../app/locale/ro_RO/Fooman_EmailAttachments.csv /app/locale/ro_RO/Fooman_EmailAttachments.csv
|
30 |
+
../../../../../app/locale/ru_RU/Fooman_EmailAttachments.csv /app/locale/ru_RU/Fooman_EmailAttachments.csv
|
31 |
+
../../../../../app/locale/sk_SK/Fooman_EmailAttachments.csv /app/locale/sk_SK/Fooman_EmailAttachments.csv
|
32 |
+
../../../../../app/locale/sl_SI/Fooman_EmailAttachments.csv /app/locale/sl_SI/Fooman_EmailAttachments.csv
|
33 |
+
../../../../../app/locale/sv_SE/Fooman_EmailAttachments.csv /app/locale/sv_SE/Fooman_EmailAttachments.csv
|
34 |
+
../../../../../app/locale/th_TH/Fooman_EmailAttachments.csv /app/locale/th_TH/Fooman_EmailAttachments.csv
|
35 |
+
../../../../../app/locale/zh_CN/Fooman_EmailAttachments.csv /app/locale/zh_CN/Fooman_EmailAttachments.csv
|
app/etc/modules/Fooman_Common.xml
DELETED
@@ -1,9 +0,0 @@
|
|
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/locale/ar_SA/Fooman_EmailAttachments.csv
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
"
|
2 |
"Attach Terms and Conditions","اربط شروط العقد"
|
3 |
"Attach Packing Slip as PDF","اربط وصل التعبئة "
|
4 |
"Attach Credit Memo as PDF","اربط عقد الادان"
|
1 |
+
"Attach Invoice as PDF","اربط فاتورة "
|
2 |
"Attach Terms and Conditions","اربط شروط العقد"
|
3 |
"Attach Packing Slip as PDF","اربط وصل التعبئة "
|
4 |
"Attach Credit Memo as PDF","اربط عقد الادان"
|
app/locale/es_ES/Fooman_EmailAttachments.csv
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
|
2 |
-
"Attach Terms and Conditions","Adjunta los Terminos de venta y condiciones"
|
3 |
-
"Attach Shipment as PDF","Adjunta los detalles del envio como PDF"
|
4 |
-
"Attach Credit Memo as PDF","Adjunta el Memo de Credito como PDF"
|
5 |
-
"Attach Order as PDF","Attach Order as PDF"
|
6 |
-
"Print Orders","Print Orders"
|
7 |
-
"Attach Product Attachments","Attach Product Attachments"
|
1 |
+
"Attach Invoice as PDF","Adjunta la Factura como PDF"
|
2 |
+
"Attach Terms and Conditions","Adjunta los Terminos de venta y condiciones"
|
3 |
+
"Attach Shipment as PDF","Adjunta los detalles del envio como PDF"
|
4 |
+
"Attach Credit Memo as PDF","Adjunta el Memo de Credito como PDF"
|
5 |
+
"Attach Order as PDF","Attach Order as PDF"
|
6 |
+
"Print Orders","Print Orders"
|
7 |
+
"Attach Product Attachments","Attach Product Attachments"
|
app/locale/fa_IR/Fooman_EmailAttachments.csv
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
|
2 |
"Attach Terms and Conditions","ضمیمه کردن شرایط و ضوابط"
|
3 |
"Attach Packing Slip as Pdf","ضمیمه کردن فهرست بسته بندی به صورت Pdf"
|
4 |
"Attach Credit Memo as Pdf","ضمیمه کردن اعلامیه ی بستانکاری به صورت Pdf"
|
1 |
+
"Attach Invoice as Pdf","ضمیمه کردن فاکتور به صورت Pdf"
|
2 |
"Attach Terms and Conditions","ضمیمه کردن شرایط و ضوابط"
|
3 |
"Attach Packing Slip as Pdf","ضمیمه کردن فهرست بسته بندی به صورت Pdf"
|
4 |
"Attach Credit Memo as Pdf","ضمیمه کردن اعلامیه ی بستانکاری به صورت Pdf"
|
app/locale/fr_FR/Fooman_EmailAttachments.csv
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
|
2 |
"Attach Terms and Conditions","Joindre les CGV en PDF"
|
3 |
"Attach Packing Slip as PDF","Joindre le Bon de livraison en PDF"
|
4 |
"Attach Credit Memo as PDF","Joindre la Note d'Avoir en PDF"
|
5 |
"Attach Order as PDF","Joindre la Commande en PDF"
|
6 |
"Print Orders","Print Orders"
|
7 |
-
"Attach Product Attachments","Attach Product Attachments"
|
1 |
+
"Attach Invoice as PDF","Joindre la Facture en PDF"
|
2 |
"Attach Terms and Conditions","Joindre les CGV en PDF"
|
3 |
"Attach Packing Slip as PDF","Joindre le Bon de livraison en PDF"
|
4 |
"Attach Credit Memo as PDF","Joindre la Note d'Avoir en PDF"
|
5 |
"Attach Order as PDF","Joindre la Commande en PDF"
|
6 |
"Print Orders","Print Orders"
|
7 |
+
"Attach Product Attachments","Attach Product Attachments"
|
app/locale/gr_GR/Fooman_EmailAttachments.csv
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
|
2 |
"Attach Terms and Conditions","Να συμπεριληφθούν στο μύνημα οι Όροι Συναλλαγής"
|
3 |
"Attach Packing Slip as PDF","Να συμπεριληφθεί η Φορτωτική σε μορφή PDF"
|
4 |
"Attach Credit Memo as PDF","Να συμπεριληφθεί το Πιστωτικό Τιμολόγιο σε μορφή PDF"
|
5 |
"Attach Order as PDF","Να συμπεριληφθεί η Παραγγελία σε μορφή PDF"
|
6 |
"Print Orders","Print Orders"
|
7 |
-
"Attach Product Attachments","Attach Product Attachments"
|
1 |
+
"Attach Invoice as PDF","Να συμπεριληφθεί το Τιμολόγιο σε μορφή PDF"
|
2 |
"Attach Terms and Conditions","Να συμπεριληφθούν στο μύνημα οι Όροι Συναλλαγής"
|
3 |
"Attach Packing Slip as PDF","Να συμπεριληφθεί η Φορτωτική σε μορφή PDF"
|
4 |
"Attach Credit Memo as PDF","Να συμπεριληφθεί το Πιστωτικό Τιμολόγιο σε μορφή PDF"
|
5 |
"Attach Order as PDF","Να συμπεριληφθεί η Παραγγελία σε μορφή PDF"
|
6 |
"Print Orders","Print Orders"
|
7 |
+
"Attach Product Attachments","Attach Product Attachments"
|
app/locale/hu_HU/Fooman_EmailAttachments.csv
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"Attach Invoice as PDF","Számla hozzáadása PDF-ként"
|
2 |
+
"Attach Terms and Conditions","Felhasználási feltételek csatolása"
|
3 |
+
"Attach Packing Slip as PDF","Szállító csatolása PDF-ként"
|
4 |
+
"Attach Credit Memo as PDF","Tranzakció történet csatolása"
|
5 |
+
"Attach Order as PDF","Rendelés csatolása PDF-ként"
|
6 |
+
"Print Orders","Rendelés nyomtatása"
|
7 |
+
"Attach Product Attachments","Termék mellékletek csatolása"
|
app/locale/it_IT/Fooman_EmailAttachments.csv
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
"Attach Invoice as PDF","
|
2 |
-
"Attach Terms and Conditions","
|
3 |
-
"Attach Packing Slip as PDF","
|
4 |
-
"Attach Credit Memo as PDF","
|
5 |
-
"Attach Order as PDF","
|
6 |
-
"Print Orders","
|
7 |
-
"Attach Product Attachments","
|
1 |
+
"Attach Invoice as PDF","Allega fattura come PDF"
|
2 |
+
"Attach Terms and Conditions","Allega Termini e condizioni di vendita"
|
3 |
+
"Attach Packing Slip as PDF","Allega etichetta come PDF"
|
4 |
+
"Attach Credit Memo as PDF","Allega Nota di credito come PDF"
|
5 |
+
"Attach Order as PDF","Allega Ordine come PDF"
|
6 |
+
"Print Orders","Stampa ordini"
|
7 |
+
"Attach Product Attachments","Allega Prodotti Allegati"
|
app/locale/nl_NL/Fooman_EmailAttachments.csv
CHANGED
@@ -3,5 +3,5 @@
|
|
3 |
"Attach Packing Slip as PDF","Pakbon toevoegen als PDF"
|
4 |
"Attach Credit Memo as PDF","Creditnota toevoegen als PDF"
|
5 |
"Attach Order as PDF","Orderbevestiging toevoegen als PDF"
|
6 |
-
"Print Orders","
|
7 |
-
"Attach Product Attachments","
|
3 |
"Attach Packing Slip as PDF","Pakbon toevoegen als PDF"
|
4 |
"Attach Credit Memo as PDF","Creditnota toevoegen als PDF"
|
5 |
"Attach Order as PDF","Orderbevestiging toevoegen als PDF"
|
6 |
+
"Print Orders","Bestellingen afdrukken"
|
7 |
+
"Attach Product Attachments","Product bijlagen toevoegen"
|
app/locale/ro_RO/Fooman_EmailAttachments.csv
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
|
2 |
-
"Attach Terms and Conditions","Ataşati Termeni şi Condiţii"
|
3 |
-
"Attach Packing Slip as PDF","Ataşaţi Avizul de Livrare în format PDF"
|
4 |
-
"Attach Credit Memo as PDF","Ataşaţi Avizul de Returnare în format PDF"
|
5 |
-
"Attach Order as PDF","Ataşaţi Formularul de Comanda în format PDF"
|
6 |
-
"Print Orders","Print Orders"
|
7 |
-
"Attach Product Attachments","Attach Product Attachments"
|
1 |
+
"Attach Invoice as PDF","Ataşaţi factura în format PDF"
|
2 |
+
"Attach Terms and Conditions","Ataşati Termeni şi Condiţii"
|
3 |
+
"Attach Packing Slip as PDF","Ataşaţi Avizul de Livrare în format PDF"
|
4 |
+
"Attach Credit Memo as PDF","Ataşaţi Avizul de Returnare în format PDF"
|
5 |
+
"Attach Order as PDF","Ataşaţi Formularul de Comanda în format PDF"
|
6 |
+
"Print Orders","Print Orders"
|
7 |
+
"Attach Product Attachments","Attach Product Attachments"
|
app/locale/sv_SE/Fooman_EmailAttachments.csv
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
"Attach Invoice as PDF","Bifoga faktura som PDF"
|
2 |
-
"Attach Terms and Conditions","Bifoga allmänna villkor"
|
3 |
-
"Attach Packing Slip as PDF","Bifoga plocklista som PDF"
|
4 |
-
"Attach Credit Memo as PDF","Bifoga kreditfaktura som PDF"
|
5 |
-
"Attach Order as PDF","Bifoga order som PDF"
|
6 |
-
"Print Orders","
|
7 |
-
"Attach Product Attachments","
|
1 |
+
"Attach Invoice as PDF","Bifoga faktura som PDF"
|
2 |
+
"Attach Terms and Conditions","Bifoga allmänna villkor"
|
3 |
+
"Attach Packing Slip as PDF","Bifoga plocklista som PDF"
|
4 |
+
"Attach Credit Memo as PDF","Bifoga kreditfaktura som PDF"
|
5 |
+
"Attach Order as PDF","Bifoga order som PDF"
|
6 |
+
"Print Orders","Skriv ut ordrar"
|
7 |
+
"Attach Product Attachments","Bifoga produktbilagor"
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Fooman_EmailAttachments</name>
|
4 |
-
<version>0.9.
|
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>
|
21 |
-
<time>
|
22 |
-
<contents><target name="magecommunity"><dir name="Fooman"><dir name="EmailAttachments"><dir name="Block"><dir name="Adminhtml"><file name="Extensioninfo.php" hash="
|
23 |
<compatible/>
|
24 |
-
<dependencies
|
25 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Fooman_EmailAttachments</name>
|
4 |
+
<version>0.9.13</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>2014-09-08</date>
|
21 |
+
<time>09:41:46</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="197c6f15ea92994093e37aed194c0324"/></dir><dir name="Model"><dir name="Core"><dir name="Email"><dir name="Template"><file name="Mailer.php" hash="b5a1d81f57b25ed12960dea81ae5ea6d"/></dir></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="4473131cdfffcc089d7374e2b0526629"/><file name="Selftester.php" hash="6429b346df2f89ecc6ca78c2658b0098"/></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="07a07e0840d54ad94331cf102511cb6d"/><file name="system.xml" hash="2b1df0a77b34af861b84602a002f136c"/></dir><file name="LICENSE.txt" hash="59563e7be45096d0833dade102989042"/><file name="modman" hash="c26d1114e1a484e33ae9e3b22fb005ee"/></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="7ec84090666f136f8044ab8a709cef9a"/></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>
|