Locaweb_Email_Marketing - Version 1.0.1

Version Notes

Export customer for the Magento Email Marketing Powerball.

Download this release

Release Info

Developer Locaweb
Extension Locaweb_Email_Marketing
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

app/code/local/Locaweb/EmailMarketing/Block/EmailMarketing.php ADDED
File without changes
app/code/local/Locaweb/EmailMarketing/Helper/Data.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Locaweb_EmailMarketing_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+
6
+ }
7
+
8
+
app/code/local/Locaweb/EmailMarketing/controllers/Adminhtml/EmailMarketingController.php ADDED
@@ -0,0 +1,361 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Locaweb_EmailMarketing_Adminhtml_EmailMarketingController extends Mage_Adminhtml_Controller_Action
4
+ {
5
+
6
+ const USP = '/';
7
+ private $_url = "https://emailmarketing.locaweb.com.br/api/v1";
8
+ private $_apiKey;
9
+ private $_command;
10
+ private $_subCommand;
11
+ private $_params;
12
+ private $_data;
13
+
14
+ public function indexAction()
15
+ {
16
+ $this->loadLayout();
17
+
18
+ if (Mage::getStoreConfig('Locaweb/EmailMarketing/id_da_conta') == ''){
19
+ $block = $this->getLayout()
20
+ ->createBlock('adminhtml/template', 'locaweb-block')
21
+ ->setTemplate('EmailMarketing/EmailMarketing.phtml');
22
+ }else{
23
+
24
+ $this->_command = 'accounts/'.Mage::getStoreConfig('Locaweb/EmailMarketing/id_da_conta');
25
+ $this->_subCommand = 'lists';
26
+ $this->_apiKey = Mage::getStoreConfig('Locaweb/EmailMarketing/chave_de_acesso');
27
+ $dadosListas = $this->call();
28
+
29
+ $block = $this->getLayout()
30
+ ->createBlock('adminhtml/template', 'locaweb-block')
31
+ ->setTemplate('EmailMarketing/EmailMarketingContaVerificada.phtml');
32
+
33
+ if (Mage::getStoreConfig('Locaweb/EmailMarketing/id_exportacao_4') != ''){
34
+ $this->_command = 'accounts/'.Mage::getStoreConfig('Locaweb/EmailMarketing/id_da_conta');
35
+ $this->_subCommand = 'contact_imports/'.Mage::getStoreConfig('Locaweb/EmailMarketing/id_exportacao_4');
36
+ $this->_apiKey = Mage::getStoreConfig('Locaweb/EmailMarketing/chave_de_acesso');
37
+ $dadosExportacoes = $this->call();
38
+
39
+ $this->_command = 'accounts/'.Mage::getStoreConfig('Locaweb/EmailMarketing/id_da_conta');
40
+ $this->_subCommand = 'lists/'.Mage::getStoreConfig('Locaweb/EmailMarketing/id_lista_exportacao_4');
41
+ $this->_apiKey = Mage::getStoreConfig('Locaweb/EmailMarketing/chave_de_acesso');
42
+ $listaExportacao = $this->call();
43
+
44
+ if (isset($dadosExportacoes['id']) && isset($listaExportacao)){
45
+ $dadosExportacao4 = array('data' => $dadosExportacoes['created_at'], 'quantidade' => $dadosExportacoes['total_lines'], 'nome_lista' => $listaExportacao['name'], 'status' => $dadosExportacoes['status']);
46
+ $block->assign('dadosExportacao4', $dadosExportacao4);
47
+ }
48
+ }
49
+ if (Mage::getStoreConfig('Locaweb/EmailMarketing/id_exportacao_3') != ''){
50
+ $this->_command = 'accounts/'.Mage::getStoreConfig('Locaweb/EmailMarketing/id_da_conta');
51
+ $this->_subCommand = 'contact_imports/'.Mage::getStoreConfig('Locaweb/EmailMarketing/id_exportacao_3');
52
+ $this->_apiKey = Mage::getStoreConfig('Locaweb/EmailMarketing/chave_de_acesso');
53
+ $dadosExportacoes = $this->call();
54
+
55
+ $this->_command = 'accounts/'.Mage::getStoreConfig('Locaweb/EmailMarketing/id_da_conta');
56
+ $this->_subCommand = 'lists/'.Mage::getStoreConfig('Locaweb/EmailMarketing/id_lista_exportacao_3');
57
+ $this->_apiKey = Mage::getStoreConfig('Locaweb/EmailMarketing/chave_de_acesso');
58
+ $listaExportacao = $this->call();
59
+
60
+ if (isset($dadosExportacoes['id']) && isset($listaExportacao)){
61
+ $dadosExportacao3 = array('data' => $dadosExportacoes['created_at'], 'quantidade' => $dadosExportacoes['total_lines'], 'nome_lista' => $listaExportacao['name'], 'status' => $dadosExportacoes['status']);
62
+ $block->assign('dadosExportacao3', $dadosExportacao3);
63
+ }
64
+ }
65
+ if (Mage::getStoreConfig('Locaweb/EmailMarketing/id_exportacao_2') != ''){
66
+ $this->_command = 'accounts/'.Mage::getStoreConfig('Locaweb/EmailMarketing/id_da_conta');
67
+ $this->_subCommand = 'contact_imports/'.Mage::getStoreConfig('Locaweb/EmailMarketing/id_exportacao_2');
68
+ $this->_apiKey = Mage::getStoreConfig('Locaweb/EmailMarketing/chave_de_acesso');
69
+ $dadosExportacoes = $this->call();
70
+
71
+ $this->_command = 'accounts/'.Mage::getStoreConfig('Locaweb/EmailMarketing/id_da_conta');
72
+ $this->_subCommand = 'lists/'.Mage::getStoreConfig('Locaweb/EmailMarketing/id_lista_exportacao_2');
73
+ $this->_apiKey = Mage::getStoreConfig('Locaweb/EmailMarketing/chave_de_acesso');
74
+ $listaExportacao = $this->call();
75
+
76
+ if (isset($dadosExportacoes['id']) && isset($listaExportacao)){
77
+ $dadosExportacao2 = array('data' => $dadosExportacoes['created_at'], 'quantidade' => $dadosExportacoes['total_lines'], 'nome_lista' => $listaExportacao['name'], 'status' => $dadosExportacoes['status']);
78
+ $block->assign('dadosExportacao2', $dadosExportacao2);
79
+ }
80
+ }
81
+ if (Mage::getStoreConfig('Locaweb/EmailMarketing/id_exportacao_1') != ''){
82
+ $this->_command = 'accounts/'.Mage::getStoreConfig('Locaweb/EmailMarketing/id_da_conta');
83
+ $this->_subCommand = 'contact_imports/'.Mage::getStoreConfig('Locaweb/EmailMarketing/id_exportacao_1');
84
+ $this->_apiKey = Mage::getStoreConfig('Locaweb/EmailMarketing/chave_de_acesso');
85
+ $dadosExportacoes = $this->call();
86
+
87
+ $this->_command = 'accounts/'.Mage::getStoreConfig('Locaweb/EmailMarketing/id_da_conta');
88
+ $this->_subCommand = 'lists/'.Mage::getStoreConfig('Locaweb/EmailMarketing/id_lista_exportacao_1');
89
+ $this->_apiKey = Mage::getStoreConfig('Locaweb/EmailMarketing/chave_de_acesso');
90
+ $listaExportacao = $this->call();
91
+
92
+ if (isset($dadosExportacoes['id']) && isset($listaExportacao)){
93
+ $dadosExportacao1 = array('data' => $dadosExportacoes['created_at'], 'quantidade' => $dadosExportacoes['total_lines'], 'nome_lista' => $listaExportacao['name'], 'status' => $dadosExportacoes['status']);
94
+ $block->assign('dadosExportacao1', $dadosExportacao1);
95
+ }
96
+ }
97
+
98
+ $block->assign('dadosListas', $dadosListas);
99
+ }
100
+
101
+ $this->_addContent($block);
102
+ $this->_setActiveMenu('Locaweb');
103
+
104
+ $this->renderLayout();
105
+ }
106
+
107
+ public function verificarContaAction()
108
+ {
109
+ $post = $this->getRequest()->getPost();
110
+ try {
111
+ if (empty($post)) {
112
+ Mage::throwException($this->__('Erro ao Buscar dados do Formulário.'));
113
+ }
114
+
115
+ Mage::log ('### [Locaweb] Id da Conta Postado:'. $post['EmailMarketing']['id_da_conta'] , null, 'EmailMarketing.log');
116
+ Mage::log ('### [Locaweb] Chave de Acesso Postado:'. $post['EmailMarketing']['chave_de_acesso'] , null, 'EmailMarketing.log');
117
+
118
+ $this->_command = 'accounts';
119
+ $this->_subCommand = $post['EmailMarketing']['id_da_conta'];
120
+ $this->_apiKey = $post['EmailMarketing']['chave_de_acesso'];
121
+ $retornoCall = $this->call();
122
+
123
+ Mage::log ('### [Locaweb] Retorno Call: '. $retornoCall['display_name'] , null, 'EmailMarketing.log');
124
+
125
+ if (isset($retornoCall['display_name'])){
126
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_da_conta', $post['EmailMarketing']['id_da_conta']);
127
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/chave_de_acesso', $post['EmailMarketing']['chave_de_acesso']);
128
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/nome_da_conta', $retornoCall['display_name']);
129
+
130
+ $message = $this->__('Conta verificada com sucesso!');
131
+ Mage::getSingleton('adminhtml/session')->addSuccess($message);
132
+ }
133
+
134
+ } catch (Exception $e) {
135
+ Mage::log ('### [Locaweb] Erro ao processar verificacao de conta' . $e->getMessage(), null, 'EmailMarketing.log');
136
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
137
+ }
138
+ $this->_redirect('*/*');
139
+ }
140
+
141
+ public function exportarClientesAction()
142
+ {
143
+ $post = $this->getRequest()->getPost();
144
+
145
+ try {
146
+ if (empty($post)) {
147
+ Mage::throwException($this->__('Erro ao Buscar dados do Formulário.'));
148
+ }
149
+
150
+ Mage::log ('### [Locaweb] Id da Lista de Postagem:'. $post['EmailMarketing']['id_lista_exportar'] , null, 'EmailMarketing.log');
151
+
152
+ $listaClientes = Mage::getModel('customer/customer')
153
+ ->getCollection()
154
+ ->addAttributeToSelect('*');
155
+
156
+ $listContatos = '{"list" : {"contacts" : [';
157
+
158
+ foreach ($listaClientes as $cliente) {
159
+ Mage::log ('### [Locaweb] Nome cliente:'. $cliente['firstname'] , null, 'EmailMarketing.log');
160
+ Mage::log ('### [Locaweb] Email cliente:'. $cliente['email'] , null, 'EmailMarketing.log');
161
+
162
+ $listContatos = $listContatos. '{"email": "' . $cliente['email'] . '", "name": "' . $cliente['firstname'] . '"},';
163
+ }
164
+ $listContatos = substr_replace($listContatos ,"",-1);
165
+ $listContatos = $listContatos . '],"overwriteattributes" : true}}';
166
+
167
+ Mage::log ('### [Locaweb] Lista Parametro:'. $listContatos , null, 'EmailMarketing.log');
168
+
169
+ $this->_command = 'accounts/'.Mage::getStoreConfig('Locaweb/EmailMarketing/id_da_conta');
170
+ $this->_subCommand = 'lists/'.$post['EmailMarketing']['id_lista_exportar'].'/import';
171
+ $this->_apiKey = Mage::getStoreConfig('Locaweb/EmailMarketing/chave_de_acesso');
172
+ $this->_data = $listContatos;
173
+ $retornoExportacao = $this->call();
174
+
175
+ if (isset($retornoExportacao['id'])){
176
+ Mage::log ('### [Locaweb] Retorno Exportacao:'. $retornoExportacao['id'] , null, 'EmailMarketing.log');
177
+
178
+ if (Mage::getStoreConfig('Locaweb/EmailMarketing/id_exportacao_1') == ""){
179
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_exportacao_1', $retornoExportacao['id']);
180
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_lista_exportacao_1', $post['EmailMarketing']['id_lista_exportar']);
181
+ }else if (Mage::getStoreConfig('Locaweb/EmailMarketing/id_exportacao_2') == ""){
182
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_exportacao_2', $retornoExportacao['id']);
183
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_lista_exportacao_2', $post['EmailMarketing']['id_lista_exportar']);
184
+ }else if (Mage::getStoreConfig('Locaweb/EmailMarketing/id_exportacao_3') == ""){
185
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_exportacao_3', $retornoExportacao['id']);
186
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_lista_exportacao_3', $post['EmailMarketing']['id_lista_exportar']);
187
+ }else if (Mage::getStoreConfig('Locaweb/EmailMarketing/id_exportacao_4') == ""){
188
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_exportacao_4', $retornoExportacao['id']);
189
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_lista_exportacao_4', $post['EmailMarketing']['id_lista_exportar']);
190
+ }else{
191
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_exportacao_1', Mage::getStoreConfig('Locaweb/EmailMarketing/id_exportacao_2'));
192
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_lista_exportacao_1', Mage::getStoreConfig('Locaweb/EmailMarketing/id_lista_exportacao_2'));
193
+
194
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_exportacao_2', Mage::getStoreConfig('Locaweb/EmailMarketing/id_exportacao_3'));
195
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_lista_exportacao_2', Mage::getStoreConfig('Locaweb/EmailMarketing/id_lista_exportacao_3'));
196
+
197
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_exportacao_3', Mage::getStoreConfig('Locaweb/EmailMarketing/id_exportacao_4'));
198
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_lista_exportacao_3', Mage::getStoreConfig('Locaweb/EmailMarketing/id_lista_exportacao_4'));
199
+
200
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_exportacao_4', $retornoExportacao['id']);
201
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_lista_exportacao_4', $post['EmailMarketing']['id_lista_exportar']);
202
+ }
203
+
204
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/lista_selecionada_padrao', $post['EmailMarketing']['id_lista_exportar']);
205
+
206
+ $message = $this->__('Clientes exportados com sucesso!');
207
+ Mage::getSingleton('adminhtml/session')->addSuccess($message);
208
+ }
209
+
210
+ } catch (Exception $e) {
211
+ Mage::log ('### [Locaweb] Erro ao exportar cliente' . $e->getMessage(), null, 'EmailMarketing.log');
212
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
213
+ }
214
+ $this->_redirect('*/*');
215
+ }
216
+
217
+ public function trocarUsuarioAction()
218
+ {
219
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_da_conta', '');
220
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/chave_de_acesso', '');
221
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/nome_da_conta', '');
222
+
223
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_exportacao_1', '');
224
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_lista_exportacao_1', '');
225
+
226
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_exportacao_2', '');
227
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_lista_exportacao_2', '');
228
+
229
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_exportacao_3', '');
230
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_lista_exportacao_3', '');
231
+
232
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_exportacao_4', '');
233
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/id_lista_exportacao_4', '');
234
+
235
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/lista_selecionada_padrao', '');
236
+
237
+ $this->_redirect('*/*');
238
+ }
239
+
240
+ public function criarListaContatosAction(){
241
+ $post = $this->getRequest()->getPost();
242
+ try {
243
+ if (empty($post)) {
244
+ Mage::throwException($this->__('Erro ao Buscar dados do Formulário.'));
245
+ }
246
+
247
+ Mage::log ('### [Locaweb] Nome da Lista:'. $post['EmailMarketing_CriarLista']['nome_da_lista'] , null, 'EmailMarketing.log');
248
+ Mage::log ('### [Locaweb] Descrição da Lista:'. $post['EmailMarketing_CriarLista']['descricao_da_lista'] , null, 'EmailMarketing.log');
249
+
250
+ $this->_command = 'accounts/'.Mage::getStoreConfig('Locaweb/EmailMarketing/id_da_conta');
251
+ $this->_subCommand = 'lists/';
252
+ $this->_apiKey = Mage::getStoreConfig('Locaweb/EmailMarketing/chave_de_acesso');
253
+ $listCriarLista = '{"list" : {"name" : "'.$post['EmailMarketing_CriarLista']['nome_da_lista'].'","description" : "'.$post['EmailMarketing_CriarLista']['descricao_da_lista'].'"}}';
254
+ $this->_data = $listCriarLista;
255
+ $retornoCall = $this->call();
256
+
257
+ if (isset($retornoCall['id'])){
258
+ Mage::getModel('core/config')->saveConfig('Locaweb/EmailMarketing/lista_selecionada_padrao', $retornoCall['id']);
259
+ $message = $this->__('Lista criada com sucesso!');
260
+ Mage::getSingleton('adminhtml/session')->addSuccess($message);
261
+ }
262
+
263
+ } catch (Exception $e) {
264
+ Mage::log ('### [Locaweb] Erro ao processar criacao de lista' . $e->getMessage(), null, 'EmailMarketing.log');
265
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
266
+ }
267
+ $this->_redirect('*/*');
268
+ }
269
+
270
+ //Funções de Comunicação Rest
271
+ private function getUrlRest()
272
+ {
273
+ $url = $this->_url . self::USP . $this->_command . self::USP . $this->_subCommand;
274
+ if (count($this->_params)) {
275
+ foreach ($this->_params as $key=> $value) {
276
+ $url = $url . self::USP . $key . self::USP . $value;
277
+ }
278
+ }
279
+ return $url;
280
+ }
281
+
282
+ private function call()
283
+ {
284
+ if ($curl = curl_init()) {
285
+ $result = false;
286
+ $header = array('Content-Type: application/json', 'X-Auth-Token: ' . $this->_apiKey);
287
+
288
+ curl_setopt($curl, CURLOPT_URL, $this->getUrlRest());
289
+ curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
290
+ curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
291
+ curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
292
+ curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
293
+ curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
294
+
295
+ if (isset($this->_data)){
296
+ curl_setopt($curl, CURLOPT_POST, 1);
297
+ curl_setopt($curl, CURLOPT_POSTFIELDS, $this->_data);
298
+ }
299
+
300
+ try {
301
+ $response = curl_exec($curl);
302
+ $result = $this->parseResult($response, $curl);
303
+ } catch (Exception $e) {
304
+ throw $e;
305
+ }
306
+
307
+ return $result;
308
+ }
309
+ return false;
310
+ }
311
+
312
+ private function parseResult($response, &$curl)
313
+ {
314
+ try {
315
+ $info = curl_getinfo($curl);
316
+ $code = $info['http_code'];
317
+
318
+ Mage::log ('### [Locaweb] Codigo de Retorno da Chamada: ' . $code, null, 'EmailMarketing.log');
319
+ Mage::log ('### [Locaweb] URL de Retorno da Chamada: ' . $info['url'], null, 'EmailMarketing.log');
320
+
321
+ switch ($code) {
322
+ case 400:
323
+ Mage::getSingleton('adminhtml/session')->addError('Não foi possível processar a solicitação. Tente novamente.');
324
+ break;
325
+ case 401:
326
+ Mage::getSingleton('adminhtml/session')->addError('Id da Conta ou Chave de Acesso inválidos. Verifique os dados e tente novamente.');
327
+ break;
328
+ case 403:
329
+ Mage::getSingleton('adminhtml/session')->addError('Não foi autorizado o seu acesso na ferramenta Email Marketing Locaweb. Verifique os dados de acesso e tente novamente.');
330
+ break;
331
+ case 404:
332
+ Mage::getSingleton('adminhtml/session')->addError('Servidor indisponível. Tente novamente.');
333
+ break;
334
+ case 409:
335
+ Mage::getSingleton('adminhtml/session')->addError('Ocorreu um conflito no servidor. Tente novamente.');
336
+ break;
337
+ case 409:
338
+ Mage::getSingleton('adminhtml/session')->addError('Tamanho do corpo da requisição é maior que o esperado. Tente novamente.');
339
+ break;
340
+ case 500:
341
+ Mage::getSingleton('adminhtml/session')->addError('Erro interno no servidor. Aguarde alguns instantes e tente novamente.');
342
+ break;
343
+ case 504:
344
+ Mage::getSingleton('adminhtml/session')->addError('Servidor indisponível no momento. Por favor, tente novamente mais tarde.');
345
+ break;
346
+ }
347
+
348
+ $data = Mage::helper('core')->jsonDecode($response);
349
+ if (isset($data['ErrorCode'])) {
350
+ throw new Exception($data['Message'], $data['ErrorCode']);
351
+ }
352
+
353
+ return $data;
354
+ } catch (Exception $e) {
355
+ $this->_errorCode = $e->getCode();
356
+ $this->_errorMessage = $e->getMessage();
357
+ }
358
+ curl_close($curl);
359
+ return false;
360
+ }
361
+ }
app/code/local/Locaweb/EmailMarketing/etc/config.xml ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!--
3
+ /**
4
+ * Locaweb
5
+ *
6
+ * @category Locaweb
7
+ * @package Locaweb_EmailMarketing
8
+ * @copyright Copyright (c) 2013 Locaweb (http://www.locaweb.com.br)
9
+ */
10
+ -->
11
+ <config>
12
+ <modules>
13
+ <Locaweb_EmailMarketing>
14
+ <version>1.0.0</version>
15
+ </Locaweb_EmailMarketing>
16
+ </modules>
17
+ <global>
18
+ <models>
19
+ <EmailMarketing>
20
+ <class>Locaweb_EmailMarketing_Model</class>
21
+ <resourceModel>EmailMarketing_mysql4</resourceModel>
22
+ </EmailMarketing>
23
+
24
+ <EmailMarketing_mysql4>
25
+ <class>Locaweb_EmailMarketing_Model_Mysql4</class>
26
+ </EmailMarketing_mysql4>
27
+ </models>
28
+ <blocks>
29
+ <EmailMarketing>
30
+ <class>Locaweb_EmailMarketing_Block</class>
31
+ </EmailMarketing>
32
+ </blocks>
33
+
34
+ <helpers>
35
+ <EmailMarketing>
36
+ <class>Locaweb_EmailMarketing_Helper</class>
37
+ </EmailMarketing>
38
+ </helpers>
39
+
40
+ <resources>
41
+ <EmailMarketing_write>
42
+ <connection>
43
+ <use>core_write</use>
44
+ </connection>
45
+ </EmailMarketing_write>
46
+ <EmailMarketing_read>
47
+ <connection>
48
+ <use>core_read</use>
49
+ </connection>
50
+ </EmailMarketing_read>
51
+ </resources>
52
+
53
+ <Locaweb>
54
+ <groups>
55
+ <Locaweb_group>
56
+ <EmailMarketing>Locaweb - Email Marketing</EmailMarketing>
57
+ </Locaweb_group>
58
+ </groups>
59
+ </Locaweb>
60
+ </global>
61
+
62
+ <admin>
63
+ <routers>
64
+ <EmailMarketing>
65
+ <use>admin</use>
66
+ <args>
67
+ <module>Locaweb_EmailMarketing</module>
68
+ <frontName>Locaweb</frontName>
69
+ </args>
70
+ </EmailMarketing>
71
+ </routers>
72
+ </admin>
73
+
74
+ <adminhtml>
75
+ <translate>
76
+ <modules>
77
+ <Locaweb_adminhtml>
78
+ <files>
79
+ <EmailMarketing>Locaweb_EmailMarketing.csv</EmailMarketing>
80
+ </files>
81
+ </Locaweb_adminhtml>
82
+ </modules>
83
+ </translate>
84
+
85
+ <menu>
86
+ <Locaweb>
87
+ <title>Locaweb</title>
88
+ <sort_order>1000</sort_order>
89
+ <children>
90
+ <Locaweb_adminform translate="title" module="EmailMarketing">
91
+ <title>Email Marketing</title>
92
+ <sort_order>1</sort_order>
93
+ <action>EmailMarketing/adminhtml_EmailMarketing</action>
94
+ </Locaweb_adminform>
95
+ </children>
96
+ </Locaweb>
97
+ </menu>
98
+
99
+ <acl>
100
+ <resources>
101
+ <admin>
102
+ <children>
103
+ <catalog>
104
+ <children>
105
+ <Locaweb_adminform>
106
+ <title>Locaweb - EmailMarketing</title>
107
+ </Locaweb_adminform>
108
+ </children>
109
+ </catalog>
110
+ </children>
111
+ </admin>
112
+ </resources>
113
+ </acl>
114
+
115
+ <layout>
116
+ <updates>
117
+ <sintax>
118
+ <file>EmailMarketing.xml</file>
119
+ </sintax>
120
+ </updates>
121
+ </layout>
122
+ </adminhtml>
123
+ </config>
124
+
app/design/adminhtml/default/default/layout/EmailMarketing.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout>
3
+ <EmailMarketing_adminhtml_EmailMarketing_index>
4
+ <update handle="EmailMarketing_EmailMarketing_index"/>
5
+ <reference name="content">
6
+ <block type="adminhtml/template" name="EmailMarketing" template="EmailMarketing/EmailMarketing.phtml"/>
7
+ </reference>
8
+ </EmailMarketing_adminhtml_EmailMarketing_index>
9
+ </layout>
app/design/adminhtml/default/default/template/EmailMarketing/EmailMarketing.phtml ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="content-header">
2
+ <table cellspacing="0" class="grid-header">
3
+ <tr>
4
+ <td><h3><?php echo $this->__('Email Marketing Locaweb')?></h3></td>
5
+ </tr>
6
+ </table>
7
+ </div>
8
+
9
+ <ul class="messages">
10
+ <li class="notice-msg">
11
+ <ul>
12
+ <li>Ainda não é cliente? <a href="http://www.locaweb.com.br/produtos/email-marketing/planos.html" target="_blank">Conheça a ferramenta e contrate!</a></li>
13
+ </ul>
14
+ </li>
15
+ <li class="notice-msg">
16
+ <ul>
17
+ <li>Siga os passos abaixo para configurar:</li>
18
+ <li>1) Acesse o <a href="https://emailmarketing.locaweb.com.br" target="_blank">painel da ferramenta.</a></li>
19
+ <li>2) No menu "Configurações", selecione o item "Chave de acesso para API".</li>
20
+ <li>3) Copie e cole as informações "ID da conta" e "Chave de acesso" nos campos abaixo.</li>
21
+ <li>4) Selecione "Verificar".</li>
22
+ </ul>
23
+ </li>
24
+ </ul>
25
+
26
+ <div class="entry-edit">
27
+ <div class="entry-edit-head">
28
+ <h4 class="icon-head head-edit-form fieldset-legend">Dados da Conta</h4>
29
+ </div>
30
+ <div class="fieldset fieldset-wide" id="group_fields8">
31
+ <div class="hor-scroll">
32
+ <form id="edit_form" name="edit_form" method="post" action="<?php echo $this->getUrl('*/*/verificarConta')?>">
33
+ <colgroup class="label"></colgroup>
34
+ <colgroup class="input-ele"></colgroup>
35
+
36
+ <input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
37
+ <table cellspacing="0" class="form-list">
38
+ <tr>
39
+ <td class="label"><?php echo $this->__('Id da conta')?> <span class="required">*</span></td>
40
+ <td class="input-ele"><input class="input-text required-entry" name="EmailMarketing[id_da_conta]" /></td>
41
+ </tr>
42
+ <tr>
43
+ <td class="label"><?php echo $this->__('Chave de acesso')?> <span class="required">*</span></td>
44
+ <td class="input-ele"><input class="input-text required-entry" name="EmailMarketing[chave_de_acesso]" /></td>
45
+ </tr>
46
+ </table>
47
+ </form>
48
+ <table cellspacing="0" class="form-list">
49
+ <tr>
50
+ <td class="label"></td>
51
+ <td class="input-ele"><button onclick="editForm.submit()" class="scalable save" type="button"><span>Verificar</span></button></td>
52
+ </tr>
53
+ </table>
54
+ </div>
55
+ </div>
56
+ </div>
57
+
58
+ <script type="text/javascript">
59
+ var editForm = new varienForm('edit_form');
60
+ </script>
app/design/adminhtml/default/default/template/EmailMarketing/EmailMarketingContaVerificada.phtml ADDED
@@ -0,0 +1,236 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="content-header">
2
+ <table cellspacing="0" class="grid-header">
3
+ <tr>
4
+ <td><h3><?php echo $this->__('Email Marketing Locaweb')?></h3></td>
5
+ </tr>
6
+ </table>
7
+ </div>
8
+
9
+ <style>
10
+ #AdicionarListaPop{z-index:10;background-color:#fff;display:none;position:absolute;top:50%;left:30%;margin-left:-50px;margin-top:-100px;padding:10px;width:500px;height:162px;border:1px solid #d0d0d0}
11
+ </style>
12
+
13
+ <div id="AdicionarListaPop">
14
+ <div class="entry-edit">
15
+ <div class="entry-edit-head">
16
+ <h4 class="icon-head head-edit-form fieldset-legend">Criar Lista de Contatos</h4>
17
+ </div>
18
+ <div class="fieldset" id="group_fields8">
19
+ <div class="hor-scroll">
20
+ <form id="criar_lista_contatos_form" name="criar_lista_contatos_form" method="post" action="<?php echo $this->getUrl('*/*/criarListaContatos')?>">
21
+ <input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
22
+ <table cellspacing="0" class="form-list">
23
+ <colgroup class="label"></colgroup>
24
+ <colgroup class="input-ele"></colgroup>
25
+ <tbody>
26
+ <tr>
27
+ <td class="label"><?php echo $this->__('Nome')?> <span class="required">*</span></td>
28
+ <td class="input-ele"><input class="input-text required-entry" name="EmailMarketing_CriarLista[nome_da_lista]" /></td>
29
+ </tr>
30
+ <tr>
31
+ <td class="label"><?php echo $this->__('Descrição')?></td>
32
+ <td class="input-ele"><input class="input-text" name="EmailMarketing_CriarLista[descricao_da_lista]" /></td>
33
+ </tr>
34
+ <tr>
35
+ <td class="label"></td>
36
+ <td class="label"></td>
37
+ </tr>
38
+ <tr>
39
+ <td class="label"></td>
40
+ <td class="label"></td>
41
+ </tr>
42
+ <tr>
43
+ <td class="label"></td>
44
+ <td class="label"></td>
45
+ </tr>
46
+ </tbody>
47
+ </table>
48
+ </form>
49
+ <table cellspacing="0" class="form-list">
50
+ <colgroup class="input-ele"></colgroup>
51
+ <colgroup class="input-ele"></colgroup>
52
+ <tbody>
53
+ <tr>
54
+ <td class="a-center input-ele"><button onclick="submitCriarLista()" class="scalable save" type="button"><span>Criar</span></button></td>
55
+ <td class="a-center input-ele"><button onclick="ocultarDialogCriarLista()" class="scalable back" type="button"><span>Cancelar</span></button></td>
56
+ </tr>
57
+ </tbody>
58
+ </table>
59
+ </div>
60
+ </div>
61
+ </div>
62
+ </div>
63
+
64
+ <div id="dadosLocawebEmailMarketing">
65
+ <div id="disableDadosLocawebEmailMarketing" style="display:none; position: absolute;top:0;left:0;width: 100%;height:100%;z-index: 2;opacity:0.4;filter: alpha(opacity =100);background-color: black;"></div>
66
+ <div class="entry-edit">
67
+ <div class="entry-edit-head">
68
+ <h4 class="icon-head head-edit-form fieldset-legend">Dados da Conta</h4>
69
+ </div>
70
+ <div class="fieldset" id="group_fields8">
71
+ <div class="hor-scroll">
72
+ <table cellspacing="0" class="form-list">
73
+ <colgroup class="label"></colgroup>
74
+ <colgroup class="label"></colgroup>
75
+ <tbody>
76
+ <tr>
77
+ <td class="label"><?php echo $this->__('Nome da Conta')?></td>
78
+ <td class="label"><h4 class="fieldset-legend"><?php echo Mage::getStoreConfig('Locaweb/EmailMarketing/nome_da_conta')?></h4></td>
79
+ </tr>
80
+ <tr>
81
+ <td class="label"></td>
82
+ <td class="label"><a href="https://emailmarketing.locaweb.com.br" target="_blank">Acessar o painel da ferramenta.</a></td>
83
+ </tr>
84
+ <tr>
85
+ <td class="label"><?php echo $this->__('Id da Conta')?></td>
86
+ <td class="label"><h4 class="fieldset-legend"><?php echo Mage::getStoreConfig('Locaweb/EmailMarketing/id_da_conta')?></h4></td>
87
+ </tr>
88
+ <tr>
89
+ <td class="label"></td>
90
+ <td class="label"><a href="#" onclick="trocarUsuario();">Verificar outra conta</a></td>
91
+ </tr>
92
+ </tbody>
93
+ </table>
94
+ </div>
95
+ </div>
96
+ </div>
97
+
98
+ <div class="entry-edit">
99
+ <div class="entry-edit-head">
100
+ <h4 class="icon-head head-edit-form fieldset-legend">Exporta&ccedil;&atilde;o de clientes</h4>
101
+ </div>
102
+ <div class="fieldset" id="group_fields8">
103
+ Selecione uma lista e exporte seus clientes para o Email Marketing.
104
+ <br />
105
+ <div class="hor-scroll">
106
+ <form id="edit_form" name="edit_form" method="post" action="<?php echo $this->getUrl('*/*/exportarClientes')?>">
107
+ <input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
108
+ <table cellspacing="0" class="form-list">
109
+ <colgroup class="label"></colgroup>
110
+ <colgroup class="label"></colgroup>
111
+ <tbody>
112
+ <tr>
113
+ <td class="label"></td>
114
+ <td class="label"></td>
115
+ </tr>
116
+ <tr>
117
+ <td class="label"><?php echo $this->__('Listas')?></td>
118
+ <td class="input-ele">
119
+ <select id="cmbListas" name="EmailMarketing[id_lista_exportar]" class="validate-select">
120
+ <option value="">Selecione uma lista...</option>
121
+ <?php foreach ($dadosListas['items'] as $lista) { ?>
122
+ <option value="<?php echo $lista['id'] ?>" <?php if (Mage::getStoreConfig('Locaweb/EmailMarketing/lista_selecionada_padrao') == $lista['id']){ echo "selected"; } ?>>
123
+ <?php echo $lista['name'] ?>
124
+ </option>
125
+ <?php } ?>
126
+ </select>
127
+ </td>
128
+ </tr>
129
+ <tr>
130
+ <td class="label"></td>
131
+ <td class="label"><a href="#" onclick="mostrarDialogCriarLista();">Criar lista</a></td>
132
+ </tr>
133
+ <tr>
134
+ <td class="label"></td>
135
+ <td class="input-ele" id="cellBtnExportarLocawebEmailMarketing"><button onclick="submitExport();" class="scalable save" type="button"><span>Exportar para o Email Marketing</span></button></td>
136
+ </tr>
137
+ </tbody>
138
+ </table>
139
+ </form>
140
+ </div>
141
+ <br />
142
+ Os dados existentes ser&atilde;o sobrescritos a cada exporta&ccedil;&atilde;o, mantendo sua base de clientes atualizada.
143
+ &Eacute; recomendado realizar a exporta&ccedil;&atilde;o ap&oacute;s novos cadastros, pois essa aç&atilde;o n&atilde;o &eacute; autom&aacute;tica.
144
+ </div>
145
+ </div>
146
+
147
+ <div class="entry-edit">
148
+ <div class="entry-edit-head"><h4>Últimas exportações</h4></div>
149
+ <fieldset class="np">
150
+ <div class="grid np">
151
+ <table cellspacing="0" style="border:0;" id="lastExportsLocawebEmailMarketing">
152
+ <thead>
153
+ <tr class="headings">
154
+ <th class="a-center no-link"><span class="nobr">Data e Hora</span></th>
155
+ <th class="a-center no-link"><span class="nobr">Quantidade de Clientes</span></th>
156
+ <th class="a-center no-link"><span class="nobr">Lista</span></th>
157
+ <th class="a-center no-link last"><span class="nobr">Status</span></th>
158
+ </tr>
159
+ </thead>
160
+ <tbody>
161
+ <?php if (isset($dadosExportacao4)) { ?>
162
+ <tr class="even pointer">
163
+ <td class="a-center"><?php echo $dadosExportacao4['data'] ?></td>
164
+ <td class="a-center"><?php echo $dadosExportacao4['quantidade'] ?></td>
165
+ <td class="a-center"><?php echo $dadosExportacao4['nome_lista'] ?></td>
166
+ <td class="a-center"><?php echo $dadosExportacao4['status'] ?></td>
167
+ </tr>
168
+ <?php } ?>
169
+ <?php if (isset($dadosExportacao3)) { ?>
170
+ <tr class="even pointer">
171
+ <td class="a-center"><?php echo $dadosExportacao3['data'] ?></td>
172
+ <td class="a-center"><?php echo $dadosExportacao3['quantidade'] ?></td>
173
+ <td class="a-center"><?php echo $dadosExportacao3['nome_lista'] ?></td>
174
+ <td class="a-center"><?php echo $dadosExportacao3['status'] ?></td>
175
+ </tr>
176
+ <?php } ?>
177
+ <?php if (isset($dadosExportacao2)) { ?>
178
+ <tr class="even pointer">
179
+ <td class="a-center"><?php echo $dadosExportacao2['data'] ?></td>
180
+ <td class="a-center"><?php echo $dadosExportacao2['quantidade'] ?></td>
181
+ <td class="a-center"><?php echo $dadosExportacao2['nome_lista'] ?></td>
182
+ <td class="a-center"><?php echo $dadosExportacao2['status'] ?></td>
183
+ </tr>
184
+ <?php } ?>
185
+ <?php if (isset($dadosExportacao1)) { ?>
186
+ <tr class="even pointer">
187
+ <td class="a-center"><?php echo $dadosExportacao1['data'] ?></td>
188
+ <td class="a-center"><?php echo $dadosExportacao1['quantidade'] ?></td>
189
+ <td class="a-center"><?php echo $dadosExportacao1['nome_lista'] ?></td>
190
+ <td class="a-center"><?php echo $dadosExportacao1['status'] ?></td>
191
+ </tr>
192
+ <?php } ?>
193
+ </tbody>
194
+ </table>
195
+ </div>
196
+ </fieldset>
197
+ </div>
198
+ </div>
199
+ <script type="text/javascript">
200
+
201
+ function submitExport(){
202
+ var editForm = new varienForm('edit_form');
203
+ if(editForm.validator && editForm.validator.validate()){
204
+ document.getElementById("cellBtnExportarLocawebEmailMarketing").innerHTML = '<h4 class="icon-head head-edit-form fieldset-legend">Aguarde! Exportando dados...</h4>';
205
+ editForm.submit();
206
+ }
207
+ }
208
+ function submitCriarLista(){
209
+ var criar_lista_contatos_form = new varienForm('criar_lista_contatos_form');
210
+ if(criar_lista_contatos_form.validator && criar_lista_contatos_form.validator.validate()){
211
+ criar_lista_contatos_form.submit();
212
+ }
213
+ }
214
+
215
+ function trocarUsuario(){
216
+ var resposta=confirm("Sua conta será desassociada do sistema");
217
+ if (resposta==true)
218
+ {
219
+ window.location="<?php echo $this->getUrl('*/*/trocarUsuario')?>";
220
+ }
221
+ }
222
+
223
+ function mostrarDialogCriarLista(){
224
+ document.getElementById('AdicionarListaPop').style.display='block';
225
+ document.getElementById('disableDadosLocawebEmailMarketing').style.display='block';
226
+ document.body.style.overflow= 'hidden';
227
+ }
228
+
229
+ function ocultarDialogCriarLista(){
230
+ document.getElementById('AdicionarListaPop').style.display='none';
231
+ document.getElementById('disableDadosLocawebEmailMarketing').style.display='none';
232
+ document.body.style.overflow= 'auto';
233
+ }
234
+
235
+
236
+ </script>
app/etc/modules/Locaweb_EmailMarketing.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Locaweb_EmailMarketing>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ </Locaweb_EmailMarketing>
8
+ </modules>
9
+ </config>
package.xml CHANGED
@@ -1,18 +1,22 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Locaweb_Email_Marketing</name>
4
- <version>1.0.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/GPL-3.0">GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>Este m&#xF3;dulo permite exportar os cadastros da sua loja virtual direto para uma lista do Email Marketing Locaweb</summary>
10
- <description>Com o m&#xF3;dulo de integra&#xE7;&#xE3;o do Email Marketing Locaweb voc&#xEA; poder&#xE1; fazer envios de e-mails para listas de contatos sincronizadas e atualizadas com os cadastros da sua loja virtual. Para isso basta criar a lista de destino dos contatos ou selecionar uma lista j&#xE1; criada na ferramenta, e fazer o processo de exporta&#xE7;&#xE3;o dos cadastros atrav&#xE9;s do Painel de Administra&#xE7;&#xE3;o do Magento toda vez que desejar atualizar os contatos.</description>
11
- <notes>Este m&#xF3;dulo permite exportar os cadastros da sua loja virtual direto para uma lista do Email Marketing Locaweb</notes>
 
 
 
 
12
  <authors><author><name>Locaweb</name><user>Locaweb</user><email>julio.gejer@locaweb.com.br</email></author></authors>
13
- <date>2013-10-16</date>
14
- <time>22:17:18</time>
15
- <contents></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Locaweb_Email_Marketing</name>
4
+ <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/GPL-3.0">GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>This module allows you to export records of your online store directly for a list of Email Marketing Locaweb.</summary>
10
+ <description>Email Marketing Locaweb&#xD;
11
+ &#xD;
12
+ With the integration module Email Marketing Locaweb you can make submissions and emails to contact lists synchronized and updated with the records of your online store. To do this simply create a target list of contacts or select from a list already created the tool, and make the process of exporting the records through the Magento Admin Panel every time you want to update your contacts.&#xD;
13
+ &#xD;
14
+ Com o m&#xF3;dulo de integra&#xE7;&#xE3;o do Email Marketing Locaweb voc&#xEA; poder&#xE1; fazer envios de e-mails para listas de contatos sincronizadas e atualizadas com os cadastros da sua loja virtual. Para isso basta criar a lista de destino dos contatos ou selecionar uma lista j&#xE1; criada na ferramenta, e fazer o processo de exporta&#xE7;&#xE3;o dos cadastros atrav&#xE9;s do Painel de Administra&#xE7;&#xE3;o do Magento toda vez que desejar atualizar os contatos.</description>
15
+ <notes>Export customer for the Magento Email Marketing Powerball.</notes>
16
  <authors><author><name>Locaweb</name><user>Locaweb</user><email>julio.gejer@locaweb.com.br</email></author></authors>
17
+ <date>2013-10-29</date>
18
+ <time>11:35:15</time>
19
+ <contents><target name="magelocal"><dir name="Locaweb"><dir name="EmailMarketing"><dir name="Block"><file name="EmailMarketing.php" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="Helper"><file name="Data.php" hash="da8bee4cff5c0c7228543963f4fcdd70"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="EmailMarketingController.php" hash="0e01986e1416998aa55998019b14a444"/></dir></dir><dir name="etc"><file name="config.xml" hash="27f1dc173faa6675d876eadbabbf1f66"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="EmailMarketing.xml" hash="3f709cf8fc958eccab7414c7af8f2c35"/></dir><dir name="template"><dir name="EmailMarketing"><file name="EmailMarketing.phtml" hash="f76382b0686b755c5ffd1d5cecf15dd9"/><file name="EmailMarketingContaVerificada.phtml" hash="b75ee42260dc51a427e4711f2b0c20bc"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Locaweb_EmailMarketing.xml" hash="ad9da39163661c6c8b25b01cc5a3acf2"/></dir></target></contents>
20
  <compatible/>
21
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
22
  </package>