mailplatformconnector - Version 2.0.1.4

Version Notes

Changed code style to PSR-2
Moved code files from local to community
Removed unnecessary files
Removed unnecessary code lines
Removed unnecessary code logic
Fixed file names
Alternated code by Magento standards
Corrected English grammar
Tested on Magento CE 1.7, 1.8 and 1.9

Download this release

Release Info

Developer ADEO WEB
Extension mailplatformconnector
Version 2.0.1.4
Comparing to
See all releases


Code changes from version 2.0.1.2 to 2.0.1.4

app/code/community/Mp/Mailplatformconnector/Helper/Data.php CHANGED
@@ -81,4 +81,9 @@ class Mp_Mailplatformconnector_Helper_Data extends Mage_Core_Helper_Abstract
81
  return (boolean) Mage::getStoreConfig('mailplatform/crontab/' . $crontab);
82
  }
83
 
 
 
 
 
 
84
  }
81
  return (boolean) Mage::getStoreConfig('mailplatform/crontab/' . $crontab);
82
  }
83
 
84
+ public function sendConfirmation()
85
+ {
86
+ return Mage::getStoreConfigFlag('mailplatform/subscribe/double_optin');
87
+ }
88
+
89
  }
app/code/community/Mp/Mailplatformconnector/Model/Cron.php CHANGED
@@ -57,7 +57,8 @@ class Mp_Mailplatformconnector_Model_Cron {
57
  Mage::getSingleton('adminhtml/session')->addError("Mailplatform - " . $subscribers->getErrorMessage() . '<br/>');
58
  }
59
  } else {
60
- $details['confirmed'] = true;
 
61
  $result = $subscribers->addSubscriberToList($email, null, $details);
62
 
63
  if ($result && ! $crontab) {
57
  Mage::getSingleton('adminhtml/session')->addError("Mailplatform - " . $subscribers->getErrorMessage() . '<br/>');
58
  }
59
  } else {
60
+ // If added as not-confirmed, a confirmation mail will be sent
61
+ $details['confirmed'] = ! Mage::helper('mailplatform')->sendConfirmation();
62
  $result = $subscribers->addSubscriberToList($email, null, $details);
63
 
64
  if ($result && ! $crontab) {
app/code/community/Mp/Mailplatformconnector/Model/Observer.php CHANGED
@@ -16,7 +16,7 @@ class Mp_Mailplatformconnector_Model_Observer
16
 
17
  $isSubscribed = Mage::app()->getRequest()->getParam('is_subscribed');
18
 
19
- if ($isSubscribed) {
20
  $confirmed = true;
21
  }
22
 
16
 
17
  $isSubscribed = Mage::app()->getRequest()->getParam('is_subscribed');
18
 
19
+ if ($isSubscribed && ! Mage::helper('mailplatform')->sendConfirmation()) {
20
  $confirmed = true;
21
  }
22
 
app/code/community/Mp/Mailplatformconnector/Model/Subscribers.php CHANGED
@@ -27,6 +27,12 @@ class Mp_Mailplatformconnector_Model_Subscribers extends Mp_Mailplatformconnecto
27
  $details = array_intersect_key($details, array_flip($allowed));
28
  }
29
 
 
 
 
 
 
 
30
  $details['format'] = $this->_getFormat();
31
 
32
  //Required
27
  $details = array_intersect_key($details, array_flip($allowed));
28
  }
29
 
30
+ // Check is set confirmation param or add value from config
31
+ if (! isset($details['confirmed'])) {
32
+ // If added as not-confirmed, a confirmation mail will be sent
33
+ $details['confirmed'] = ! Mage::helper('mailplatform')->sendConfirmation();
34
+ }
35
+
36
  $details['format'] = $this->_getFormat();
37
 
38
  //Required
app/code/community/Mp/Mailplatformconnector/etc/config.xml CHANGED
@@ -1,9 +1,9 @@
1
  <?xml version="1.0"?>
2
  <config>
3
  <modules>
4
- <Mp_Mailplatformconnector>
5
- <version>2.0.1.2</version>
6
- </Mp_Mailplatformconnector>
7
  </modules>
8
  <global>
9
  <blocks>
@@ -46,9 +46,9 @@
46
  <frontend>
47
  <layout>
48
  <updates>
49
- <mp_mailplatform module="Mp_Mailplatformconnector">
50
  <file>mailplatform.xml</file>
51
- </mp_mailplatform>
52
  </updates>
53
  </layout>
54
  </frontend>
@@ -61,7 +61,7 @@
61
  <children>
62
  <config>
63
  <children>
64
- <mailplatform translate="title" module="Mp_Mailplatformconnector">
65
  <title>mailplatform Section</title>
66
  <sort_order>50</sort_order>
67
  </mailplatform>
@@ -98,7 +98,7 @@
98
  <lastname>3</lastname>
99
  <city>8</city>
100
  <email_type>html</email_type>
101
- <double_optin>0</double_optin>
102
  <update_existing>1</update_existing>
103
  </subscribe>
104
  <unsubscribe>
1
  <?xml version="1.0"?>
2
  <config>
3
  <modules>
4
+ <Mp_Mailplatformconnectorconnector>
5
+ <version>2.0.1.4</version>
6
+ </Mp_Mailplatformconnectorconnector>
7
  </modules>
8
  <global>
9
  <blocks>
46
  <frontend>
47
  <layout>
48
  <updates>
49
+ <Mp_Mailplatformconnector module="Mp_Mailplatformconnector">
50
  <file>mailplatform.xml</file>
51
+ </Mp_Mailplatformconnector>
52
  </updates>
53
  </layout>
54
  </frontend>
61
  <children>
62
  <config>
63
  <children>
64
+ <mailplatform translate="title" module="mailplatform">
65
  <title>mailplatform Section</title>
66
  <sort_order>50</sort_order>
67
  </mailplatform>
98
  <lastname>3</lastname>
99
  <city>8</city>
100
  <email_type>html</email_type>
101
+ <double_optin>1</double_optin>
102
  <update_existing>1</update_existing>
103
  </subscribe>
104
  <unsubscribe>
app/code/community/Mp/Mailplatformconnector/etc/system.xml CHANGED
@@ -32,7 +32,7 @@
32
  <frontend_type>text</frontend_type>
33
  <sort_order>2</sort_order>
34
  <show_in_default>1</show_in_default>
35
- <show_in_website>0</show_in_website>
36
  <show_in_store>1</show_in_store>
37
  <comment>The username used in the XML API requests.</comment>
38
  </username>
@@ -41,7 +41,7 @@
41
  <frontend_type>text</frontend_type>
42
  <sort_order>3</sort_order>
43
  <show_in_default>1</show_in_default>
44
- <show_in_website>0</show_in_website>
45
  <show_in_store>1</show_in_store>
46
  <comment>This token is what the user needs to include in their
47
  XML requests. If this token is not present in the XML request or
@@ -54,7 +54,7 @@
54
  <source_model>mailplatform/listids</source_model>
55
  <sort_order>4</sort_order>
56
  <show_in_default>1</show_in_default>
57
- <show_in_website>0</show_in_website>
58
  <show_in_store>1</show_in_store>
59
  <comment>The mailplatform list id where customers will be
60
  added/removed
@@ -87,7 +87,7 @@
87
  <frontend_type>text</frontend_type>
88
  <sort_order>2</sort_order>
89
  <show_in_default>1</show_in_default>
90
- <show_in_website>0</show_in_website>
91
  <show_in_store>1</show_in_store>
92
  <fields>
93
  <firstname translate="label comment">
@@ -95,7 +95,7 @@
95
  <frontend_type>text</frontend_type>
96
  <sort_order>1</sort_order>
97
  <show_in_default>1</show_in_default>
98
- <show_in_website>0</show_in_website>
99
  <show_in_store>1</show_in_store>
100
  <comment>ID must match mailplatform's custom field ID.</comment>
101
  </firstname>
@@ -104,7 +104,7 @@
104
  <frontend_type>text</frontend_type>
105
  <sort_order>2</sort_order>
106
  <show_in_default>1</show_in_default>
107
- <show_in_website>0</show_in_website>
108
  <show_in_store>1</show_in_store>
109
  <comment>ID must match mailplatform's custom field ID.</comment>
110
  </lastname>
@@ -113,7 +113,7 @@
113
  <frontend_type>text</frontend_type>
114
  <sort_order>3</sort_order>
115
  <show_in_default>1</show_in_default>
116
- <show_in_website>0</show_in_website>
117
  <show_in_store>1</show_in_store>
118
  <comment>ID must match mailplatform's custom field ID.</comment>
119
  </city>
@@ -122,7 +122,7 @@
122
  <frontend_type>text</frontend_type>
123
  <sort_order>4</sort_order>
124
  <show_in_default>1</show_in_default>
125
- <show_in_website>0</show_in_website>
126
  <show_in_store>1</show_in_store>
127
  <comment>ID must match mailplatform's custom field ID.</comment>
128
  </purchase_date>
@@ -131,7 +131,7 @@
131
  <frontend_type>text</frontend_type>
132
  <sort_order>5</sort_order>
133
  <show_in_default>1</show_in_default>
134
- <show_in_website>0</show_in_website>
135
  <show_in_store>1</show_in_store>
136
  <comment>ID must match mailplatform's custom field ID.</comment>
137
  </product_categories>
@@ -150,8 +150,8 @@
150
  <source_model>mailplatform/emailtype</source_model>
151
  <sort_order>7</sort_order>
152
  <show_in_default>1</show_in_default>
153
- <show_in_website>0</show_in_website>
154
- <show_in_store>0</show_in_store>
155
  <comment>Email type preference for the email</comment>
156
  </email_type>
157
  <double_optin translate="label">
@@ -159,12 +159,10 @@
159
  <frontend_type>select</frontend_type>
160
  <source_model>adminhtml/system_config_source_yesno</source_model>
161
  <sort_order>8</sort_order>
162
- <show_in_default>0</show_in_default>
163
- <show_in_website>0</show_in_website>
164
- <show_in_store>0</show_in_store>
165
- <comment>Flag to control whether a double opt-in confirmation
166
- message is sent
167
- </comment>
168
  </double_optin>
169
  <update_existing translate="label">
170
  <label>Update existing</label>
@@ -185,7 +183,7 @@
185
  <frontend_type>text</frontend_type>
186
  <sort_order>3</sort_order>
187
  <show_in_default>1</show_in_default>
188
- <show_in_website>0</show_in_website>
189
  <show_in_store>1</show_in_store>
190
  <fields>
191
  <delete_member translate="label">
@@ -194,7 +192,7 @@
194
  <source_model>adminhtml/system_config_source_yesno</source_model>
195
  <sort_order>1</sort_order>
196
  <show_in_default>1</show_in_default>
197
- <show_in_website>0</show_in_website>
198
  <show_in_store>1</show_in_store>
199
  <comment>Flag to completely delete the member from your list
200
  instead of just unsubscribing
@@ -206,7 +204,7 @@
206
  <source_model>adminhtml/system_config_source_yesno</source_model>
207
  <sort_order>1</sort_order>
208
  <show_in_default>1</show_in_default>
209
- <show_in_website>0</show_in_website>
210
  <show_in_store>1</show_in_store>
211
  <comment>Flag to send the goodbye email to the email address
212
  </comment>
@@ -217,7 +215,7 @@
217
  <source_model>adminhtml/system_config_source_yesno</source_model>
218
  <sort_order>1</sort_order>
219
  <show_in_default>1</show_in_default>
220
- <show_in_website>0</show_in_website>
221
  <show_in_store>1</show_in_store>
222
  <comment>Flag to send the unsubscribe notification email to the
223
  address defined in the list email notification settings
@@ -229,7 +227,7 @@
229
  <source_model>adminhtml/system_config_source_yesno</source_model>
230
  <sort_order>1</sort_order>
231
  <show_in_default>1</show_in_default>
232
- <show_in_website>0</show_in_website>
233
  <show_in_store>1</show_in_store>
234
  <comment>Specifies if thank you email should be send for the unsubscribed contact.</comment>
235
  </sendthankyou>
@@ -240,7 +238,7 @@
240
  <frontend_type>text</frontend_type>
241
  <sort_order>3</sort_order>
242
  <show_in_default>1</show_in_default>
243
- <show_in_website>0</show_in_website>
244
  <show_in_store>1</show_in_store>
245
  <fields>
246
  <error translate="label">
@@ -249,7 +247,7 @@
249
  <source_model>adminhtml/system_config_source_yesno</source_model>
250
  <sort_order>1</sort_order>
251
  <show_in_default>1</show_in_default>
252
- <show_in_website>0</show_in_website>
253
  <show_in_store>1</show_in_store>
254
  <comment>Enable logs on XML API request error.</comment>
255
  </error>
@@ -259,7 +257,7 @@
259
  <source_model>adminhtml/system_config_source_yesno</source_model>
260
  <sort_order>2</sort_order>
261
  <show_in_default>1</show_in_default>
262
- <show_in_website>0</show_in_website>
263
  <show_in_store>1</show_in_store>
264
  <comment>Enable logs on XML API request success.</comment>
265
  </success>
@@ -268,7 +266,7 @@
268
  <frontend_type>text</frontend_type>
269
  <sort_order>3</sort_order>
270
  <show_in_default>1</show_in_default>
271
- <show_in_website>0</show_in_website>
272
  <show_in_store>1</show_in_store>
273
  <comment>XML API request log file name.</comment>
274
  </file_name>
@@ -279,7 +277,7 @@
279
  <frontend_type>text</frontend_type>
280
  <sort_order>3</sort_order>
281
  <show_in_default>1</show_in_default>
282
- <show_in_website>0</show_in_website>
283
  <show_in_store>1</show_in_store>
284
  <fields>
285
  <sync_subscribers translate="label">
@@ -288,7 +286,7 @@
288
  <source_model>adminhtml/system_config_source_yesno</source_model>
289
  <sort_order>1</sort_order>
290
  <show_in_default>1</show_in_default>
291
- <show_in_website>0</show_in_website>
292
  <show_in_store>1</show_in_store>
293
  <comment>Every 12 h. sync enabled users.</comment>
294
  </sync_subscribers>
@@ -298,7 +296,7 @@
298
  <source_model>adminhtml/system_config_source_yesno</source_model>
299
  <sort_order>1</sort_order>
300
  <show_in_default>1</show_in_default>
301
- <show_in_website>0</show_in_website>
302
  <show_in_store>1</show_in_store>
303
  <comment>Every 12 h. sync custom field "Product Categories" values.</comment>
304
  </sync_categories>
32
  <frontend_type>text</frontend_type>
33
  <sort_order>2</sort_order>
34
  <show_in_default>1</show_in_default>
35
+ <show_in_website>1</show_in_website>
36
  <show_in_store>1</show_in_store>
37
  <comment>The username used in the XML API requests.</comment>
38
  </username>
41
  <frontend_type>text</frontend_type>
42
  <sort_order>3</sort_order>
43
  <show_in_default>1</show_in_default>
44
+ <show_in_website>1</show_in_website>
45
  <show_in_store>1</show_in_store>
46
  <comment>This token is what the user needs to include in their
47
  XML requests. If this token is not present in the XML request or
54
  <source_model>mailplatform/listids</source_model>
55
  <sort_order>4</sort_order>
56
  <show_in_default>1</show_in_default>
57
+ <show_in_website>1</show_in_website>
58
  <show_in_store>1</show_in_store>
59
  <comment>The mailplatform list id where customers will be
60
  added/removed
87
  <frontend_type>text</frontend_type>
88
  <sort_order>2</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
  <fields>
93
  <firstname translate="label comment">
95
  <frontend_type>text</frontend_type>
96
  <sort_order>1</sort_order>
97
  <show_in_default>1</show_in_default>
98
+ <show_in_website>1</show_in_website>
99
  <show_in_store>1</show_in_store>
100
  <comment>ID must match mailplatform's custom field ID.</comment>
101
  </firstname>
104
  <frontend_type>text</frontend_type>
105
  <sort_order>2</sort_order>
106
  <show_in_default>1</show_in_default>
107
+ <show_in_website>1</show_in_website>
108
  <show_in_store>1</show_in_store>
109
  <comment>ID must match mailplatform's custom field ID.</comment>
110
  </lastname>
113
  <frontend_type>text</frontend_type>
114
  <sort_order>3</sort_order>
115
  <show_in_default>1</show_in_default>
116
+ <show_in_website>1</show_in_website>
117
  <show_in_store>1</show_in_store>
118
  <comment>ID must match mailplatform's custom field ID.</comment>
119
  </city>
122
  <frontend_type>text</frontend_type>
123
  <sort_order>4</sort_order>
124
  <show_in_default>1</show_in_default>
125
+ <show_in_website>1</show_in_website>
126
  <show_in_store>1</show_in_store>
127
  <comment>ID must match mailplatform's custom field ID.</comment>
128
  </purchase_date>
131
  <frontend_type>text</frontend_type>
132
  <sort_order>5</sort_order>
133
  <show_in_default>1</show_in_default>
134
+ <show_in_website>1</show_in_website>
135
  <show_in_store>1</show_in_store>
136
  <comment>ID must match mailplatform's custom field ID.</comment>
137
  </product_categories>
150
  <source_model>mailplatform/emailtype</source_model>
151
  <sort_order>7</sort_order>
152
  <show_in_default>1</show_in_default>
153
+ <show_in_website>1</show_in_website>
154
+ <show_in_store>1</show_in_store>
155
  <comment>Email type preference for the email</comment>
156
  </email_type>
157
  <double_optin translate="label">
159
  <frontend_type>select</frontend_type>
160
  <source_model>adminhtml/system_config_source_yesno</source_model>
161
  <sort_order>8</sort_order>
162
+ <show_in_default>1</show_in_default>
163
+ <show_in_website>1</show_in_website>
164
+ <show_in_store>1</show_in_store>
165
+ <comment>Flag to control whether a double opt-in confirmation message is sent.</comment>
 
 
166
  </double_optin>
167
  <update_existing translate="label">
168
  <label>Update existing</label>
183
  <frontend_type>text</frontend_type>
184
  <sort_order>3</sort_order>
185
  <show_in_default>1</show_in_default>
186
+ <show_in_website>1</show_in_website>
187
  <show_in_store>1</show_in_store>
188
  <fields>
189
  <delete_member translate="label">
192
  <source_model>adminhtml/system_config_source_yesno</source_model>
193
  <sort_order>1</sort_order>
194
  <show_in_default>1</show_in_default>
195
+ <show_in_website>1</show_in_website>
196
  <show_in_store>1</show_in_store>
197
  <comment>Flag to completely delete the member from your list
198
  instead of just unsubscribing
204
  <source_model>adminhtml/system_config_source_yesno</source_model>
205
  <sort_order>1</sort_order>
206
  <show_in_default>1</show_in_default>
207
+ <show_in_website>1</show_in_website>
208
  <show_in_store>1</show_in_store>
209
  <comment>Flag to send the goodbye email to the email address
210
  </comment>
215
  <source_model>adminhtml/system_config_source_yesno</source_model>
216
  <sort_order>1</sort_order>
217
  <show_in_default>1</show_in_default>
218
+ <show_in_website>1</show_in_website>
219
  <show_in_store>1</show_in_store>
220
  <comment>Flag to send the unsubscribe notification email to the
221
  address defined in the list email notification settings
227
  <source_model>adminhtml/system_config_source_yesno</source_model>
228
  <sort_order>1</sort_order>
229
  <show_in_default>1</show_in_default>
230
+ <show_in_website>1</show_in_website>
231
  <show_in_store>1</show_in_store>
232
  <comment>Specifies if thank you email should be send for the unsubscribed contact.</comment>
233
  </sendthankyou>
238
  <frontend_type>text</frontend_type>
239
  <sort_order>3</sort_order>
240
  <show_in_default>1</show_in_default>
241
+ <show_in_website>1</show_in_website>
242
  <show_in_store>1</show_in_store>
243
  <fields>
244
  <error translate="label">
247
  <source_model>adminhtml/system_config_source_yesno</source_model>
248
  <sort_order>1</sort_order>
249
  <show_in_default>1</show_in_default>
250
+ <show_in_website>1</show_in_website>
251
  <show_in_store>1</show_in_store>
252
  <comment>Enable logs on XML API request error.</comment>
253
  </error>
257
  <source_model>adminhtml/system_config_source_yesno</source_model>
258
  <sort_order>2</sort_order>
259
  <show_in_default>1</show_in_default>
260
+ <show_in_website>1</show_in_website>
261
  <show_in_store>1</show_in_store>
262
  <comment>Enable logs on XML API request success.</comment>
263
  </success>
266
  <frontend_type>text</frontend_type>
267
  <sort_order>3</sort_order>
268
  <show_in_default>1</show_in_default>
269
+ <show_in_website>1</show_in_website>
270
  <show_in_store>1</show_in_store>
271
  <comment>XML API request log file name.</comment>
272
  </file_name>
277
  <frontend_type>text</frontend_type>
278
  <sort_order>3</sort_order>
279
  <show_in_default>1</show_in_default>
280
+ <show_in_website>1</show_in_website>
281
  <show_in_store>1</show_in_store>
282
  <fields>
283
  <sync_subscribers translate="label">
286
  <source_model>adminhtml/system_config_source_yesno</source_model>
287
  <sort_order>1</sort_order>
288
  <show_in_default>1</show_in_default>
289
+ <show_in_website>1</show_in_website>
290
  <show_in_store>1</show_in_store>
291
  <comment>Every 12 h. sync enabled users.</comment>
292
  </sync_subscribers>
296
  <source_model>adminhtml/system_config_source_yesno</source_model>
297
  <sort_order>1</sort_order>
298
  <show_in_default>1</show_in_default>
299
+ <show_in_website>1</show_in_website>
300
  <show_in_store>1</show_in_store>
301
  <comment>Every 12 h. sync custom field "Product Categories" values.</comment>
302
  </sync_categories>
app/design/adminhtml/default/default/template/mailplatform/system/config/button.phtml CHANGED
@@ -1,17 +1,17 @@
1
- <?php echo $this->getButtonHtml() ?>
2
- <div id="<?php echo $this->getResponseFieldId() ?>" class="response" style="display: none" ></div>
3
-
4
- <script type="text/javascript">
5
- document.getElementById("<?php echo $this->getButtonId() ?>").addEventListener("click", function() {
6
- var div = document.getElementById('<?php echo $this->getResponseFieldId() ?>');
7
- div.style.display = "block";
8
- new Ajax.Request("<?php echo $this->getAjaxCheckUrl() ?>", {
9
- 'onComplete': function(response) {
10
- div.innerHTML = response.responseText;
11
- },
12
- 'onFailure': function( $response ) {
13
- div.innerHTML = '<?php echo $this->__('Status: ') ?>' + response.status;
14
- }
15
- });
16
- });
17
  </script>
1
+ <?php echo $this->getButtonHtml() ?>
2
+ <div id="<?php echo $this->getResponseFieldId() ?>" class="response" style="display: none" ></div>
3
+
4
+ <script type="text/javascript">
5
+ document.getElementById("<?php echo $this->getButtonId() ?>").addEventListener("click", function() {
6
+ var div = document.getElementById('<?php echo $this->getResponseFieldId() ?>');
7
+ div.style.display = "block";
8
+ new Ajax.Request("<?php echo $this->getAjaxCheckUrl() ?>", {
9
+ 'onComplete': function(response) {
10
+ div.innerHTML = response.responseText;
11
+ },
12
+ 'onFailure': function( $response ) {
13
+ div.innerHTML = '<?php echo $this->__('Status: ') ?>' + response.status;
14
+ }
15
+ });
16
+ });
17
  </script>
app/design/adminhtml/default/default/template/newsletter/subscriber/list_mailplatform.phtml CHANGED
@@ -1,35 +1,35 @@
1
- <div class="content-header">
2
- <table cellspacing="0">
3
- <tr>
4
- <td style="width: 50%;"><h3><?php echo $this->__('Newsletter Subscribers') ?></h3></td>
5
- <td align="right">
6
- <button type="button" class="scalable"
7
- onclick="window.location='<?php echo $this->getMailplatformSyn() ?>'"
8
- style="">
9
- <span>Mailplatform Batch Synchronization</span>
10
- </button>
11
- </td>
12
- </tr>
13
- </table>
14
- </div>
15
- <div>
16
- <b>Batch Sync is intended for <300 subscribers. Is your database is
17
- larger please export it in Magento and import in MailPlatform. Contact
18
- support@mailplatform.dk for further help.<br />&nbsp;
19
- </b>
20
- </div>
21
- <div>
22
- <?php echo $this->getChildHtml('grid')?>
23
- </div>
24
- <?php if(count($this->getQueueAsOptions()) > 0 && $this->getShowQueueAdd()): ?>
25
- <div class="form-buttons">
26
- <select id="queueList" name="queue">
27
- <?php foreach ($this->getQueueAsOptions() as $_queue): ?>
28
- <option value="<?php echo $_queue['value'] ?>"><?php echo $_queue['label'] ?> #<?php echo $_queue['value'] ?></option>
29
- <?php endforeach; ?>
30
- </select>
31
- <button class="scalable" onclick="subscriberController.addToQueue();">
32
- <span><?php echo $this->__('Add to Queue'); ?></span>
33
- </button>
34
- </div>
35
  <?php endif ?>
1
+ <div class="content-header">
2
+ <table cellspacing="0">
3
+ <tr>
4
+ <td style="width: 50%;"><h3><?php echo $this->__('Newsletter Subscribers') ?></h3></td>
5
+ <td align="right">
6
+ <button type="button" class="scalable"
7
+ onclick="window.location='<?php echo $this->getMailplatformSyn() ?>'"
8
+ style="">
9
+ <span>Mailplatform Batch Synchronization</span>
10
+ </button>
11
+ </td>
12
+ </tr>
13
+ </table>
14
+ </div>
15
+ <div>
16
+ <b>Batch Sync is intended for <300 subscribers. Is your database is
17
+ larger please export it in Magento and import in MailPlatform. Contact
18
+ support@mailplatform.dk for further help.<br />&nbsp;
19
+ </b>
20
+ </div>
21
+ <div>
22
+ <?php echo $this->getChildHtml('grid')?>
23
+ </div>
24
+ <?php if(count($this->getQueueAsOptions()) > 0 && $this->getShowQueueAdd()): ?>
25
+ <div class="form-buttons">
26
+ <select id="queueList" name="queue">
27
+ <?php foreach ($this->getQueueAsOptions() as $_queue): ?>
28
+ <option value="<?php echo $_queue['value'] ?>"><?php echo $_queue['label'] ?> #<?php echo $_queue['value'] ?></option>
29
+ <?php endforeach; ?>
30
+ </select>
31
+ <button class="scalable" onclick="subscriberController.addToQueue();">
32
+ <span><?php echo $this->__('Add to Queue'); ?></span>
33
+ </button>
34
+ </div>
35
  <?php endif ?>
app/design/frontend/base/default/layout/mailplatform.xml CHANGED
@@ -1,8 +1,8 @@
1
- <?xml version="1.0"?>
2
- <layout version="0.1.0">
3
- <checkout_onepage_review>
4
- <reference name="checkout.onepage.review.info.items.after">
5
- <block type="core/template" name="is_subscribed" template="mailplatform/checkout/subscribe.phtml" />
6
- </reference>
7
- </checkout_onepage_review>
8
  </layout>
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <checkout_onepage_review>
4
+ <reference name="checkout.onepage.review.info.items.after">
5
+ <block type="core/template" name="is_subscribed" template="mailplatform/checkout/subscribe.phtml" />
6
+ </reference>
7
+ </checkout_onepage_review>
8
  </layout>
app/design/frontend/base/default/template/mailplatform/checkout/subscribe.phtml CHANGED
@@ -1,14 +1,14 @@
1
- <?php if (Mage::helper('mailplatform')->isEnabled()): ?>
2
- <input id="frontend-is-subscribe" type="checkbox" name="is_subscribed" title="<?php echo $this->__('Subscribe to newsletter') ?>" checked="checked" />
3
- <label for="is_subscribed"><?php echo $this->__('Subscribe to newsletter') ?></label>
4
- <script type="text/javascript">
5
- if (! jQuery('#co-payment-form').find('input[name="is_subscribed"]').length) {
6
- jQuery('#co-payment-form').append('<input name="is_subscribed" type="hidden" value="1">');
7
- }
8
-
9
- jQuery('#frontend-is-subscribe').on('change', function() {
10
- var val = jQuery(this).prop('checked') ? 1 : 0;
11
- jQuery('#co-payment-form').find('input[name="is_subscribed"]').val(val);
12
- });
13
- </script>
14
  <?php endif ?>
1
+ <?php if (Mage::helper('mailplatform')->isEnabled()): ?>
2
+ <input id="frontend-is-subscribe" type="checkbox" name="is_subscribed" title="<?php echo $this->__('Subscribe to newsletter') ?>" checked="checked" />
3
+ <label for="is_subscribed"><?php echo $this->__('Subscribe to newsletter') ?></label>
4
+ <script type="text/javascript">
5
+ if (! jQuery('#co-payment-form').find('input[name="is_subscribed"]').length) {
6
+ jQuery('#co-payment-form').append('<input name="is_subscribed" type="hidden" value="1">');
7
+ }
8
+
9
+ jQuery('#frontend-is-subscribe').on('change', function() {
10
+ var val = jQuery(this).prop('checked') ? 1 : 0;
11
+ jQuery('#co-payment-form').find('input[name="is_subscribed"]').val(val);
12
+ });
13
+ </script>
14
  <?php endif ?>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>mailplatformconnector</name>
4
- <version>2.0.1.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
@@ -27,9 +27,9 @@ Alternated code by Magento standards&#xD;
27
  Corrected English grammar&#xD;
28
  Tested on Magento CE 1.7, 1.8 and 1.9</notes>
29
  <authors><author><name>ADEO WEB</name><user>adeoweb</user><email>info@adeoweb.biz</email></author></authors>
30
- <date>2015-11-12</date>
31
- <time>10:49:20</time>
32
- <contents><target name="magecommunity"><dir name="Mp"><dir name="Mailplatformconnector"><dir name="Block"><dir name="Adminhtml"><dir name="Newsletter"><file name="Subscriber.php" hash="9901b2d57542e349752d4f632bea7170"/></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Button"><file name="Synccategories.php" hash="108b23568036ae66d5d7a53372d39765"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="9f8bf084d0a69e99313bbfa6284949d2"/></dir><dir name="Model"><file name="Cron.php" hash="f46bfcad0e097dae62d8e699b4775b4f"/><file name="Customfields.php" hash="2a0f3492c3ae037707e279ddaa2bd995"/><file name="Emailtype.php" hash="27b95214db75122aa1f6556ae88327cd"/><file name="Listids.php" hash="33936c75d680ce565b005c9e6799a4f8"/><file name="Lists.php" hash="51b49db45a11d140625224c313b62a1d"/><dir name="Newsletter"><file name="Subscriber.php" hash="dd98f7df8a47d4ecfa1f6ed544fdca09"/></dir><file name="Observer.php" hash="141cbd3b7f709b45b2372f3d60e5c71d"/><file name="Request.php" hash="110eebef447266083128b42e3d70eda1"/><file name="Subscribers.php" hash="0eada0a124fa45297f95b36913dcdb8a"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="MailplatformController.php" hash="c94c5a6b2eea1772f7689036c5a6a3f3"/></dir></dir><dir name="etc"><file name="config.xml" hash="5a5083375865ce5d5ebf0659f13a1d8c"/><file name="system.xml" hash="540080ea0e3cef7a1d4678c20b05e535"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="mailplatform"><dir name="system"><dir name="config"><file name="button.phtml" hash="319d6ec55fc8a3cdf595aacfc42cfa8c"/></dir></dir></dir><dir name="newsletter"><dir name="subscriber"><file name="list_mailplatform.phtml" hash="9360f96d57fb8c9d2ade7b2cd564f5d7"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="mailplatform.xml" hash="7c7bb306998b8773091791b2c9650e8c"/></dir><dir name="template"><dir name="mailplatform"><dir name="checkout"><file name="subscribe.phtml" hash="01b1aaf72784ab6d1bf36d748e13bec2"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Mp_Mailplatformconnector.xml" hash="14ea619d56358be2ca54d99ca0d6bf6e"/></dir></target></contents>
33
  <compatible/>
34
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
35
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>mailplatformconnector</name>
4
+ <version>2.0.1.4</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
27
  Corrected English grammar&#xD;
28
  Tested on Magento CE 1.7, 1.8 and 1.9</notes>
29
  <authors><author><name>ADEO WEB</name><user>adeoweb</user><email>info@adeoweb.biz</email></author></authors>
30
+ <date>2016-01-11</date>
31
+ <time>16:07:44</time>
32
+ <contents><target name="magecommunity"><dir name="Mp"><dir name="Mailplatformconnector"><dir name="Block"><dir name="Adminhtml"><dir name="Newsletter"><file name="Subscriber.php" hash="9901b2d57542e349752d4f632bea7170"/></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Button"><file name="Synccategories.php" hash="108b23568036ae66d5d7a53372d39765"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="460bd421f2d1cae46d836f7476c6d1bd"/></dir><dir name="Model"><file name="Cron.php" hash="1d732e1658c12f3319512318740f0f1a"/><file name="Customfields.php" hash="2a0f3492c3ae037707e279ddaa2bd995"/><file name="Emailtype.php" hash="27b95214db75122aa1f6556ae88327cd"/><file name="Listids.php" hash="33936c75d680ce565b005c9e6799a4f8"/><file name="Lists.php" hash="51b49db45a11d140625224c313b62a1d"/><dir name="Newsletter"><file name="Subscriber.php" hash="dd98f7df8a47d4ecfa1f6ed544fdca09"/></dir><file name="Observer.php" hash="2b8f748a82f7d214b6b8185b0e07ed50"/><file name="Request.php" hash="110eebef447266083128b42e3d70eda1"/><file name="Subscribers.php" hash="f4448ae3f4abaa78e312c3de10716790"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="MailplatformController.php" hash="c94c5a6b2eea1772f7689036c5a6a3f3"/></dir></dir><dir name="etc"><file name="config.xml" hash="17b762a76865d39393865ec3ea22dc9d"/><file name="system.xml" hash="d63afb1f6985b997681db56e2f80cda1"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="mailplatform"><dir name="system"><dir name="config"><file name="button.phtml" hash="40ab0b3d92804a2615bf37c49acccc7f"/></dir></dir></dir><dir name="newsletter"><dir name="subscriber"><file name="list_mailplatform.phtml" hash="9bffb3df04915841e4d5a1e944d45e92"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="mailplatform.xml" hash="1df8de008ac6f160b07608bfc0c2a7ef"/></dir><dir name="template"><dir name="mailplatform"><dir name="checkout"><file name="subscribe.phtml" hash="9684b12953688eea04d76e9ea2ed3e43"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Mp_Mailplatformconnector.xml" hash="14ea619d56358be2ca54d99ca0d6bf6e"/></dir></target></contents>
33
  <compatible/>
34
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
35
  </package>