Version Notes
Auto Order Delay Emailer extension allows you to automatically send an order delay mail after # number of days. The current Auto Order Delay emailer extension module boasts of the following features:
- * Emails are customizable.
- *Admin can set the day when email alerts need to be send.
- *100% open-source.
- *Supports multiple e-stores & multiple languages.
- *HTML/CSS validation.
- *Facilitates you to configure notification defaults.
- *Easy to install.
Download this release
Release Info
Developer | Nitin Gupta |
Extension | Irzoo_AutoOrderDelay |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- Order Delay Mail User Installation Guide 1.0.01.pdf +0 -0
- app/code/community/MC/Mcautoorderdelayemail/Helper/Data.php +13 -0
- app/code/community/MC/Mcautoorderdelayemail/Model/Mcautoorderdelayemail.php +291 -0
- app/code/community/MC/Mcautoorderdelayemail/Model/Mcautoorderdelayemailconfig.php +37 -0
- app/code/community/MC/Mcautoorderdelayemail/Model/Mcautoorderdelayemailtemplate.php +28 -0
- app/code/community/MC/Mcautoorderdelayemail/etc/adminhtml.xml +31 -0
- app/code/community/MC/Mcautoorderdelayemail/etc/config.xml +37 -0
- app/code/community/MC/Mcautoorderdelayemail/etc/system.xml +113 -0
- app/etc/modules/MC_Mcautoorderdelayemail.xml +15 -0
- package.xml +28 -0
Order Delay Mail User Installation Guide 1.0.01.pdf
ADDED
Binary file
|
app/code/community/MC/Mcautoorderdelayemail/Helper/Data.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @Category Community
|
4 |
+
* @Package MC_Mcautoorderdelayemail
|
5 |
+
* @Document Data.php
|
6 |
+
* @Created on 4th June 2012
|
7 |
+
*/
|
8 |
+
|
9 |
+
Class MC_Mcautoorderdelayemail_Helper_Data extends Mage_Core_Helper_Abstract
|
10 |
+
{
|
11 |
+
|
12 |
+
}
|
13 |
+
?>
|
app/code/community/MC/Mcautoorderdelayemail/Model/Mcautoorderdelayemail.php
ADDED
@@ -0,0 +1,291 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* @Category Community
|
4 |
+
* @Package MC_Mcautoorderdelayemail
|
5 |
+
* @Document Mcautoorderdelayemail.php
|
6 |
+
* @Created on 4th June 2012
|
7 |
+
* @copyright Copyright (c) 2012 Magento Complete
|
8 |
+
*/
|
9 |
+
|
10 |
+
|
11 |
+
class MC_Mcautoorderdelayemail_Model_Mcautoorderdelayemail
|
12 |
+
{
|
13 |
+
const SHIPMENT_DELAY_ENABLE = 'mcautoorderdelayemail_section/mcautoorderdelayemail_group/mcautoorderdelayemail_enable';
|
14 |
+
|
15 |
+
const SHIPMENT_DELAY_LICENSE = 'mcautoorderdelayemail_section/mcautoorderdelayemail_group/mcautoorderdelayemail_license';
|
16 |
+
|
17 |
+
const SHIPMENT_DELAY_DURATION = 'mcautoorderdelayemail_section/mcautoorderdelayemail_group/mcautoorderdelayemail_duration';
|
18 |
+
|
19 |
+
const SHIPMENT_DELAY_STATUS = 'mcautoorderdelayemail_section/mcautoorderdelayemail_group/mcautoorderdelayemail_status';
|
20 |
+
|
21 |
+
const SHIPMENT_DELAY_EMAIL_TEMPLATE = 'mcautoorderdelayemail_section/mcautoorderdelayemail_group/mcautoorderdelayemail_email';
|
22 |
+
|
23 |
+
const SHIPMENT_DELAY_EMAIL_IDENTITY = 'mcautoorderdelayemail_section/mcautoorderdelayemail_group/mcautoorderdelayemail_identity';
|
24 |
+
|
25 |
+
|
26 |
+
protected $_enabled = NULL;
|
27 |
+
|
28 |
+
protected $_license = NULL;
|
29 |
+
|
30 |
+
protected $_days = NULL;
|
31 |
+
|
32 |
+
protected $_status = NULL;
|
33 |
+
|
34 |
+
protected $_templateID = NULL;
|
35 |
+
|
36 |
+
protected $_identity = NULL;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* @method sendMailCustomer()
|
40 |
+
* @param
|
41 |
+
* @return
|
42 |
+
* @discription: The method is mainly responcible for sending a
|
43 |
+
* shipment delay email to those customers, whose shipment has not sent
|
44 |
+
* in a time period after placeing their order.
|
45 |
+
*/
|
46 |
+
public function sendMailCustomer()
|
47 |
+
{
|
48 |
+
$allStoresId = Mage::app()->getStores();
|
49 |
+
|
50 |
+
|
51 |
+
foreach ($allStoresId as $eachStoreId => $val)
|
52 |
+
{
|
53 |
+
|
54 |
+
$storeId = Mage::app()->getStore($eachStoreId)->getId();
|
55 |
+
|
56 |
+
/* Value of admin >> configuration >> Shipment delay >> Enabled field [type(boolean) "true/false"] */
|
57 |
+
|
58 |
+
$this->_enabled = Mage::getStoreConfig(self::SHIPMENT_DELAY_ENABLE, Mage::app()->getStore($storeId));
|
59 |
+
|
60 |
+
/* Value of admin >> configuration >> Shipment delay >> Delay field [type(text)] */
|
61 |
+
|
62 |
+
$this->_days = Mage::getStoreConfig(self::SHIPMENT_DELAY_DURATION, Mage::app()->getStore($storeId));
|
63 |
+
|
64 |
+
/* Setting default value for $data. It hapens when
|
65 |
+
* admin >> configuration >> Shipment delay >> Delay field is empty
|
66 |
+
*/
|
67 |
+
|
68 |
+
if(empty($this->_days)) $this->_days = 0;
|
69 |
+
|
70 |
+
/* Value of admin >> configuration >> Shipment delay >> Order Status field [type(multiselect)] */
|
71 |
+
|
72 |
+
$this->_status = Mage::getStoreConfig(self::SHIPMENT_DELAY_STATUS, Mage::app()->getStore($storeId));
|
73 |
+
|
74 |
+
/* Value of admin >> configuration >> Shipment delay >> Email Template field [type(select)] */
|
75 |
+
|
76 |
+
$this->_templateID = Mage::getStoreConfig(self::SHIPMENT_DELAY_EMAIL_TEMPLATE, Mage::app()->getStore($storeId));
|
77 |
+
|
78 |
+
$this->_identity = Mage::getStoreConfig(self::SHIPMENT_DELAY_EMAIL_IDENTITY, Mage::app()->getStore($storeId));
|
79 |
+
|
80 |
+
/* magento multiselect returns a string having all selected values with comma seperation
|
81 |
+
* So we have to explode to get an array of Selected values
|
82 |
+
*/
|
83 |
+
|
84 |
+
$statusData = explode(',', $this->_status);
|
85 |
+
|
86 |
+
$mailTemplate = Mage::getModel('core/email_template');
|
87 |
+
|
88 |
+
$template_collection = $mailTemplate->load($this->_templateID);
|
89 |
+
|
90 |
+
$template_data = $template_collection->getData();
|
91 |
+
|
92 |
+
$this->_templateID;
|
93 |
+
|
94 |
+
/* Checking Module is enable or disable */
|
95 |
+
|
96 |
+
if($this->_enabled){
|
97 |
+
|
98 |
+
/* Fetching all attributes of the sales order */
|
99 |
+
|
100 |
+
$orders = Mage::getModel('sales/order')->getCollection()
|
101 |
+
->addFieldToFilter('status', $statusData)
|
102 |
+
->addAttributeToSelect('*');
|
103 |
+
|
104 |
+
|
105 |
+
foreach ($orders as $order){
|
106 |
+
|
107 |
+
$email = $order->getCustomerEmail();
|
108 |
+
|
109 |
+
$order_Id = $order->getRealOrderId();
|
110 |
+
|
111 |
+
|
112 |
+
|
113 |
+
//Ordered Created Date and Time
|
114 |
+
$createdAt = $order->getCreatedAt();
|
115 |
+
|
116 |
+
$time = strtotime($createdAt);
|
117 |
+
|
118 |
+
$time_last = $this->getSeconds($this->_days);
|
119 |
+
|
120 |
+
$time_start = $time_last-(60*60*24);
|
121 |
+
|
122 |
+
$flag = 0;
|
123 |
+
|
124 |
+
|
125 |
+
|
126 |
+
/*
|
127 |
+
* Checking Order time comes under delay time to one day before of delay time
|
128 |
+
*/
|
129 |
+
|
130 |
+
if($time < $time_last && $time > $time_start){
|
131 |
+
|
132 |
+
If($_history = $order->getVisibleStatusHistory())
|
133 |
+
{
|
134 |
+
foreach($_history as $_historyItem)
|
135 |
+
{
|
136 |
+
$messMatch = explode(' date', $_historyItem->getComment());
|
137 |
+
//var_dump($messMatch);
|
138 |
+
if($messMatch[0] === "Customer Notified :: Automatic Order Delay Email sent on")
|
139 |
+
{
|
140 |
+
$flag++;
|
141 |
+
}
|
142 |
+
}
|
143 |
+
}
|
144 |
+
|
145 |
+
if($flag === 0){
|
146 |
+
|
147 |
+
// Customer Email
|
148 |
+
$email = $order->getCustomerEmail();
|
149 |
+
//Customer Name
|
150 |
+
$name = $order->getBillingAddress()->getName();
|
151 |
+
|
152 |
+
$product_name = array();
|
153 |
+
|
154 |
+
$items = $order->getAllItems();
|
155 |
+
|
156 |
+
foreach($items as $item)
|
157 |
+
{
|
158 |
+
$product_name[] = $item->getName();
|
159 |
+
}
|
160 |
+
|
161 |
+
//Concatanating Ordered Products name by ', '
|
162 |
+
$product = implode(", ", $product_name);
|
163 |
+
|
164 |
+
$message = $template_data[template_text];
|
165 |
+
|
166 |
+
//Replacing {{ProductName}} with the Origenal products name
|
167 |
+
$message = str_replace('{{ProductName}}', $product, $message);
|
168 |
+
|
169 |
+
|
170 |
+
//Replacing {{OrderNumber}} with the current OrderId
|
171 |
+
$message = str_replace('{{OrderNumber}}', $order_Id, $message);
|
172 |
+
|
173 |
+
/* Checking for Email Template */
|
174 |
+
if(!empty($template_data)){
|
175 |
+
|
176 |
+
$templateId = $template_data['template_id'];
|
177 |
+
// Get Mail Subjest
|
178 |
+
$mailSubject = $template_data['template_subject'];
|
179 |
+
//fetch sender data from Adminend > System > Configuration > Store Email Addresses
|
180 |
+
switch($this->_identity)
|
181 |
+
{
|
182 |
+
case 'general':
|
183 |
+
//fetch sender email
|
184 |
+
|
185 |
+
$from_email = Mage::getStoreConfig('trans_email/ident_general/email');
|
186 |
+
|
187 |
+
//fetch sender name
|
188 |
+
|
189 |
+
$from_name = Mage::getStoreConfig('trans_email/ident_general/name');
|
190 |
+
|
191 |
+
break;
|
192 |
+
|
193 |
+
case 'sales':
|
194 |
+
//fetch sender email
|
195 |
+
|
196 |
+
$from_email = Mage::getStoreConfig('trans_email/ident_sales/email');
|
197 |
+
|
198 |
+
//fetch sender name
|
199 |
+
|
200 |
+
$from_name = Mage::getStoreConfig('trans_email/ident_sales/name');
|
201 |
+
|
202 |
+
break;
|
203 |
+
|
204 |
+
case 'support':
|
205 |
+
|
206 |
+
//fetch sender email
|
207 |
+
|
208 |
+
$from_email = Mage::getStoreConfig('trans_email/ident_support/email');
|
209 |
+
|
210 |
+
//fetch sender name
|
211 |
+
|
212 |
+
$from_name = Mage::getStoreConfig('trans_email/ident_support/name');
|
213 |
+
|
214 |
+
break;
|
215 |
+
|
216 |
+
case 'custom1':
|
217 |
+
|
218 |
+
//fetch sender email
|
219 |
+
|
220 |
+
$from_email = Mage::getStoreConfig('trans_email/ident_custom1/email');
|
221 |
+
|
222 |
+
//fetch sender name
|
223 |
+
|
224 |
+
$from_name = Mage::getStoreConfig('trans_email/ident_custom1/name');
|
225 |
+
|
226 |
+
break;
|
227 |
+
|
228 |
+
case 'custom2':
|
229 |
+
|
230 |
+
//fetch sender email
|
231 |
+
|
232 |
+
$from_email = Mage::getStoreConfig('trans_email/ident_custom2/email');
|
233 |
+
|
234 |
+
//fetch sender name
|
235 |
+
|
236 |
+
$from_name = Mage::getStoreConfig('trans_email/ident_custom2/name');
|
237 |
+
|
238 |
+
break;
|
239 |
+
|
240 |
+
}
|
241 |
+
|
242 |
+
|
243 |
+
$billingAddress = $order->getBillingAddress();
|
244 |
+
|
245 |
+
$mail = new Zend_Mail();
|
246 |
+
|
247 |
+
$mail->setBodyHTML($message);
|
248 |
+
|
249 |
+
$mail->setFrom($from_email, $from_name);
|
250 |
+
|
251 |
+
$mail->addTo($order->getCustomerEmail(), $billingAddress->getFirstname() . ' ' . $billingAddress->getLastname());
|
252 |
+
|
253 |
+
$mail->setSubject($mailSubject);
|
254 |
+
|
255 |
+
try {
|
256 |
+
|
257 |
+
$mail->send();
|
258 |
+
|
259 |
+
$order->addStatusHistoryComment('Customer Notified :: Automatic Order Delay Email sent on date '. date("d-m-Y H:i:s", time()), $order->getStatus())
|
260 |
+
->setIsVisibleOnFront(true)
|
261 |
+
->setIsCustomerNotified(true);
|
262 |
+
|
263 |
+
$order->save();
|
264 |
+
}catch(Exception $ex){}
|
265 |
+
}
|
266 |
+
}
|
267 |
+
}
|
268 |
+
}
|
269 |
+
}
|
270 |
+
}
|
271 |
+
}
|
272 |
+
|
273 |
+
|
274 |
+
/**
|
275 |
+
* @method sendMailCustomer()
|
276 |
+
* @param $day [Number of days]
|
277 |
+
* @return $timestamp_days_before_seconds [time in second of x days before]
|
278 |
+
* @discription: The method is mainly manipulate the time. It get day(s)
|
279 |
+
* as parameter and manipulate it into seconds then returns the number of
|
280 |
+
* days before time in seconds.
|
281 |
+
*/
|
282 |
+
|
283 |
+
public function getSeconds($days=0){
|
284 |
+
$now = now();
|
285 |
+
$now_seconds = strtotime($now);
|
286 |
+
$three_days_second = (60 * 60 * 24 * $days);
|
287 |
+
$time_days_before_seconds = $now_seconds - $three_days_second;
|
288 |
+
return $time_days_before_seconds;
|
289 |
+
}
|
290 |
+
}
|
291 |
+
|
app/code/community/MC/Mcautoorderdelayemail/Model/Mcautoorderdelayemailconfig.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* @Category Community
|
4 |
+
* @Package MC_Mcautoorderdelayemail
|
5 |
+
* @Document Mcautoorderdelayemailconfig.php
|
6 |
+
* @Created on 4th June 2012
|
7 |
+
* @copyright Copyright (c) 2012 Magento Complete
|
8 |
+
*/
|
9 |
+
|
10 |
+
class MC_Mcautoorderdelayemail_Model_Mcautoorderdelayemailconfig extends Mage_Core_Model_Config_Data
|
11 |
+
{
|
12 |
+
|
13 |
+
protected function _beforeSave()
|
14 |
+
{
|
15 |
+
$config_all_fields_value = $this->getFieldset_data();
|
16 |
+
if($config_all_fields_value['mcautoorderdelayemail_enable'] == 1){
|
17 |
+
$license_key = $this->getValue();
|
18 |
+
$arr = parse_url(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB));
|
19 |
+
$domain = $arr['host'];
|
20 |
+
$store_path = $arr['host'].$arr['path'];
|
21 |
+
$product = "Auto_Order_Delay_Emailer";
|
22 |
+
|
23 |
+
if (empty($license_key)) {
|
24 |
+
throw new Exception('Please Enter Valid License Key');
|
25 |
+
}
|
26 |
+
|
27 |
+
$license_approval = file_get_contents("http://irzoo.com/Extensions-Data/getinfo.php?storepath=".$store_path."&license=".$license_key."&domain=".$domain."&product=".$product);
|
28 |
+
|
29 |
+
if (!empty($license_key) && $license_approval != 1) {
|
30 |
+
throw new Exception('Please Enter Valid License Key');
|
31 |
+
}
|
32 |
+
return $this;
|
33 |
+
}
|
34 |
+
}
|
35 |
+
|
36 |
+
|
37 |
+
}
|
app/code/community/MC/Mcautoorderdelayemail/Model/Mcautoorderdelayemailtemplate.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* @category Community
|
4 |
+
* @package MC_Mcautoreviewreminderemail
|
5 |
+
* @Document Mcautoreviewreminderemailconfig.php
|
6 |
+
* @Created on April 11, 2012, 7:05 PM
|
7 |
+
* @copyright Copyright (c) 2012 Magento Complete
|
8 |
+
*/
|
9 |
+
|
10 |
+
class MC_Mcautoorderdelayemail_Model_Mcautoorderdelayemailtemplate extends Mage_Core_Model_Config_Data
|
11 |
+
{
|
12 |
+
|
13 |
+
protected function _beforeSave()
|
14 |
+
{
|
15 |
+
$config_all_fields_value = $this->getFieldset_data();
|
16 |
+
if($config_all_fields_value['mcautoorderdelayemail_enable'] == 1){
|
17 |
+
$template = $this->getValue();
|
18 |
+
|
19 |
+
if (empty($template) || $template == 'mcautoorderdelayemail_section_mcautoorderdelayemail_group_mcautoorderdelayemail_email') {
|
20 |
+
throw new Exception('Default template from locale should not be used');
|
21 |
+
}
|
22 |
+
|
23 |
+
return $this;
|
24 |
+
}
|
25 |
+
}
|
26 |
+
|
27 |
+
|
28 |
+
}
|
app/code/community/MC/Mcautoorderdelayemail/etc/adminhtml.xml
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
|
3 |
+
<!--
|
4 |
+
* @Category Community
|
5 |
+
* @Package MC_Mcautoorderdelayemail
|
6 |
+
* @Document adminhtml.xml
|
7 |
+
* @Created on 6 April , 2012
|
8 |
+
-->
|
9 |
+
|
10 |
+
<config>
|
11 |
+
<acl>
|
12 |
+
<resources>
|
13 |
+
<admin>
|
14 |
+
<children>
|
15 |
+
<system>
|
16 |
+
<children>
|
17 |
+
<config>
|
18 |
+
<children>
|
19 |
+
<mcautoorderdelayemail_section translate="title" module="mcautoorderdelayemail">
|
20 |
+
<title>Auto Order Delay Email</title>
|
21 |
+
<sort_order>110</sort_order>
|
22 |
+
</mcautoorderdelayemail_section>
|
23 |
+
</children>
|
24 |
+
</config>
|
25 |
+
</children>
|
26 |
+
</system>
|
27 |
+
</children>
|
28 |
+
</admin>
|
29 |
+
</resources>
|
30 |
+
</acl>
|
31 |
+
</config>
|
app/code/community/MC/Mcautoorderdelayemail/etc/config.xml
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
|
3 |
+
<!--
|
4 |
+
* @Category Community
|
5 |
+
* @Package MC_Mcautoorderdelayemail
|
6 |
+
* @Document system.xml
|
7 |
+
* @Created on 6 April , 2012
|
8 |
+
-->
|
9 |
+
|
10 |
+
<config>
|
11 |
+
<modules>
|
12 |
+
<MC_Mcautoorderdelayemail>
|
13 |
+
<version>1.0.0</version>
|
14 |
+
</MC_Mcautoorderdelayemail>
|
15 |
+
</modules>
|
16 |
+
<global>
|
17 |
+
<models>
|
18 |
+
<mcautoorderdelayemail>
|
19 |
+
<class>MC_Mcautoorderdelayemail_Model</class>
|
20 |
+
</mcautoorderdelayemail>
|
21 |
+
</models>
|
22 |
+
<helpers>
|
23 |
+
<mcautoorderdelayemail>
|
24 |
+
<class>MC_Mcautoorderdelayemail_Helper</class>
|
25 |
+
</mcautoorderdelayemail>
|
26 |
+
</helpers>
|
27 |
+
</global>
|
28 |
+
|
29 |
+
<crontab>
|
30 |
+
<jobs>
|
31 |
+
<customer_mail_send>
|
32 |
+
<schedule><cron_expr>* * * * *</cron_expr></schedule>
|
33 |
+
<run><model>mcautoorderdelayemail/mcautoorderdelayemail::sendMailCustomer</model></run>
|
34 |
+
</customer_mail_send>
|
35 |
+
</jobs>
|
36 |
+
</crontab>
|
37 |
+
</config>
|
app/code/community/MC/Mcautoorderdelayemail/etc/system.xml
ADDED
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
|
3 |
+
<!--
|
4 |
+
* @Category Community
|
5 |
+
* @Package MC_Mcautoorderdelayemail
|
6 |
+
* @Document system.xml
|
7 |
+
* @Created on 6 April , 2012
|
8 |
+
-->
|
9 |
+
|
10 |
+
<config>
|
11 |
+
<tabs>
|
12 |
+
<mctab translate="label" module="mcautoorderdelayemail">
|
13 |
+
<label>Mc Extensions</label>
|
14 |
+
<sort_order>4000</sort_order>
|
15 |
+
</mctab>
|
16 |
+
</tabs>
|
17 |
+
|
18 |
+
<sections>
|
19 |
+
<mcautoorderdelayemail_section translate="label" module="mcautoorderdelayemail">
|
20 |
+
<label> Auto Order Delay Email</label>
|
21 |
+
<tab>mctab</tab>
|
22 |
+
<frontend_type>text</frontend_type>
|
23 |
+
<sort_order>4000</sort_order>
|
24 |
+
<show_in_default>1</show_in_default>
|
25 |
+
<show_in_website>1</show_in_website>
|
26 |
+
<show_in_store>1</show_in_store>
|
27 |
+
<groups>
|
28 |
+
<mcautoorderdelayemail_group translate="label" module="mcautoorderdelayemail">
|
29 |
+
<label> Auto Order Delay Email Setting</label>
|
30 |
+
<frontend_type>text</frontend_type>
|
31 |
+
<sort_order>1000</sort_order>
|
32 |
+
<show_in_default>1</show_in_default>
|
33 |
+
<show_in_website>1</show_in_website>
|
34 |
+
<show_in_store>1</show_in_store>
|
35 |
+
<fields>
|
36 |
+
<mcautoorderdelayemail_enable translate="label">
|
37 |
+
<label>Enable </label>
|
38 |
+
<frontend_type>select</frontend_type>
|
39 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
40 |
+
<!--<backend_model>adminhtml/system_config_backend_translate</backend_model>-->
|
41 |
+
<sort_order>0</sort_order>
|
42 |
+
<show_in_default>1</show_in_default>
|
43 |
+
<show_in_website>1</show_in_website>
|
44 |
+
<show_in_store>1</show_in_store>
|
45 |
+
</mcautoorderdelayemail_enable>
|
46 |
+
|
47 |
+
<mcautoorderdelayemail_license translate="label">
|
48 |
+
<label>License Key <![CDATA[<span class="required">*</span>]]></label>
|
49 |
+
<comment>Enter License Key</comment>
|
50 |
+
<frontend_type>text</frontend_type>
|
51 |
+
<backend_model>mcautoorderdelayemail/Mcautoorderdelayemailconfig</backend_model>
|
52 |
+
<sort_order>1</sort_order>
|
53 |
+
<show_in_default>1</show_in_default>
|
54 |
+
<show_in_website>1</show_in_website>
|
55 |
+
<show_in_store>1</show_in_store>
|
56 |
+
<comment><![CDATA[ <span class="note">Please Enter License Key !</span>]]> </comment>
|
57 |
+
</mcautoorderdelayemail_license>
|
58 |
+
|
59 |
+
<mcautoorderdelayemail_status>
|
60 |
+
<label>Order Status</label>
|
61 |
+
<comment>Select Order Status event as per your regional language after which you would like to send order delay email</comment>
|
62 |
+
<frontend_type>multiselect</frontend_type>
|
63 |
+
<source_model>adminhtml/system_config_source_order_status</source_model>
|
64 |
+
<sort_order>2</sort_order>
|
65 |
+
<show_in_default>1</show_in_default>
|
66 |
+
<show_in_website>1</show_in_website>
|
67 |
+
<show_in_store>1</show_in_store>
|
68 |
+
<can_be_empty>1</can_be_empty>
|
69 |
+
</mcautoorderdelayemail_status>
|
70 |
+
|
71 |
+
<mcautoorderdelayemail_duration translate="label">
|
72 |
+
<label>Delay</label>
|
73 |
+
<comment>Enter the duration in day. Mail will be sent after X(Delay) Days from Order Status Event selected above</comment>
|
74 |
+
<validate>validate-number</validate>
|
75 |
+
<frontend_type>text</frontend_type>
|
76 |
+
<sort_order>3</sort_order>
|
77 |
+
<show_in_default>1</show_in_default>
|
78 |
+
<show_in_website>1</show_in_website>
|
79 |
+
<show_in_store>1</show_in_store>
|
80 |
+
</mcautoorderdelayemail_duration>
|
81 |
+
|
82 |
+
<mcautoorderdelayemail_email>
|
83 |
+
<label>Select Email Template</label>
|
84 |
+
<comment>It is advisable to create a new email template for this purpose and then select it in this configuration <![CDATA[ <br /><span style="color:#FFA500">NOTE:- Default template from locale should not be used. Make sure you add product Name in your template. For e.g., {{ProductName}}) You can also use other variables like OrderNumber {{OrderNumber}}</span>]]></comment>
|
85 |
+
<frontend_type>select</frontend_type>
|
86 |
+
<backend_model>mcautoorderdelayemail/Mcautoorderdelayemailtemplate</backend_model>
|
87 |
+
<source_model>adminhtml/system_config_source_email_template</source_model>
|
88 |
+
<sort_order>4</sort_order>
|
89 |
+
<show_in_default>1</show_in_default>
|
90 |
+
<show_in_website>1</show_in_website>
|
91 |
+
<show_in_store>1</show_in_store>
|
92 |
+
<can_be_empty>1</can_be_empty>
|
93 |
+
</mcautoorderdelayemail_email>
|
94 |
+
|
95 |
+
<mcautoorderdelayemail_identity translate="label">
|
96 |
+
<label>Choose Sender's Email</label>
|
97 |
+
<comment>Choose the right sender user as per your choice</comment>
|
98 |
+
<frontend_type>select</frontend_type>
|
99 |
+
<source_model>adminhtml/system_config_source_email_identity</source_model>
|
100 |
+
<sort_order>5</sort_order>
|
101 |
+
<show_in_default>1</show_in_default>
|
102 |
+
<show_in_website>1</show_in_website>
|
103 |
+
<show_in_store>1</show_in_store>
|
104 |
+
</mcautoorderdelayemail_identity>
|
105 |
+
|
106 |
+
|
107 |
+
|
108 |
+
</fields>
|
109 |
+
</mcautoorderdelayemail_group>
|
110 |
+
</groups>
|
111 |
+
</mcautoorderdelayemail_section>
|
112 |
+
</sections>
|
113 |
+
</config>
|
app/etc/modules/MC_Mcautoorderdelayemail.xml
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
Document : MC_Mcautoorderdelayemail.xml
|
4 |
+
Created on : May 10, 2012, 3:05 PM
|
5 |
+
Author : Magento Complete
|
6 |
+
Description: Purpose of the document follows.
|
7 |
+
-->
|
8 |
+
<config>
|
9 |
+
<modules>
|
10 |
+
<MC_Mcautoorderdelayemail>
|
11 |
+
<active>true</active>
|
12 |
+
<codePool>community</codePool>
|
13 |
+
</MC_Mcautoorderdelayemail>
|
14 |
+
</modules>
|
15 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Irzoo_AutoOrderDelay</name>
|
4 |
+
<version>1.0.0</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>
|
8 |
+
<extends/>
|
9 |
+
<summary>This extension sends email alerts to customers informing them about delay in the delivery of the order.</summary>
|
10 |
+
<description>Establish strong relationships, boost customers' loyalty and obtain more consequent sales with Auto Order Delay Emailer extension brought to you by Irzoo.com. 
|
11 |
+
Auto Order Delay Emailer extension by Irzoo is a robust auto-responder & customer relationship tool. This extension facilitates you to send an email automatically to the customer to notify him about delay in the delivery/dispatch of the product ordered. The extension is user-friendly and amiable. A few important features of this extension is that emails can be customized, makes your e-shop work in more professional, smart and considerate manner, 100% open-source and easy to install.</description>
|
12 |
+
<notes>Auto Order Delay Emailer extension allows you to automatically send an order delay mail after # number of days. The current Auto Order Delay emailer extension module boasts of the following features: 
|
13 |
+
<ul>
|
14 |
+
<li>* Emails are customizable.</li>
|
15 |
+
<li>*Admin can set the day when email alerts need to be send. </li>
|
16 |
+
<li>*100% open-source.</li>
|
17 |
+
<li>*Supports multiple e-stores & multiple languages.</li>
|
18 |
+
<li>*HTML/CSS validation.</li>
|
19 |
+
<li>*Facilitates you to configure notification defaults.</li>
|
20 |
+
<li>*Easy to install. </li>
|
21 |
+
</ul></notes>
|
22 |
+
<authors><author><name>Nitin</name><user>irzoo</user><email>support@irzoo.com</email></author></authors>
|
23 |
+
<date>2012-11-27</date>
|
24 |
+
<time>12:52:44</time>
|
25 |
+
<contents><target name="mage"><dir name="app"><dir name="code"><dir name="community"><dir name="MC"><dir name="Mcautoorderdelayemail"><dir name="Helper"><file name="Data.php" hash="0b11089e538126e167028d68f4528410"/></dir><dir name="Model"><file name="Mcautoorderdelayemail.php" hash="cad8dbd83a2d7033234156a4a1757da1"/><file name="Mcautoorderdelayemailconfig.php" hash="00b2afa9a4c0261819006506645a6bac"/><file name="Mcautoorderdelayemailtemplate.php" hash="2ef687cec5f820412d33ed41ae2d491e"/></dir><dir name="etc"><file name="adminhtml.xml" hash="3c8b5f333277a37e44900bb5550d734c"/><file name="config.xml" hash="84d1cfabe123baa5b541760602ac0d41"/><file name="system.xml" hash="565820697c198c166ef8365ba5e50b4c"/></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="MC_Mcautoorderdelayemail.xml" hash="f2fd5207eb64e0fbaec7d2df260c7cf5"/></dir></dir></dir><dir name="."><file name="Order Delay Mail User Installation Guide 1.0.01.pdf" hash="ae03089194967a2a398f3071a78d6478"/></dir></target></contents>
|
26 |
+
<compatible/>
|
27 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
28 |
+
</package>
|