Version Notes
First release of this connector for Mailify.
It allows you to synchronize all your shop data into Mailify
Download this release
Release Info
Developer | Sarbacane Software |
Extension | Sarbacane_Mailify |
Version | 1.0.0.0 |
Comparing to | |
See all releases |
Version 1.0.0.0
- app/code/community/Sarbacane/Mailify/Block/Adminhtml/Mailify.php +25 -0
- app/code/community/Sarbacane/Mailify/Helper/Data.php +176 -0
- app/code/community/Sarbacane/Mailify/controllers/Adminhtml/MailifyController.php +128 -0
- app/code/community/Sarbacane/Mailify/controllers/IndexController.php +361 -0
- app/code/community/Sarbacane/Mailify/etc/config.xml +148 -0
- app/code/community/Sarbacane/Mailify/sql/mailify_setup/mysql4-install-1.0.0.0.php +52 -0
- app/design/adminhtml/default/default/layout/mailify.xml +29 -0
- app/design/adminhtml/default/default/template/mailify/mailify.phtml +266 -0
- app/etc/modules/Sarbacane_Mailify.xml +30 -0
- app/locale/en_US/Sarbacane_Mailify.csv +58 -0
- app/locale/es_ES/Sarbacane_Mailify.csv +58 -0
- package.xml +70 -0
- skin/adminhtml/default/default/css/Sarbacane_Mailify/mailify.css +107 -0
- skin/adminhtml/default/default/images/sd.png +0 -0
- skin/adminhtml/default/default/js/Sarbacane_Mailify/mailify.js +95 -0
app/code/community/Sarbacane/Mailify/Block/Adminhtml/Mailify.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Sarbacane
|
16 |
+
* @package Sarbacane_Mailify
|
17 |
+
* @author Sarbacane Software <contact@sarbacane.com>
|
18 |
+
* @copyright 2015 Sarbacane Software
|
19 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
class Sarbacane_Mailify_Block_Adminhtml_Mailify extends Mage_Adminhtml_Block_Template
|
23 |
+
{
|
24 |
+
|
25 |
+
}
|
app/code/community/Sarbacane/Mailify/Helper/Data.php
ADDED
@@ -0,0 +1,176 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Sarbacane
|
16 |
+
* @package Sarbacane_Sarbacanedesktop
|
17 |
+
* @author Sarbacane Software <contact@sarbacane.com>
|
18 |
+
* @copyright 2015 Sarbacane Software
|
19 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
class Sarbacane_Mailify_Helper_Data extends Mage_Core_Helper_Abstract
|
23 |
+
{
|
24 |
+
|
25 |
+
public function getStoresArray()
|
26 |
+
{
|
27 |
+
$stores = Mage::app()->getStores();
|
28 |
+
$stores_array = array();
|
29 |
+
foreach ($stores as $store) {
|
30 |
+
$stores_array[] = array('store_id' => $store->store_id, 'store_name' => $store->name);
|
31 |
+
}
|
32 |
+
return $stores_array;
|
33 |
+
}
|
34 |
+
|
35 |
+
public function getStoreidFromList($list)
|
36 |
+
{
|
37 |
+
if (substr($list, -1) == 'N' || substr($list, -1) == 'C') {
|
38 |
+
return substr($list, 0, -1);
|
39 |
+
} else {
|
40 |
+
return substr($list, 0, -2);
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
public function getListTypeFromList($list)
|
45 |
+
{
|
46 |
+
if (substr($list, -1) == 'N' || substr($list, -1) == 'C') {
|
47 |
+
return substr($list, -1);
|
48 |
+
} else {
|
49 |
+
return substr($list, -2, 1);
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
public function getListTypeArray()
|
54 |
+
{
|
55 |
+
return array('N', 'C');
|
56 |
+
}
|
57 |
+
|
58 |
+
public function getListConfiguration($return = 'string')
|
59 |
+
{
|
60 |
+
$sd_list = $this->getConfiguration('sd_list');
|
61 |
+
if ($return == 'string') {
|
62 |
+
return $sd_list;
|
63 |
+
} else {
|
64 |
+
if (strlen($sd_list) != 0) {
|
65 |
+
return explode(',', $sd_list);
|
66 |
+
}
|
67 |
+
return array();
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
public function resetList($list_type, $store_id, $sd_id = '')
|
72 |
+
{
|
73 |
+
$resource = Mage::getSingleton('core/resource');
|
74 |
+
$db_write = $resource->getConnection('core_write');
|
75 |
+
$sarbacanedesktop = $resource->getTableName('sarbacanedesktop');
|
76 |
+
$rq_sql = '
|
77 |
+
DELETE FROM `' . $sarbacanedesktop . '`
|
78 |
+
WHERE `list_type` = ' . $db_write->quote($list_type) . '
|
79 |
+
AND `store_id` = ' . $db_write->quote($store_id);
|
80 |
+
if ($sd_id != '') {
|
81 |
+
$rq_sql .= '
|
82 |
+
AND `sd_id` = ' . $db_write->quote($sd_id);
|
83 |
+
}
|
84 |
+
$db_write->query($rq_sql);
|
85 |
+
}
|
86 |
+
|
87 |
+
public function getToken()
|
88 |
+
{
|
89 |
+
$str = $this->getConfiguration('sd_token');
|
90 |
+
$str = $str . substr(Mage::helper('core')->encrypt('SecurityTokenForModule'), 0, 11) . $str;
|
91 |
+
$str = md5($str);
|
92 |
+
return $str;
|
93 |
+
}
|
94 |
+
|
95 |
+
public function getConfiguration($return = 'nb_configured')
|
96 |
+
{
|
97 |
+
$resource = Mage::getSingleton('core/resource');
|
98 |
+
$db_read = $resource->getConnection('core_read');
|
99 |
+
$sarbacanedesktop_users = $resource->getTableName('sarbacanedesktop_users');
|
100 |
+
$rq_sql = '
|
101 |
+
SELECT *
|
102 |
+
FROM `' . $sarbacanedesktop_users . '`
|
103 |
+
WHERE `sd_type` = \'sd_token\'
|
104 |
+
OR `sd_type` = \'sd_list\'';
|
105 |
+
$rq = $db_read->query($rq_sql);
|
106 |
+
$sd_token = '';
|
107 |
+
$sd_list = '';
|
108 |
+
while ($r = $rq->fetch()) {
|
109 |
+
if ($r['sd_type'] == 'sd_token') {
|
110 |
+
$sd_token = $r['sd_value'];
|
111 |
+
}
|
112 |
+
else if ($r['sd_type'] == 'sd_list') {
|
113 |
+
$sd_list = $r['sd_value'];
|
114 |
+
}
|
115 |
+
}
|
116 |
+
if ($return == 'sd_token' || $return == 'sd_list') {
|
117 |
+
if ($return == 'sd_token') {
|
118 |
+
return $sd_token;
|
119 |
+
}
|
120 |
+
else if ($return == 'sd_list') {
|
121 |
+
return $sd_list;
|
122 |
+
}
|
123 |
+
} else {
|
124 |
+
if ($return == 'all') {
|
125 |
+
return array(
|
126 |
+
'sd_token' => $sd_token,
|
127 |
+
'sd_list' => $sd_list
|
128 |
+
);
|
129 |
+
} else {
|
130 |
+
$nb_configured = 0;
|
131 |
+
if ($sd_token != '') {
|
132 |
+
$nb_configured++;
|
133 |
+
}
|
134 |
+
if ($sd_list != '') {
|
135 |
+
$nb_configured++;
|
136 |
+
}
|
137 |
+
return $nb_configured;
|
138 |
+
}
|
139 |
+
}
|
140 |
+
}
|
141 |
+
|
142 |
+
public function setConfiguration($field, $value)
|
143 |
+
{
|
144 |
+
$sql_field = '';
|
145 |
+
if ($field == 'identifier') {
|
146 |
+
$sql_field = 'lastname';
|
147 |
+
} else if ($field == 'sd_list') {
|
148 |
+
$sql_field = 'firstname';
|
149 |
+
} else if ($field == 'sd_token') {
|
150 |
+
$sql_field = 'orders_data';
|
151 |
+
}
|
152 |
+
if ($sql_field != '') {
|
153 |
+
$resource = Mage::getSingleton('core/resource');
|
154 |
+
$db_write = $resource->getConnection('core_write');
|
155 |
+
$sarbacanedesktop = $resource->getTableName('sarbacanedesktop');
|
156 |
+
$rq_sql = '
|
157 |
+
UPDATE `' . $sarbacanedesktop . '`
|
158 |
+
SET `' . $sql_field . '` = ' . $db_write->quote($value) . '
|
159 |
+
WHERE `email` = \'-\'
|
160 |
+
AND `store_id` = \'-\'
|
161 |
+
AND `list_type` = \'-\'';
|
162 |
+
$db_write->query($rq_sql);
|
163 |
+
}
|
164 |
+
}
|
165 |
+
|
166 |
+
public function deleteSdid($sd_id){
|
167 |
+
$resource = Mage::getSingleton('core/resource');
|
168 |
+
$db_write = $resource->getConnection('core_write');
|
169 |
+
$sarbacanedesktop = $resource->getTableName('sarbacanedesktop');
|
170 |
+
$sarbacanedesktop_users = $resource->getTableName('sarbacanedesktop_users');
|
171 |
+
|
172 |
+
$rq_sql = 'DELETE FROM sarbacanedesktop WHERE sd_id = (SELECT sd_id FROM sarbacanedesktop_users WHERE sd_type= "sd_id" AND sd_value="'. $sd_id .'")';
|
173 |
+
$db_write->query($rq_sql);
|
174 |
+
}
|
175 |
+
|
176 |
+
}
|
app/code/community/Sarbacane/Mailify/controllers/Adminhtml/MailifyController.php
ADDED
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Sarbacane
|
16 |
+
* @package Sarbacane_Mailify
|
17 |
+
* @author Sarbacane Software <contact@sarbacane.com>
|
18 |
+
* @copyright 2015 Sarbacane Software
|
19 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
class Sarbacane_Mailify_Adminhtml_MailifyController extends Mage_Adminhtml_Controller_Action
|
23 |
+
{
|
24 |
+
|
25 |
+
public function indexAction(){
|
26 |
+
if (Mage::app()->getRequest()->getParam('submit_configuration') || Mage::app()->getRequest()->getParam('submit_parameter_key')) {
|
27 |
+
if (Mage::app()->getRequest()->getParam('submit_configuration')) {
|
28 |
+
$this->saveListConfiguration();
|
29 |
+
if (Mage::helper('mailify')->getConfiguration('sd_token') == '') {
|
30 |
+
$this->saveTokenParameterConfiguration();
|
31 |
+
}
|
32 |
+
$this->_getSession()->addSuccess($this->__('Your settings have been saved'));
|
33 |
+
}
|
34 |
+
else if (Mage::app()->getRequest()->getParam('submit_parameter_key')) {
|
35 |
+
$this->saveTokenParameterConfiguration();
|
36 |
+
$this->_getSession()->addSuccess($this->__('Your settings have been saved'));
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
$this->loadLayout();
|
41 |
+
$block = $this->getLayout()->getBlock('mailify');
|
42 |
+
$block->setSdFormKey($this->getSdFormKey());
|
43 |
+
$block->setKeyForSynchronisation($this->getKeyForSynchronisation());
|
44 |
+
$block->setListConfiguration(Mage::helper('mailify')->getListConfiguration('array'));
|
45 |
+
$block->setGeneralConfiguration(Mage::helper('mailify')->getConfiguration('nb_configured'));
|
46 |
+
$block->setStoresArray(Mage::helper('mailify')->getStoresArray());
|
47 |
+
if(Mage::app()->getRequest()->getParam("sd_is_user")){
|
48 |
+
Mage::getSingleton("core/session")->setData("sd_is_user",Mage::app()->getRequest()->getParam("sd_is_user"));
|
49 |
+
}
|
50 |
+
$this->_title($this->__('Sarbacane Desktop'));
|
51 |
+
$this->_setActiveMenu('newsletter');
|
52 |
+
$this->renderLayout();
|
53 |
+
}
|
54 |
+
|
55 |
+
private function saveListConfiguration()
|
56 |
+
{
|
57 |
+
$resource = Mage::getSingleton('core/resource');
|
58 |
+
$db_write = $resource->getConnection('core_write');
|
59 |
+
$sarbacanedesktop_users = $resource->getTableName('sarbacanedesktop_users');
|
60 |
+
$shops = '';
|
61 |
+
if (Mage::app()->getRequest()->getParam('store_id')) {
|
62 |
+
$stores_id = Mage::app()->getRequest()->getParam('store_id');
|
63 |
+
if (is_array($stores_id)) {
|
64 |
+
foreach ($stores_id as $store_id) {
|
65 |
+
$shops .= $store_id . ',';
|
66 |
+
}
|
67 |
+
$shops = substr($shops, 0, strlen($shops)-1);
|
68 |
+
}
|
69 |
+
}
|
70 |
+
$old_sd_list_array = Mage::helper('mailify')->getListConfiguration('array');
|
71 |
+
Mage::helper('mailify')->setConfiguration('sd_list', $shops);
|
72 |
+
$rq_sql = '
|
73 |
+
UPDATE `' . $sarbacanedesktop_users . '`
|
74 |
+
SET `sd_value` = ' . $db_write->quote($shops) . '
|
75 |
+
WHERE `sd_type` = \'sd_list\'';
|
76 |
+
$db_write->query($rq_sql);
|
77 |
+
$sd_list_array = Mage::helper('mailify')->getListConfiguration('array');
|
78 |
+
foreach ($sd_list_array as $sd_list)
|
79 |
+
{
|
80 |
+
if (!in_array($sd_list, $old_sd_list_array))
|
81 |
+
{
|
82 |
+
$id_shop = Mage::helper('mailify')->getStoreidFromList($sd_list);
|
83 |
+
$list_type = Mage::helper('mailify')->getListTypeFromList($sd_list);
|
84 |
+
Mage::helper('mailify')->resetList($list_type, $id_shop);
|
85 |
+
}
|
86 |
+
}
|
87 |
+
}
|
88 |
+
private function createTokenParameterConfiguration(){
|
89 |
+
$resource = Mage::getSingleton('core/resource');
|
90 |
+
$db_write = $resource->getConnection('core_write');
|
91 |
+
$sarbacanedesktop = $resource->getTableName('sarbacanedesktop');
|
92 |
+
$sarbacanedesktop_users = $resource->getTableName('sarbacanedesktop_users');
|
93 |
+
$rq_sql = 'TRUNCATE `' . $sarbacanedesktop . '`';
|
94 |
+
$rq_sql = 'TRUNCATE `' . $sarbacanedesktop_users . '`';
|
95 |
+
$db_write->query($rq_sql);
|
96 |
+
$token_parameter = rand(100000, 999999) . Mage::getModel('core/date')->timestamp(time());
|
97 |
+
$rq_sql = 'INSERT INTO `' . $sarbacanedesktop_users . '` (`sd_value`,`sd_type`) VALUES (' . $db_write->quote($token_parameter) . ',\'sd_token\')';
|
98 |
+
$db_write->query($rq_sql);
|
99 |
+
return $token_parameter;
|
100 |
+
}
|
101 |
+
private function saveTokenParameterConfiguration()
|
102 |
+
{
|
103 |
+
$resource = Mage::getSingleton('core/resource');
|
104 |
+
$db_write = $resource->getConnection('core_write');
|
105 |
+
$sarbacanedesktop = $resource->getTableName('sarbacanedesktop');
|
106 |
+
$sarbacanedesktop_users = $resource->getTableName('sarbacanedesktop_users');
|
107 |
+
$rq_sql = 'TRUNCATE `' . $sarbacanedesktop . '`';
|
108 |
+
$db_write->query($rq_sql);
|
109 |
+
$token_parameter = rand(100000, 999999) . Mage::getModel('core/date')->timestamp(time());
|
110 |
+
$rq_sql = '
|
111 |
+
UPDATE `' . $sarbacanedesktop_users . '`
|
112 |
+
SET `sd_value` = ' . $db_write->quote($token_parameter) . '
|
113 |
+
WHERE `sd_type` = \'sd_token\'';
|
114 |
+
$db_write->query($rq_sql);
|
115 |
+
return $token_parameter;
|
116 |
+
}
|
117 |
+
|
118 |
+
private function getKeyForSynchronisation()
|
119 |
+
{
|
120 |
+
return str_rot13('sarbacanedesktop?stk=' . Mage::helper('mailify')->getToken());
|
121 |
+
}
|
122 |
+
|
123 |
+
private function getSdFormKey()
|
124 |
+
{
|
125 |
+
return substr(Mage::helper('core')->encrypt('SarbacaneDesktopForm'), 0, 15);
|
126 |
+
}
|
127 |
+
|
128 |
+
}
|
app/code/community/Sarbacane/Mailify/controllers/IndexController.php
ADDED
@@ -0,0 +1,361 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Sarbacane
|
16 |
+
* @package Sarbacane_Mailify
|
17 |
+
* @author Sarbacane Software <contact@sarbacane.com>
|
18 |
+
* @copyright 2015 Sarbacane Software
|
19 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
20 |
+
*/
|
21 |
+
class Sarbacane_Mailify_IndexController extends Mage_Core_Controller_Front_Action {
|
22 |
+
private function getSdidIdentifier($sdid) {
|
23 |
+
$resource = Mage::getSingleton ( 'core/resource' );
|
24 |
+
$db_read = $resource->getConnection ( 'core_read' );
|
25 |
+
$sarbacanedesktop_users = $resource->getTableName ( 'sarbacanedesktop_users' );
|
26 |
+
$rq_sql = '
|
27 |
+
SELECT `sd_id`
|
28 |
+
FROM `' . $sarbacanedesktop_users . '`
|
29 |
+
WHERE `sd_type` = \'sd_id\'
|
30 |
+
AND `sd_value` = ' . $db_read->quote ( $sdid );
|
31 |
+
$rq = $db_read->query ( $rq_sql );
|
32 |
+
while ( $r = $rq->fetch () ) {
|
33 |
+
return $r ['sd_id'];
|
34 |
+
}
|
35 |
+
return '';
|
36 |
+
}
|
37 |
+
private function saveSdid($sdid) {
|
38 |
+
$resource = Mage::getSingleton ( 'core/resource' );
|
39 |
+
$db_write = $resource->getConnection ( 'core_write' );
|
40 |
+
$sarbacanedesktop_users = $resource->getTableName ( 'sarbacanedesktop_users' );
|
41 |
+
$rq_sql = '
|
42 |
+
INSERT INTO `' . $sarbacanedesktop_users . '` (`sd_type`, `sd_value`) VALUES
|
43 |
+
(\'sd_id\', ' . $db_write->quote ( $sdid ) . ')';
|
44 |
+
$rq = $db_write->query ( $rq_sql );
|
45 |
+
return $this->getSdidIdentifier ( $sdid );
|
46 |
+
}
|
47 |
+
public function indexAction() {
|
48 |
+
if (Mage::app ()->getRequest ()->getParam ( 'stk' ) && Mage::app ()->getRequest ()->getParam ( 'sdid' )) {
|
49 |
+
$sdid = Mage::app ()->getRequest ()->getParam ( 'sdid' );
|
50 |
+
if (Mage::app ()->getRequest ()->getParam ( 'stk' ) == Mage::helper ( 'mailify' )->getToken () && $sdid != '') {
|
51 |
+
$identifier = Mage::helper ( 'mailify' )->getConfiguration ( 'identifier' );
|
52 |
+
$sd_id = $this->getSdidIdentifier ( $sdid );
|
53 |
+
if ($sd_id == '' && ! Mage::app ()->getRequest ()->getParam ( 'list' ))
|
54 |
+
$sd_id = $this->saveSdid ( $sdid );
|
55 |
+
if ($sd_id != '') {
|
56 |
+
$configuration = Mage::helper ( 'mailify' )->getConfiguration ( 'all' );
|
57 |
+
if ($configuration ['sd_token'] != '' && $configuration ['sd_list'] != '') {
|
58 |
+
$sd_list_array = Mage::helper ( 'mailify' )->getListConfiguration ( 'array' );
|
59 |
+
if ($sd_list_array != '') {
|
60 |
+
if (Mage::app ()->getRequest ()->getParam ( 'list' )) {
|
61 |
+
$list = Mage::app ()->getRequest ()->getParam ( 'list' );
|
62 |
+
$store_id = Mage::helper ( 'mailify' )->getStoreidFromList ( $list );
|
63 |
+
$list_type = Mage::helper ( 'mailify' )->getListTypeFromList ( $list );
|
64 |
+
$list_type_array = Mage::helper ( 'mailify' )->getListTypeArray ();
|
65 |
+
if (in_array ( $list_type, $list_type_array )) {
|
66 |
+
$id_and_list = $store_id . $list_type;
|
67 |
+
if (($list_type == 'N' && in_array ( $id_and_list . '0', $sd_list_array )) || ($list_type == 'C' && (in_array ( $id_and_list . '0', $sd_list_array ) || in_array ( $id_and_list . '1', $sd_list_array )))) {
|
68 |
+
if (Mage::app ()->getRequest ()->getParam ( 'action' )) {
|
69 |
+
if (Mage::app ()->getRequest ()->getParam ( 'action' ) == 'reset') {
|
70 |
+
Mage::helper ( 'mailify' )->resetList ( $list_type, $store_id, $sd_id );
|
71 |
+
}
|
72 |
+
}
|
73 |
+
$this->processNewUnsubcribersAndSubscribers ( $list_type, $store_id, $sd_id );
|
74 |
+
}
|
75 |
+
}
|
76 |
+
} else {
|
77 |
+
if('delete' == Mage::app ()->getRequest ()->getParam ( 'action' )){
|
78 |
+
Mage::helper ( 'mailify' )->deleteSdid ( $sd_id );
|
79 |
+
}else{
|
80 |
+
$this->getFormattedContentShops ( $sd_id );
|
81 |
+
}
|
82 |
+
}
|
83 |
+
}
|
84 |
+
}
|
85 |
+
}
|
86 |
+
}
|
87 |
+
} else {
|
88 |
+
echo "Paramètre[s] manquant[s]";
|
89 |
+
}
|
90 |
+
}
|
91 |
+
private function processNewUnsubcribersAndSubscribers($list_type, $store_id, $sd_id) {
|
92 |
+
$line = 'email;lastname;firstname';
|
93 |
+
if ($list_type == 'C') {
|
94 |
+
if ($this->checkIfListWithCustomerData ( $list_type, $store_id )) {
|
95 |
+
$line .= ';date_first_order;date_last_order;amount_min_order;amount_max_order;amount_avg_order;nb_orders;amount_all_orders';
|
96 |
+
}
|
97 |
+
}
|
98 |
+
$line .= ';action';
|
99 |
+
echo $line;
|
100 |
+
$this->processNewUnsubscribers ( $list_type, $store_id, $sd_id );
|
101 |
+
$this->processNewSubscribers ( $list_type, $store_id, $sd_id );
|
102 |
+
}
|
103 |
+
private function getListTypeArray() {
|
104 |
+
return array ('N','C'
|
105 |
+
);
|
106 |
+
}
|
107 |
+
private function checkIfListWithCustomerData($list_type, $store_id) {
|
108 |
+
$sd_list_array = Mage::helper ( 'mailify' )->getListConfiguration ( 'array' );
|
109 |
+
if (in_array ( $store_id . $list_type . '1', $sd_list_array )) {
|
110 |
+
return true;
|
111 |
+
}
|
112 |
+
return false;
|
113 |
+
}
|
114 |
+
private function getFormattedContentShops($sd_id) {
|
115 |
+
$stores = Mage::helper ( 'mailify' )->getStoresArray ();
|
116 |
+
echo 'list_id;name;reset;is_updated;type;version' . "\n";
|
117 |
+
$sd_list_array = Mage::helper ( 'mailify' )->getListConfiguration ( 'array' );
|
118 |
+
$list_array = array ();
|
119 |
+
foreach ( $sd_list_array as $list ) {
|
120 |
+
$store_id = Mage::helper ( 'mailify' )->getStoreidFromList ( $list );
|
121 |
+
$list_type = Mage::helper ( 'mailify' )->getListTypeFromList ( $list );
|
122 |
+
array_push ( $list_array, array ('store_id' => $store_id,'list_type' => $list_type
|
123 |
+
) );
|
124 |
+
}
|
125 |
+
foreach ( $stores as $store ) {
|
126 |
+
foreach ( $list_array as $list ) {
|
127 |
+
if ($store ['store_id'] == $list ['store_id']) {
|
128 |
+
$store_list = "" . $store ['store_id'] . $list ['list_type'] . ';' . $this->dQuote ( $store ['store_name'] ) . ';'; // TEST
|
129 |
+
$store_list .= $this->listIsResetted ( $store ['store_id'], $list ['list_type'], $sd_id ) . ';';
|
130 |
+
$store_list .= $this->listIsUpdated ( $store ['store_id'], $list ['list_type'], $sd_id ) . ';';
|
131 |
+
$store_list .= 'Magento;1.0.0.0' . "\n";
|
132 |
+
echo $store_list;
|
133 |
+
}
|
134 |
+
}
|
135 |
+
}
|
136 |
+
}
|
137 |
+
private function listIsResetted($store_id, $list_type, $sd_id) {
|
138 |
+
$resource = Mage::getSingleton ( 'core/resource' );
|
139 |
+
$db_read = $resource->getConnection ( 'core_read' );
|
140 |
+
$sarbacanedesktop = $resource->getTableName ( 'sarbacanedesktop' );
|
141 |
+
$rq_sql = '
|
142 |
+
SELECT count(`email`) AS `nb_in_table`
|
143 |
+
FROM ' . $sarbacanedesktop . '
|
144 |
+
WHERE `list_type` = ' . $db_read->quote ( $list_type ) . '
|
145 |
+
AND `store_id` = ' . $db_read->quote ( $store_id ) . '
|
146 |
+
AND `sd_id` = ' . $db_read->quote ( $sd_id );
|
147 |
+
$nb_in_table = $db_read->fetchOne ( $rq_sql );
|
148 |
+
if ($nb_in_table == 0)
|
149 |
+
return 'Y';
|
150 |
+
return 'N';
|
151 |
+
}
|
152 |
+
private function listIsUpdated($store_id, $list_type, $sd_id) {
|
153 |
+
$is_updated_list = 'N';
|
154 |
+
if ($this->processNewUnsubscribers ( $list_type, $store_id, $sd_id, 'is_updated' ) > 0) {
|
155 |
+
$is_updated_list = 'Y';
|
156 |
+
}
|
157 |
+
if ($this->processNewSubscribers ( $list_type, $store_id, $sd_id, 'is_updated' ) > 0) {
|
158 |
+
$is_updated_list = 'Y';
|
159 |
+
}
|
160 |
+
return $is_updated_list;
|
161 |
+
}
|
162 |
+
private function dQuote($value) {
|
163 |
+
$value = str_replace ( '"', '""', $value );
|
164 |
+
if (strpos ( $value, ' ' ) || strpos ( $value, ';' )) {
|
165 |
+
$value = '"' . $value . '"';
|
166 |
+
}
|
167 |
+
return $value;
|
168 |
+
}
|
169 |
+
private function processNewSubscribers($list_type, $store_id, $sd_id, $type_action = 'display') {
|
170 |
+
$resource = Mage::getSingleton ( 'core/resource' );
|
171 |
+
$db_read = $resource->getConnection ( 'core_read' );
|
172 |
+
$db_write = $resource->getConnection ( 'core_write' );
|
173 |
+
$newsletter_subscriber = $resource->getTableName ( 'newsletter_subscriber' );
|
174 |
+
$sarbacanedesktop = $resource->getTableName ( 'sarbacanedesktop' );
|
175 |
+
$sales_flat_order = $resource->getTableName ( 'sales_flat_order' );
|
176 |
+
$customer_entity = $resource->getTableName ( 'customer_entity' );
|
177 |
+
$customer_entity_varchar = $resource->getTableName ( 'customer_entity_varchar' );
|
178 |
+
$core_store = $resource->getTableName ( 'core_store' ); // core store
|
179 |
+
$attr_firstname = Mage::getModel ( 'customer/customer' )->getAttribute ( 'firstname' )->getAttributeId ();
|
180 |
+
$attr_lastname = Mage::getModel ( 'customer/customer' )->getAttribute ( 'lastname' )->getAttributeId ();
|
181 |
+
$rq_sql_limit = '2500';
|
182 |
+
if ($type_action == 'is_updated')
|
183 |
+
$rq_sql_limit = '1';
|
184 |
+
if ($list_type == 'N') {
|
185 |
+
$rq_sql = '
|
186 |
+
SELECT t.* FROM (
|
187 |
+
SELECT ns.`subscriber_email` AS `email`, IFNULL(lastname.`value`, \'\') AS `lastname`, IFNULL(firstname.`value`, \'\') AS `firstname`
|
188 |
+
FROM `' . $newsletter_subscriber . '` AS `ns`
|
189 |
+
LEFT JOIN ' . $customer_entity_varchar . ' AS `lastname` ON lastname.`entity_id` = ns.`customer_id` AND lastname.`attribute_id` = ' . ( int ) $attr_lastname . '
|
190 |
+
LEFT JOIN ' . $customer_entity_varchar . ' AS `firstname` ON firstname.`entity_id` = ns.`customer_id` AND firstname.`attribute_id` = ' . ( int ) $attr_firstname . '
|
191 |
+
LEFT JOIN ' . $sarbacanedesktop . ' AS `s` ON s.`email` = ns.`subscriber_email` AND s.`store_id` = ns.`store_id` AND s.`list_type` = \'N\'
|
192 |
+
WHERE ns.`subscriber_status` = 1
|
193 |
+
AND ns.`store_id` = ' . ( int ) $store_id . '
|
194 |
+
) AS `t`
|
195 |
+
LEFT JOIN ' . $sarbacanedesktop . ' AS `s` ON (s.`email` = t.`email` AND s.`list_type` = \'N\'
|
196 |
+
AND s.`store_id` = ' . $db_write->quote ( $store_id ) . ' AND s.`sd_id` = ' . $db_write->quote ( $sd_id ) . '
|
197 |
+
AND s.`lastname` = t.`lastname` AND s.`firstname` = t.`firstname`)
|
198 |
+
WHERE s.`store_id` IS NULL
|
199 |
+
LIMIT 0, ' . $rq_sql_limit;
|
200 |
+
} else if ($list_type == 'C') {
|
201 |
+
$add_customer_data = $this->checkIfListWithCustomerData ( $list_type, $store_id );
|
202 |
+
if($add_customer_data){
|
203 |
+
$rq_sql = "
|
204 |
+
SELECT c.email AS email ,cevln.value as lastname , cevfn.value as firstname, MAX(sfo.base_grand_total) as amount_max_order, MIN(sfo.base_grand_total) as amount_min_order, AVG(sfo.base_grand_total) as amount_avg_order, MIN(sfo.created_at) as date_first_order, MAX(sfo.created_at) as date_last_order, COUNT(sfo.entity_id) as nb_orders, SUM(sfo.base_grand_total) as amount_all_orders,sd.sd_id,sd.orders_data
|
205 |
+
FROM customer_entity c
|
206 |
+
LEFT JOIN customer_entity_varchar cevln ON cevln.entity_id = c.entity_id AND cevln.attribute_id=7
|
207 |
+
LEFT JOIN customer_entity_varchar cevfn ON cevfn.entity_id = c.entity_id AND cevfn.attribute_id = 5
|
208 |
+
LEFT JOIN sales_flat_order sfo ON sfo.customer_id = c.entity_id
|
209 |
+
LEFT JOIN sarbacanedesktop sd ON sd.email = c.email AND sd.sd_id = ". $sd_id ." AND sd.list_type='C'
|
210 |
+
WHERE c.store_id = ". $store_id ."
|
211 |
+
GROUP BY c.entity_id
|
212 |
+
HAVING nb_orders > 0 AND (sd.sd_id IS NULL OR sd.orders_data != CONCAT(MIN(sfo.base_grand_total),MAX(sfo.base_grand_total),COUNT(sfo.entity_id),SUM(sfo.base_grand_total)))
|
213 |
+
UNION
|
214 |
+
SELECT sfo.customer_email AS email ,sfo.customer_lastname as lastname , sfo.customer_firstname as firstname, MAX(sfo.base_grand_total) as amount_max_order, MIN(sfo.base_grand_total) as amount_min_order, AVG(sfo.base_grand_total) as amount_avg_order, MIN(sfo.created_at) as date_first_order, MAX(sfo.created_at) as date_last_order, COUNT(sfo.entity_id) as nb_orders, SUM(sfo.base_grand_total) as amount_all_orders,sd.sd_id,sd.orders_data
|
215 |
+
FROM sales_flat_order sfo
|
216 |
+
LEFT JOIN sarbacanedesktop sd ON sd.email = sfo.customer_email AND sd.sd_id = ". $sd_id ." AND sd.list_type='C'
|
217 |
+
WHERE sd.sd_id IS NULL AND sfo.customer_id IS NULL AND sfo.store_id = ". $store_id ."
|
218 |
+
GROUP BY sfo.customer_email
|
219 |
+
HAVING nb_orders > 0 AND (sd.sd_id IS NULL OR sd.orders_data != CONCAT(MIN(sfo.base_grand_total),MAX(sfo.base_grand_total),COUNT(sfo.entity_id),SUM(sfo.base_grand_total)))";
|
220 |
+
}else{
|
221 |
+
$rq_sql = "
|
222 |
+
SELECT c.email AS email ,cevln.value as lastname , cevfn.value as firstname
|
223 |
+
FROM customer_entity c
|
224 |
+
LEFT JOIN customer_entity_varchar cevln ON cevln.entity_id = c.entity_id AND cevln.attribute_id=7
|
225 |
+
LEFT JOIN customer_entity_varchar cevfn ON cevfn.entity_id = c.entity_id AND cevfn.attribute_id = 5
|
226 |
+
LEFT JOIN sarbacanedesktop sd ON sd.email = c.email AND sd.sd_id = ". $sd_id ." AND sd.list_type='C'
|
227 |
+
WHERE sd.sd_id IS NULL AND c.store_id = ". $store_id ."
|
228 |
+
UNION
|
229 |
+
SELECT sfo.customer_email AS email ,sfo.customer_lastname as lastname , sfo.customer_firstname as firstname
|
230 |
+
FROM sales_flat_order sfo
|
231 |
+
LEFT JOIN sarbacanedesktop sd ON sd.email = sfo.customer_email AND sd.sd_id = ". $sd_id ." AND sd.list_type='C'
|
232 |
+
WHERE sd.sd_id IS NULL AND sfo.customer_id IS NULL AND sfo.store_id = ". $store_id ." ";
|
233 |
+
}
|
234 |
+
$rq_sql .=" LIMIT 0, 2500";
|
235 |
+
} else {
|
236 |
+
return;
|
237 |
+
}
|
238 |
+
if ($type_action == 'is_updated') {
|
239 |
+
$rq = $db_read->fetchAll ( $rq_sql );
|
240 |
+
return count ( $rq );
|
241 |
+
} else {
|
242 |
+
$rq = $db_read->query ( $rq_sql );
|
243 |
+
$rq_sql_insert = '';
|
244 |
+
$i = 0;
|
245 |
+
while ( $r = $rq->fetch () ) {
|
246 |
+
$line = "\r\n" . $this->dQuote ( $r ['email'] ) . ';'; // TEST
|
247 |
+
$line .= $this->dQuote ( $r ['lastname'] ) . ';' . $this->dQuote ( $r ['firstname'] );
|
248 |
+
$orders_data = '';
|
249 |
+
if ($list_type == 'C') {
|
250 |
+
if ($add_customer_data) {
|
251 |
+
$line .= ';' . $this->dQuote ( $r ['date_first_order'] ) . ';' . $this->dQuote ( $r ['date_last_order'] );
|
252 |
+
$line .= ';' . ( float ) $r ['amount_min_order'] . ';' . ( float ) $r ['amount_max_order'] . ';' . ( float ) $r ['amount_avg_order'];
|
253 |
+
$line .= ';' . $r ['nb_orders'] . ';' . ( float ) $r ['amount_all_orders'];
|
254 |
+
$orders_data = $r ['amount_min_order'] . $r ['amount_max_order'];
|
255 |
+
$orders_data .= $r ['nb_orders'] . $r ['amount_all_orders'];
|
256 |
+
}
|
257 |
+
}
|
258 |
+
$line .= ';S';
|
259 |
+
echo $line;
|
260 |
+
$insert_values = $db_write->quote ( $r ['email'] ) . ', ' . $db_write->quote ( $list_type ) . ', ' . $db_write->quote ( $store_id ) . ', ' . $db_write->quote ( $sd_id );
|
261 |
+
$insert_values .= ', ' . $db_write->quote ( $r ['lastname'] ) . ', ' . $db_write->quote ( $r ['firstname'] ) . ', ' . $db_write->quote ( $orders_data );
|
262 |
+
$rq_sql_insert .= ' (' . $insert_values . '),';
|
263 |
+
if ($i == 200) {
|
264 |
+
$rq_sql_insert = substr ( $rq_sql_insert, 0, - 1 );
|
265 |
+
$rq_sql = '
|
266 |
+
INSERT INTO `' . $sarbacanedesktop . '` (`email`, `list_type`, `store_id`, `sd_id`, `lastname`, `firstname`, `orders_data`) VALUES
|
267 |
+
' . $rq_sql_insert . '
|
268 |
+
ON DUPLICATE KEY UPDATE
|
269 |
+
`lastname` = VALUES(`lastname`),
|
270 |
+
`firstname` = VALUES(`firstname`),
|
271 |
+
`orders_data` = VALUES(`orders_data`)';
|
272 |
+
$db_write->query ( $rq_sql );
|
273 |
+
$rq_sql_insert = '';
|
274 |
+
$i = 0;
|
275 |
+
}
|
276 |
+
$i ++;
|
277 |
+
}
|
278 |
+
if ($rq_sql_insert != '') {
|
279 |
+
$rq_sql_insert = substr ( $rq_sql_insert, 0, - 1 );
|
280 |
+
$rq_sql = '
|
281 |
+
INSERT INTO `' . $sarbacanedesktop . '` (`email`, `list_type`, `store_id`, `sd_id`, `lastname`, `firstname`, `orders_data`) VALUES
|
282 |
+
' . $rq_sql_insert . '
|
283 |
+
ON DUPLICATE KEY UPDATE
|
284 |
+
`lastname` = VALUES(`lastname`),
|
285 |
+
`firstname` = VALUES(`firstname`),
|
286 |
+
`orders_data` = VALUES(`orders_data`)';
|
287 |
+
$db_write->query ( $rq_sql );
|
288 |
+
}
|
289 |
+
}
|
290 |
+
}
|
291 |
+
private function processNewUnsubscribers($list_type, $store_id, $sd_id, $type_action = 'display') {
|
292 |
+
$resource = Mage::getSingleton ( 'core/resource' );
|
293 |
+
$db_read = $resource->getConnection ( 'core_read' );
|
294 |
+
$db_write = $resource->getConnection ( 'core_write' );
|
295 |
+
$sarbacanedesktop = $resource->getTableName ( 'sarbacanedesktop' );
|
296 |
+
$newsletter_subscriber = $resource->getTableName ( 'newsletter_subscriber' );
|
297 |
+
$customer_entity = $resource->getTableName ( 'customer_entity' );
|
298 |
+
|
299 |
+
$rq_sql_limit = '2500';
|
300 |
+
if ($type_action == 'is_updated')
|
301 |
+
$rq_sql_limit = '1';
|
302 |
+
if ($list_type == 'N') {
|
303 |
+
$rq_sql = '
|
304 |
+
SELECT s.`email`, s.`store_id`
|
305 |
+
FROM `' . $sarbacanedesktop . '` AS s
|
306 |
+
LEFT JOIN `' . $newsletter_subscriber . '` AS ns ON (ns.`subscriber_email` = s.`email` AND ns.`store_id` = s.`store_id` AND ns.`subscriber_status` = 1)
|
307 |
+
WHERE s.`list_type` = \'N\' AND s.`store_id` = ' . $db_write->quote ( $store_id ) . ' AND s.`sd_id` = ' . $db_write->quote ( $sd_id ) . ' AND ns.`store_id` IS NULL';
|
308 |
+
} else if ($list_type == 'C') {
|
309 |
+
// REVOIR REQUETE
|
310 |
+
$rq_sql = "SELECT * FROM " . $sarbacanedesktop . " WHERE 1=2";
|
311 |
+
// $rq_sql = '
|
312 |
+
// SELECT s.email, s.store_id FROM `' . $sarbacanedesktop . '` AS `s` LEFT JOIN ' . $customer_entity . ' AS c ON s.email = c.email WHERE c.is_active = 0';
|
313 |
+
} else {
|
314 |
+
return;
|
315 |
+
}
|
316 |
+
if ($type_action == 'is_updated') {
|
317 |
+
$rq = $db_read->fetchAll ( $rq_sql );
|
318 |
+
return count ( $rq );
|
319 |
+
} else {
|
320 |
+
$rq = $db_read->query ( $rq_sql );
|
321 |
+
$rq_sql_delete = '';
|
322 |
+
$i = 0;
|
323 |
+
while ( $r = $rq->fetch () ) {
|
324 |
+
$line = "\n" . $this->dQuote ( $r ['email'] ) . ';;'; // TEST
|
325 |
+
if ($list_type == 'C') {
|
326 |
+
if ($this->checkIfListWithCustomerData ( $list_type, $store_id )) {
|
327 |
+
$line .= ';;;;;';
|
328 |
+
}
|
329 |
+
}
|
330 |
+
$line .= ';U' . "\r\n";
|
331 |
+
echo $line;
|
332 |
+
$rq_sql_delete .= '(' . $db_write->quote ( $r ['email'] ) . '),';
|
333 |
+
if ($i == 200) {
|
334 |
+
$rq_sql_delete = substr ( $rq_sql_delete, 0, - 1 );
|
335 |
+
$rq_sql = '
|
336 |
+
DELETE FROM `' . $sarbacanedesktop . '`
|
337 |
+
WHERE (`email`)
|
338 |
+
IN (' . $rq_sql_delete . ')
|
339 |
+
AND `list_type` = ' . $db_write->quote ( $list_type ) . '
|
340 |
+
AND `store_id` = ' . $db_write->quote ( $store_id ) . '
|
341 |
+
AND `sd_id` = ' . $db_write->quote ( $sd_id );
|
342 |
+
$db_write->query ( $rq_sql );
|
343 |
+
$rq_sql_delete = '';
|
344 |
+
$i = 0;
|
345 |
+
}
|
346 |
+
$i ++;
|
347 |
+
}
|
348 |
+
if ($rq_sql_delete != '') {
|
349 |
+
$rq_sql_delete = substr ( $rq_sql_delete, 0, - 1 );
|
350 |
+
$rq_sql = '
|
351 |
+
DELETE FROM `' . $sarbacanedesktop . '`
|
352 |
+
WHERE (`email`)
|
353 |
+
IN (' . $rq_sql_delete . ')
|
354 |
+
AND `list_type` = ' . $db_write->quote ( $list_type ) . '
|
355 |
+
AND `store_id` = ' . $db_write->quote ( $store_id ) . '
|
356 |
+
AND `sd_id` = ' . $db_write->quote ( $sd_id );
|
357 |
+
$db_write->query ( $rq_sql );
|
358 |
+
}
|
359 |
+
}
|
360 |
+
}
|
361 |
+
}
|
app/code/community/Sarbacane/Mailify/etc/config.xml
ADDED
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* @category Sarbacane
|
17 |
+
* @package Sarbacane_Mailify
|
18 |
+
* @author Sarbacane Software <contact@sarbacane.com>
|
19 |
+
* @copyright 2015 Sarbacane Software
|
20 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
21 |
+
*/
|
22 |
+
-->
|
23 |
+
<config>
|
24 |
+
<modules>
|
25 |
+
<Sarbacane_Mailify>
|
26 |
+
<version>1.0.0.0</version>
|
27 |
+
</Sarbacane_Mailify>
|
28 |
+
</modules>
|
29 |
+
<frontend>
|
30 |
+
<routers>
|
31 |
+
<sarbacanedesktop>
|
32 |
+
<use>standard</use>
|
33 |
+
<args>
|
34 |
+
<module>Sarbacane_Mailify</module>
|
35 |
+
<frontName>sarbacanedesktop</frontName>
|
36 |
+
</args>
|
37 |
+
</sarbacanedesktop>
|
38 |
+
</routers>
|
39 |
+
<!--
|
40 |
+
<layout>
|
41 |
+
<updates>
|
42 |
+
<sarbacanedesktop>
|
43 |
+
<file>sarbacanedesktop.xml</file>
|
44 |
+
</sarbacanedesktop>
|
45 |
+
</updates>
|
46 |
+
</layout>
|
47 |
+
-->
|
48 |
+
</frontend>
|
49 |
+
<admin>
|
50 |
+
<routers>
|
51 |
+
<adminhtml>
|
52 |
+
<args>
|
53 |
+
<modules>
|
54 |
+
<mailify before="Mage_Adminhtml">Sarbacane_Mailify_Adminhtml</mailify>
|
55 |
+
</modules>
|
56 |
+
</args>
|
57 |
+
</adminhtml>
|
58 |
+
</routers>
|
59 |
+
<!--
|
60 |
+
<routers>
|
61 |
+
<sarbacanedesktop>
|
62 |
+
<use>admin</use>
|
63 |
+
<args>
|
64 |
+
<module>Sarbacane_Sarbacanedesktop</module>
|
65 |
+
<frontName>sarbacanedesktop</frontName>
|
66 |
+
</args>
|
67 |
+
</sarbacanedesktop>
|
68 |
+
</routers>
|
69 |
+
-->
|
70 |
+
</admin>
|
71 |
+
<adminhtml>
|
72 |
+
<menu>
|
73 |
+
<newsletter>
|
74 |
+
<children>
|
75 |
+
<items module="mailify" translate="title">
|
76 |
+
<title>Mailify</title>
|
77 |
+
<sort_order>120</sort_order>
|
78 |
+
<action>adminhtml/mailify</action>
|
79 |
+
</items>
|
80 |
+
</children>
|
81 |
+
</newsletter>
|
82 |
+
</menu>
|
83 |
+
<acl>
|
84 |
+
<resources>
|
85 |
+
<admin>
|
86 |
+
<children>
|
87 |
+
<newsletter>
|
88 |
+
<children>
|
89 |
+
<mailify translate="title">
|
90 |
+
<title>Mailify</title>
|
91 |
+
<sort_order>120</sort_order>
|
92 |
+
</mailify>
|
93 |
+
</children>
|
94 |
+
</newsletter>
|
95 |
+
</children>
|
96 |
+
</admin>
|
97 |
+
</resources>
|
98 |
+
</acl>
|
99 |
+
<layout>
|
100 |
+
<updates>
|
101 |
+
<mailify>
|
102 |
+
<file>mailify.xml</file>
|
103 |
+
</mailify>
|
104 |
+
</updates>
|
105 |
+
</layout>
|
106 |
+
<translate>
|
107 |
+
<modules>
|
108 |
+
<Sarbacane_Mailify>
|
109 |
+
<files>
|
110 |
+
<default>Sarbacane_Mailify.csv</default>
|
111 |
+
</files>
|
112 |
+
</Sarbacane_Mailify>
|
113 |
+
</modules>
|
114 |
+
</translate>
|
115 |
+
</adminhtml>
|
116 |
+
<global>
|
117 |
+
<helpers>
|
118 |
+
<mailify>
|
119 |
+
<class>Sarbacane_Mailify_Helper</class>
|
120 |
+
</mailify>
|
121 |
+
</helpers>
|
122 |
+
<blocks>
|
123 |
+
<mailify>
|
124 |
+
<class>Sarbacane_Mailify_Block</class>
|
125 |
+
</mailify>
|
126 |
+
</blocks>
|
127 |
+
<resources>
|
128 |
+
<mailify_setup>
|
129 |
+
<setup>
|
130 |
+
<module>Sarbacane_Mailify</module>
|
131 |
+
</setup>
|
132 |
+
<connection>
|
133 |
+
<use>core_setup</use>
|
134 |
+
</connection>
|
135 |
+
</mailify_setup>
|
136 |
+
<mailify_write>
|
137 |
+
<connection>
|
138 |
+
<use>core_write</use>
|
139 |
+
</connection>
|
140 |
+
</mailify_write>
|
141 |
+
<mailify_read>
|
142 |
+
<connection>
|
143 |
+
<use>core_read</use>
|
144 |
+
</connection>
|
145 |
+
</mailify_read>
|
146 |
+
</resources>
|
147 |
+
</global>
|
148 |
+
</config>
|
app/code/community/Sarbacane/Mailify/sql/mailify_setup/mysql4-install-1.0.0.0.php
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Sarbacane
|
16 |
+
* @package Sarbacane_Sarbacanedesktop
|
17 |
+
* @author Sarbacane Software <contact@sarbacane.com>
|
18 |
+
* @copyright 2015 Sarbacane Software
|
19 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
$installer = $this;
|
23 |
+
$installer->startSetup();
|
24 |
+
|
25 |
+
$installer->run("
|
26 |
+
DROP TABLE IF EXISTS `{$this->getTable('sarbacanedesktop')}`;
|
27 |
+
DROP TABLE IF EXISTS `{$this->getTable('sarbacanedesktop_users')}`;
|
28 |
+
|
29 |
+
CREATE TABLE `{$this->getTable('sarbacanedesktop')}` (
|
30 |
+
`email` varchar(150) NOT NULL,
|
31 |
+
`list_type` varchar(20) NOT NULL,
|
32 |
+
`store_id` varchar(20) NOT NULL,
|
33 |
+
`sd_id` varchar(20) NOT NULL,
|
34 |
+
`lastname` varchar(150) NOT NULL,
|
35 |
+
`firstname` varchar(150) NOT NULL,
|
36 |
+
`orders_data` varchar(150) NOT NULL,
|
37 |
+
PRIMARY KEY(`email`,`store_id`,`list_type`,`sd_id`)
|
38 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
39 |
+
|
40 |
+
CREATE TABLE `{$this->getTable('sarbacanedesktop_users')}` (
|
41 |
+
`sd_id` int(20) unsigned NOT NULL AUTO_INCREMENT,
|
42 |
+
`sd_type` varchar(20) NOT NULL,
|
43 |
+
`sd_value` varchar(200) NOT NULL,
|
44 |
+
PRIMARY KEY(`sd_id`)
|
45 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
46 |
+
|
47 |
+
INSERT INTO `{$this->getTable('sarbacanedesktop_users')}` (`sd_type`, `sd_value`) VALUES
|
48 |
+
('sd_token', ''),
|
49 |
+
('sd_list', '');
|
50 |
+
|
51 |
+
");
|
52 |
+
$installer->endSetup();
|
app/design/adminhtml/default/default/layout/mailify.xml
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* @category Sarbacane
|
17 |
+
* @package Sarbacane_Mailify
|
18 |
+
* @author Sarbacane Software <contact@sarbacane.com>
|
19 |
+
* @copyright 2015 Sarbacane Software
|
20 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
21 |
+
*/
|
22 |
+
-->
|
23 |
+
<layout>
|
24 |
+
<adminhtml_mailify_index>
|
25 |
+
<reference name="content">
|
26 |
+
<block type="mailify/adminhtml_mailify" name="mailify" template="mailify/mailify.phtml"/>
|
27 |
+
</reference>
|
28 |
+
</adminhtml_mailify_index>
|
29 |
+
</layout>
|
app/design/adminhtml/default/default/template/mailify/mailify.phtml
ADDED
@@ -0,0 +1,266 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category Sarbacane
|
16 |
+
* @package Sarbacane_Mailify
|
17 |
+
* @author Sarbacane Software <contact@sarbacane.com>
|
18 |
+
* @copyright 2015 Sarbacane Software
|
19 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
20 |
+
*/
|
21 |
+
$key_for_synchronisation = $this->getKeyForSynchronisation ();
|
22 |
+
$list_configuration = $this->getListConfiguration ();
|
23 |
+
$general_configuration = $this->getGeneralConfiguration ();
|
24 |
+
$stores_array = $this->getStoresArray ();
|
25 |
+
?>
|
26 |
+
<link rel="stylesheet" type="text/css" href="<?=$this->getSkinUrl('css/Sarbacane_Mailify/mailify.css')?>" />
|
27 |
+
<script type="text/javascript" src="<?=$this->getSkinUrl('js/Sarbacane_Mailify/mailify.js')?>"></script>
|
28 |
+
<div id="sarbacanedesktop">
|
29 |
+
<div class="sd_header">
|
30 |
+
<div class="sd_logo_<?=$this->__('sarbacane') ?>"></div>
|
31 |
+
</div>
|
32 |
+
<p class="sd_title"><?=$this->__('It\'s easy to manage your newsletter and email campaigns')?></p>
|
33 |
+
<div class="sd_title_separator_page"></div>
|
34 |
+
<div class="sd_video_config_container">
|
35 |
+
<div class="sd_video_container">
|
36 |
+
<iframe width="565" height="315" src="<?=$this->__('https://www.youtube.com/embed/eLMy2tSSYgE')?>?rel=0&showinfo=0" frameborder="0" allowfullscreen></iframe>
|
37 |
+
</div>
|
38 |
+
<div class="sd_config_container">
|
39 |
+
<p><?=$this->__('This Prestashop module enables you to synchronize clients and accounts that have subscribed to your newsletter from your shop online using Sarbacane Desktop\'s email marketing software.')?></p>
|
40 |
+
<p>
|
41 |
+
<input type="button" onclick="document.location = '#sd_step'" class="sd_config_button" value="<?=$this->__('Begin the set-up')?>" />
|
42 |
+
</p>
|
43 |
+
</div>
|
44 |
+
</div>
|
45 |
+
<div class="sd_separator"></div>
|
46 |
+
<div class="sd_detail_description_container">
|
47 |
+
<div>
|
48 |
+
<div>
|
49 |
+
<div>
|
50 |
+
<div class="sd_picto1"></div>
|
51 |
+
<p class="sd_long_subtitle"><?=$this->__('Synchronization of your shop data')?></p>
|
52 |
+
</div>
|
53 |
+
</div>
|
54 |
+
<div>
|
55 |
+
<div>
|
56 |
+
<div class="sd_picto2"></div>
|
57 |
+
<p class="sd_long_subtitle"><?=$this->__('Responsive visual editor')?></p>
|
58 |
+
</div>
|
59 |
+
</div>
|
60 |
+
<div>
|
61 |
+
<div>
|
62 |
+
<div class="sd_picto3"></div>
|
63 |
+
<p class="sd_short_subtitle"><?=$this->__('Detailed statistics')?></p>
|
64 |
+
</div>
|
65 |
+
</div>
|
66 |
+
<div>
|
67 |
+
<div>
|
68 |
+
<div class="sd_picto4"></div>
|
69 |
+
<p class="sd_short_subtitle"><?=$this->__('Optimal deliverability')?></p>
|
70 |
+
</div>
|
71 |
+
</div>
|
72 |
+
</div>
|
73 |
+
<div>
|
74 |
+
<div>
|
75 |
+
<div>
|
76 |
+
<div class="sd_subtitle_separator"></div>
|
77 |
+
<p><?=$this->__('Synchronize and manage all the email lists from your Prestashop store')?></p>
|
78 |
+
</div>
|
79 |
+
</div>
|
80 |
+
<div>
|
81 |
+
<div>
|
82 |
+
<div class="sd_subtitle_separator"></div>
|
83 |
+
<p><?=$this->__('NEW! Create awesome, responsive newsletters thanks to the EmailBuilder')?></p>
|
84 |
+
</div>
|
85 |
+
</div>
|
86 |
+
<div>
|
87 |
+
<div>
|
88 |
+
<div class="sd_subtitle_separator"></div>
|
89 |
+
<p><?=$this->__('Geolocation, openings, opening time, clicks, opt-outs...')?></p>
|
90 |
+
</div>
|
91 |
+
</div>
|
92 |
+
<div>
|
93 |
+
<div>
|
94 |
+
<div class="sd_subtitle_separator"></div>
|
95 |
+
<p><?=$this->__('Optimal deliverability thanks to our renowned professional routing platform')?></p>
|
96 |
+
</div>
|
97 |
+
</div>
|
98 |
+
</div>
|
99 |
+
</div>
|
100 |
+
<div class="sd_separator"></div>
|
101 |
+
<div class="sd_account_offer_container">
|
102 |
+
<p class="sd_account"><?=$this->__('Create your account for free and start sending emails')?></p>
|
103 |
+
<p class="sd_offer"><?=$this->__('No strings attached')?></p>
|
104 |
+
<div class="sd_title_separator_account_offer"></div>
|
105 |
+
</div>
|
106 |
+
<div class="sd_info_container">
|
107 |
+
<div class="sd_info_container_left">
|
108 |
+
<div>
|
109 |
+
<p class="sd_info_title"><?=$this->__('Why choose Sarbacane?')?></p>
|
110 |
+
<div>
|
111 |
+
<p><?=$this->__('Create your account for free and start sending emails')?></p>
|
112 |
+
<p><?=$this->__('Trusted by over 20,000 users worldwide.')?></p>
|
113 |
+
<p><?=$this->__('Awarded Best Emailing Solution by Bsoco Awards (an index that compares emailing solutions)')?></p>
|
114 |
+
<p><?=$this->__('All you need to succeed: design, customize, send, and follow-up on your campaigns')?></p>
|
115 |
+
<p><?=$this->__('A tech heldpdesk and a variety of resources to help: videos, tutorials, manuals, tips...')?></p>
|
116 |
+
</div>
|
117 |
+
</div>
|
118 |
+
</div>
|
119 |
+
<div class="sd_info_container_right">
|
120 |
+
<div>
|
121 |
+
<p class="sd_info_title"><?=$this->__('Need help?')?></p>
|
122 |
+
<div>
|
123 |
+
<p><?=$this->__('Email:')?> <?=$this->__('support@sarbacane.com')?></p>
|
124 |
+
<p><?=$this->__('Tel:')?> <?=$this->__('+33(0) 328 328 040')?></p>
|
125 |
+
<p>
|
126 |
+
<?=$this->__('Website:')?>
|
127 |
+
<a href="<?=$this->__('http://www.sarbacane.com/?utm_source=module-prestashop&utm_medium=plugin&utm_content=lien-sarbacane&utm_campaign=prestashop')?>" target="_blank"><?=$this->__('http://www.sarbacane.com')?></a>
|
128 |
+
</p>
|
129 |
+
</div>
|
130 |
+
</div>
|
131 |
+
</div>
|
132 |
+
</div>
|
133 |
+
<div id="sd_step"></div>
|
134 |
+
<!-- ETAPE 1 -->
|
135 |
+
<div id="sd_step1" class="sd_step <?php if(Mage::getSingleton("core/session")->getData("sd_is_user") == null && $general_configuration<2){?>sd_show_step<?php }?>">
|
136 |
+
<p class="sd_step_title"><?=$this->__('How to set up the module?')?></p>
|
137 |
+
<div class="sd_step_line"></div>
|
138 |
+
<p class="sd_step1_instruction"><?=$this->__('Do you already have a Sarbacane Desktop account?')?></p>
|
139 |
+
<form autocomplete="off" action="<?= Mage::helper('adminhtml')->getUrl("*/*/*/"); ?>#sd_step" method="post">
|
140 |
+
<p class="sd_step1_selection">
|
141 |
+
<span> <input onclick="sdUserYesNoDisplayButton('yes')" type="radio" id="sd_user_click_yes" name="sd_is_user" value="yes" <?php if(Mage::getSingleton("core/session")->getData("sd_is_user") == "yes"){?>checked="checked"<?php }?>/> <label for="sd_user_click_yes"><?=$this->__('Yes')?></label>
|
142 |
+
</span> <span> <input onclick="sdUserYesNoDisplayButton('no')" type="radio" id="sd_user_click_no" name="sd_is_user" value="no" /> <label for="sd_user_click_no" <?php if(Mage::getSingleton("core/session")->getData("sd_is_user") == "no"){?>checked="checked"<?php }?>><?=$this->__('No')?></label>
|
143 |
+
</span>
|
144 |
+
</p>
|
145 |
+
<div class="sd_step_buttons">
|
146 |
+
<div class="sd_step_buttons_right">
|
147 |
+
<input type="hidden" name="submit_is_user" value="1" /> <input type="hidden" name="form_key" value="<?= $this->getFormKey()?>" /> <input type="submit" class="sd_button" value="<?=$this->__('Next')?>" />
|
148 |
+
</div>
|
149 |
+
</div>
|
150 |
+
</form>
|
151 |
+
</div>
|
152 |
+
|
153 |
+
<!-- ETAPE 2 -->
|
154 |
+
<div id="sd_step2" class="sd_step <?php if((Mage::getSingleton("core/session")->getData("sd_is_user") == "yes" || Mage::getSingleton("core/session")->getData("sd_is_user") == "no") && $general_configuration<2 ){?>sd_show_step<?php }?>">
|
155 |
+
<div class="sd_step_line"></div>
|
156 |
+
<p class="sd_step2_instruction"><?=$this->__('Select your shop and pick your settings')?></p>
|
157 |
+
<form autocomplete="off" action="<?= Mage::helper('adminhtml')->getUrl("*/*/*/"); ?>#sd_step" method="post">
|
158 |
+
<div class="sd_step2_selection">
|
159 |
+
<?php foreach ($stores_array as $store){?>
|
160 |
+
|
161 |
+
<div class="sd_step2_selection_list">
|
162 |
+
<p class="sd_step2_selection_shop_title"><?=$store['store_name']?></p>
|
163 |
+
<div class="sd_step2_selection_shop">
|
164 |
+
<div class="sd_step2_selection_shop_input">
|
165 |
+
<input type="checkbox" name="store_id[]" value="<?=$store['store_id']?>N0" <?php if(in_array($store['store_id']+"N0",$list_configuration)){?>checked="checked"<?php }?> />
|
166 |
+
</div>
|
167 |
+
<div class="sd_step2_selection_shop_text">
|
168 |
+
<?=$this->__('Create a list in Sarbacane Desktop with newsletter opt-ins')?>
|
169 |
+
</div>
|
170 |
+
</div>
|
171 |
+
<div class="sd_step2_selection_shop">
|
172 |
+
<div class="sd_step2_selection_shop_input">
|
173 |
+
<?php
|
174 |
+
$storeValue = "";
|
175 |
+
$storeChecked = false;
|
176 |
+
$storeWithCustomersData=false;
|
177 |
+
if(in_array($store['store_id']."C1", $list_configuration)){
|
178 |
+
$storeValue = $store['store_id'].'C1';
|
179 |
+
$storeWithCustomersData=true;
|
180 |
+
$storeChecked = true;
|
181 |
+
}else if(in_array($store['store_id']."C0", $list_configuration)){
|
182 |
+
$storeValue = $store['store_id']."C0";
|
183 |
+
$storeChecked = true;
|
184 |
+
}
|
185 |
+
|
186 |
+
?>
|
187 |
+
<input id="id_shop_<?=$store['store_id']?>C" type="checkbox" name="store_id[]" onclick="changeOptionOrdersDataDisplay('<?=$store['store_id']?>C', this.checked)" value="<?=$storeValue?>" <?php if($storeChecked){ ?>checked="checked"<?php }?>/>
|
188 |
+
</div>
|
189 |
+
<div class="sd_step2_selection_shop_text">
|
190 |
+
<?=$this->__('Create a list in Sarbacane Desktop with your clients who have an account or who have placed an order online')?>
|
191 |
+
</div>
|
192 |
+
</div>
|
193 |
+
<div class="sd_step2_selection_shop_option">
|
194 |
+
<div class="sd_step2_selection_shop_input">
|
195 |
+
<input id="customer_data_<?=$store['store_id']?>C" type="checkbox" onclick="changeOptionOrdersData('<?=$store['store_id']?>C', this.checked)" value="<?php if($storeWithCustomersData){ echo $store['store_id'].'C1';} ?>" <?php if($storeWithCustomersData){?>checked="checked"<?php }?> />
|
196 |
+
</div>
|
197 |
+
<div class="sd_step2_selection_shop_text">
|
198 |
+
<?=$this->__('Add order data (date, amount, etc...)')?>
|
199 |
+
</div>
|
200 |
+
<div onclick="sdInfoDataOrdersClick('<?=$store['store_id']?>C')" onmouseover="sdInfoDataOrdersHover('<?=$store['store_id']?>C')" onmouseout="sdInfoDataOrdersOut('<?=$store['store_id']?>C')" class="sd_step2_info"></div>
|
201 |
+
</div>
|
202 |
+
</div>
|
203 |
+
<div id="sd_tooltip_<?=$store['store_id']?>C" class="sd_tooltip">
|
204 |
+
<div>
|
205 |
+
<?=$this->__('As you enable data from orders, you can also gather extra info in your contact list, and target your recipients in Sarbacane Desktop.')?>
|
206 |
+
<br /><?=$this->__('Below are pieces of information that will be added to your contact list:')?>
|
207 |
+
<br /><?=$this->__('- Date of first order')?>
|
208 |
+
<br /><?=$this->__('- Date of latest order')?>
|
209 |
+
<br /><?=$this->__('- Total number of orders')?>
|
210 |
+
<br /><?=$this->__('- Total amount of orders')?>
|
211 |
+
<br /><?=$this->__('- Amount of the cheapest order')?>
|
212 |
+
<br /><?=$this->__('- Amount of the most expensive order')?>
|
213 |
+
<br /><?=$this->__('- Average amount of the orders placed')?>
|
214 |
+
</div>
|
215 |
+
</div>
|
216 |
+
<?php }?>
|
217 |
+
</div>
|
218 |
+
<div class="sd_step_buttons">
|
219 |
+
<div class="sd_step_buttons_left">
|
220 |
+
<input type="button" onclick="sdDisplayStep(1)" value="<?=$this->__('Previous')?>" />
|
221 |
+
</div>
|
222 |
+
<div class="sd_step_buttons_right">
|
223 |
+
<input type="hidden" name="submit_configuration" value="1" /> <input type="hidden" name="submit_is_user" value="<?=$this->getIsUser()?>" /> <input type="hidden" name="form_key" value="<?= $this->getFormKey()?>" /> <input type="submit" class="sd_button" value="<?=$this->__('Next')?>" />
|
224 |
+
</div>
|
225 |
+
</div>
|
226 |
+
</form>
|
227 |
+
</div>
|
228 |
+
<!-- ETAPE 3 -->
|
229 |
+
<div id="sd_step3" class="sd_step <?php if($general_configuration>=2){?>sd_show_step<?php }?>">
|
230 |
+
<div class="sd_step_line"></div>
|
231 |
+
|
232 |
+
<div class="sd_step3_instruction">
|
233 |
+
<div id="3_step_block" <?php if(Mage::getSingleton("core/session")->getData("sd_is_user") == "yes" || Mage::getSingleton("core/session")->getData("sd_is_user") == null){?> class="HIDDEN" <?php }?>>
|
234 |
+
<p>
|
235 |
+
1/ <a href="<?=$this->__('https://www.sarbacane.com/ws/soft-redirect.asp?key=heXmrxBEUO&com=PrestaShopInfo')?>" target="_blank"><?=$this->__('Download and install Sarbacane')?></a>
|
236 |
+
</p>
|
237 |
+
<p>2/ <?=$this->__('Create your free account')?></p>
|
238 |
+
<p>3/ <?=$this->__('Enable the Prestashop extension in our extensions menu, and then fill in the following fields:')?></p>
|
239 |
+
</div>
|
240 |
+
<div id="1_step_block" <?php if(Mage::getSingleton("core/session")->getData("sd_is_user") == "no"){?> class="HIDDEN" <?php }?>>
|
241 |
+
<p><?=$this->__('Enable the Prestashop extension in our extensions menu, and then fill in the following fields:')?></p>
|
242 |
+
</div>
|
243 |
+
<form autocomplete="off" action="<?= Mage::helper('adminhtml')->getUrl("*/*/*/"); ?>#sd_step" method="post">
|
244 |
+
<div class="sd_key_container">
|
245 |
+
<p><?=$this->__('Url')?></p>
|
246 |
+
<input value="<?=Mage::getBaseUrl() ?>" onclick="this.select()" type="text" readonly />
|
247 |
+
</div>
|
248 |
+
<div class="sd_key_container">
|
249 |
+
<p><?=$this->__('Key')?></p>
|
250 |
+
<input value="<?=$key_for_synchronisation?>" onclick="this.select()" type="text" readonly />
|
251 |
+
</div>
|
252 |
+
<p class="sd_key_button_container">
|
253 |
+
<input type="hidden" name="submit_parameter_key" value="1" /> <input type="hidden" name="form_key" value="<?=$this->getFormKey()?>" /> <input type="submit" class="sd_key_button" value="<?=$this->__('Generate a new key')?>" />
|
254 |
+
</p>
|
255 |
+
</form>
|
256 |
+
</div>
|
257 |
+
<div class="sd_step_buttons">
|
258 |
+
<div class="sd_step_buttons_left">
|
259 |
+
<input type="button" onclick="sdDisplayStep(2)" value="<?=$this->__('Previous')?>" />
|
260 |
+
</div>
|
261 |
+
<div class="sd_step3_right">
|
262 |
+
<?=$this->__('Read more')?>, <a href="<?=$this->__('http://www.sarbacane.com/faq/extensions/configuration-plugin-prestashop/?utm_source=module-prestashop&utm_medium=plugin&utm_content=lien-sarbacane&utm_campaign=prestashop')?>" target="_blank"><?=$this->__('in the help section online')?></a>
|
263 |
+
</div>
|
264 |
+
</div>
|
265 |
+
</div>
|
266 |
+
</div>
|
app/etc/modules/Sarbacane_Mailify.xml
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* @category Sarbacane
|
17 |
+
* @package Sarbacane_Mailify
|
18 |
+
* @author Sarbacane Software <contact@sarbacane.com>
|
19 |
+
* @copyright 2015 Sarbacane Software
|
20 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
21 |
+
*/
|
22 |
+
-->
|
23 |
+
<config>
|
24 |
+
<modules>
|
25 |
+
<Sarbacane_Mailify>
|
26 |
+
<active>true</active>
|
27 |
+
<codePool>community</codePool>
|
28 |
+
</Sarbacane_Mailify>
|
29 |
+
</modules>
|
30 |
+
</config>
|
app/locale/en_US/Sarbacane_Mailify.csv
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"sarbacane","mailify"
|
2 |
+
"It's easy to manage your newsletter and email campaigns","It's easy to manage your newsletter and email campaigns"
|
3 |
+
"https://www.youtube.com/embed/eLMy2tSSYgE","https://www.youtube.com/embed/gUGRbfXOJIk"
|
4 |
+
"It's easy to manage your newsletter and email campaigns","It's easy to manage your newsletter and email campaigns"
|
5 |
+
"Begin the set-up","Begin the set-up"
|
6 |
+
"Synchronization of your shop data","Synchronization of your shop data"
|
7 |
+
"Responsive visual editor","Responsive visual editor"
|
8 |
+
"Detailed statistics","Detailed statistics"
|
9 |
+
"Optimal deliverability","Optimal deliverability"
|
10 |
+
"Synchronize and manage all the email lists from your Prestashop store","Synchronize and manage all the email lists from your Magento store"
|
11 |
+
"NEW! Create awesome, responsive newsletters thanks to the EmailBuilder","NEW! Create awesome, responsive newsletters thanks to the EmailBuilder"
|
12 |
+
"Geolocation, openings, opening time, clicks, opt-outs...","Geolocation, openings, opening time, clicks, opt-outs..."
|
13 |
+
"Optimal deliverability thanks to our renowned professional routing platform","Optimal deliverability thanks to our renowned professional routing platform"
|
14 |
+
"Create your account for free and start sending emails","Create your account for free and start sending emails"
|
15 |
+
"No strings attached","No strings attached"
|
16 |
+
"Why choose Sarbacane?","Why choose Mailify?"
|
17 |
+
"Create your account for free and start sending emails,"
|
18 |
+
"Trusted by over 20,000 users worldwide.","Trusted by over 20,000 users worldwide."
|
19 |
+
"Awarded Best Emailing Solution by Bsoco Awards (an index that compares emailing solutions)","Awarded Best Emailing Solution by Bsoco Awards (an index that compares emailing solutions)"
|
20 |
+
"All you need to succeed: design, customize, send, and follow-up on your campaigns","All you need to succeed: design, customize, send, and follow-up on your campaigns"
|
21 |
+
"A tech heldpdesk and a variety of resources to help: videos, tutorials, manuals, tips...","A tech heldpdesk and a variety of resources to help: videos, tutorials, manuals, tips..."
|
22 |
+
"Need help?","Need help?"
|
23 |
+
"Email:","Email:"
|
24 |
+
"support@sarbacane.com","help@mailify.com"
|
25 |
+
"Tel:","Tel:"
|
26 |
+
"+33(0) 328 328 040","(646)-844-0983"
|
27 |
+
"Website:","Website : "
|
28 |
+
"http://www.sarbacane.com/?utm_source=module-prestashop&utm_medium=plugin&utm_content=lien-sarbacane&utm_campaign=prestashop","http://www.mailify.com/?lng=EN&utm_source=module-prestashop&utm_medium=plugin&utm_content=lien-sarbacane&utm_campaign=prestashop"
|
29 |
+
"http://www.sarbacane.com","http://www.mailify.com"
|
30 |
+
"How to set up the module?","How to set up the module?"
|
31 |
+
"Do you already have a Sarbacane Desktop account?","Do you already have a Mailify account?"
|
32 |
+
"Yes","Yes"
|
33 |
+
"No","No"
|
34 |
+
"Next","Next"
|
35 |
+
"Select your shop and pick your settings","Select your shop and pick your settings"
|
36 |
+
"Create a list in Sarbacane Desktop with newsletter opt-ins","Create a list in Mailify with newsletter opt-ins"
|
37 |
+
"Create a list in Sarbacane Desktop with your clients who have an account or who have placed an order online","Create a list in Mailify with your clients who have an account or who have placed an order online"
|
38 |
+
"Add order data (date, amount, etc...)","Add order data (date, amount, etc...)"
|
39 |
+
"As you enable data from orders, you can also gather extra info in your contact list, and target your recipients in Sarbacane Desktop.","As you enable data from orders, you can also gather extra info in your contact list, and target your recipients in Mailify."
|
40 |
+
"Below are pieces of information that will be added to your contact list:","Below are pieces of information that will be added to your contact list:"
|
41 |
+
"- Date of first order","- Date of first order"
|
42 |
+
"- Date of latest order","- Date of latest order"
|
43 |
+
"- Total number of orders","- Total number of orders"
|
44 |
+
"- Total amount of orders","- Total amount of orders"
|
45 |
+
"- Amount of the cheapest order","- Amount of the cheapest order"
|
46 |
+
"- Amount of the most expensive order","- Amount of the most expensive order"
|
47 |
+
"- Average amount of the orders placed","- Average amount of the orders placed"
|
48 |
+
"Previous","Previous"
|
49 |
+
"Download and install Sarbacane","Download and install Mailify"
|
50 |
+
"https://www.sarbacane.com/ws/soft-redirect.asp?key=heXmrxBEUO&com=PrestaShopInfo","https://static.mailify.com/ws/soft-redirect.asp?key=heXmrxBEUO&com=PrestaShopInfo&lng=EN"
|
51 |
+
"Create your free account","Create your free account"
|
52 |
+
"Enable the Prestashop extension in our extensions menu, and then fill in the following fields:","Enable the Prestashop extension in our extensions menu, and then fill in the following fields:"
|
53 |
+
"Url","Url"
|
54 |
+
"Key","Key"
|
55 |
+
"Generate a new key","Generate a new key"
|
56 |
+
"Read more","Read more"
|
57 |
+
"http://www.sarbacane.com/faq/extensions/configuration-plugin-prestashop/?utm_source=module-prestashop&utm_medium=plugin&utm_content=lien-sarbacane&utm_campaign=prestashop","http://www.mailify.com/faq/extensions/configuration-prestashop/?lng=EN&utm_source=module-prestashop&utm_medium=plugin&utm_content=lien-sarbacane&utm_campaign=prestashop"
|
58 |
+
"in the help section online","in the help section online"
|
app/locale/es_ES/Sarbacane_Mailify.csv
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"sarbacane","mailify"
|
2 |
+
"It's easy to manage your newsletter and email campaigns","Gestiona tus newsletters y emailing con facilidad"
|
3 |
+
"https://www.youtube.com/embed/eLMy2tSSYgE","https://www.youtube.com/embed/ADeyEs4FdGY"
|
4 |
+
"This Prestashop module enables you to synchronize clients and accounts that have subscribed to your newsletter from your shop online using Sarbacane Desktop's email marketing software.","Este módulo Prestashop permite sincronizar los clientes, cuentas y altas en la newsletter de tu tienda online con la aplicación de mailing Mailify, y disfrutar de innumerables características..."
|
5 |
+
"Begin the set-up","Iniciar configuración"
|
6 |
+
"Synchronization of your shop data","Datos de la tienda sincronizados"
|
7 |
+
"Responsive visual editor","Editor gráfico responsive"
|
8 |
+
"Detailed statistics","Estadísticas detalladas"
|
9 |
+
"Optimal deliverability","Entregabilidad óptima"
|
10 |
+
"Synchronize and manage all the email lists from your Prestashop store","Sincronizar y administrar todas las listas de emails de tu tienda Magento"
|
11 |
+
"NEW! Create awesome, responsive newsletters thanks to the EmailBuilder","¡NUEVO! Crea plantillas de newsletter impresionantes con el EmailBuilder"
|
12 |
+
"Geolocation, openings, opening time, clicks, opt-outs...","Geolocalización, aperturas, tiempos de lectura, clics, bajas,..."
|
13 |
+
"Optimal deliverability thanks to our renowned professional routing platform","Entregabilidad optimizada gracias a nuestra reconocida plataforma de enrutamiento profesional"
|
14 |
+
"Create your account for free and start sending emails","Creación de cuenta y primeros envíos gratuitos"
|
15 |
+
"No strings attached","Oferta sin compromisos"
|
16 |
+
"Why choose Sarbacane?","¿Por qué elegir Mailify?"
|
17 |
+
"Create your account for free and start sending emails,"
|
18 |
+
"Trusted by over 20,000 users worldwide.","Más de 20.000 usuarios en España y Francia están encantados por Mailify"
|
19 |
+
"Awarded Best Emailing Solution by Bsoco Awards (an index that compares emailing solutions)","Elegidos como Mejor Solución de Emailing por los Premios Bsoco"
|
20 |
+
"All you need to succeed: design, customize, send, and follow-up on your campaigns","Todo lo que necesitas para tener éxito: diseño, personalización, envío y seguimiento de tus campañas"
|
21 |
+
"A tech heldpdesk and a variety of resources to help: videos, tutorials, manuals, tips...","Soporte técnico y númerosos recursos para asistirte: videos, tutoriales, guías, consejos..."
|
22 |
+
"Need help?","¿Necesitas ayuda?"
|
23 |
+
"Email:","Email:"
|
24 |
+
"support@sarbacane.com","ayuda@mailify.com"
|
25 |
+
"Tel:","Tel:"
|
26 |
+
"+33(0) 328 328 040","+34 93 4763638"
|
27 |
+
"Website:","Web : "
|
28 |
+
"http://www.sarbacane.com/?utm_source=module-prestashop&utm_medium=plugin&utm_content=lien-sarbacane&utm_campaign=prestashop","http://es.mailify.com/?lng=ES&utm_source=module-prestashop&utm_medium=plugin&utm_content=lien-sarbacane&utm_campaign=prestashop"
|
29 |
+
"http://www.sarbacane.com","http://es.mailify.com"
|
30 |
+
"How to set up the module?","¿Cómo configurar el módulo?"
|
31 |
+
"Do you already have a Sarbacane Desktop account?","¿Ya eres usuario Mailify?"
|
32 |
+
"Yes","Sí"
|
33 |
+
"No","No"
|
34 |
+
"Next","Siguiente"
|
35 |
+
"Select your shop and pick your settings","Selecciona tu tienda y la configuración deseada"
|
36 |
+
"Create a list in Sarbacane Desktop with newsletter opt-ins","Crea una lista de suscriptores en Mailify"
|
37 |
+
"Create a list in Sarbacane Desktop with your clients who have an account or who have placed an order online","Crea una lista con tus clientes en Mailify"
|
38 |
+
"Add order data (date, amount, etc...)","Añade información de pedidos (fecha, importe, etc.) "
|
39 |
+
"As you enable data from orders, you can also gather extra info in your contact list, and target your recipients in Sarbacane Desktop.","Al activar los datos de pedidos, puede recuperar un cierto número de información adicional de su lista de contactos, y realizar los filtros directamente en Mailify."
|
40 |
+
"Below are pieces of information that will be added to your contact list:","Aquí está la información que se añadirá en su lista de contactos:"
|
41 |
+
"- Date of first order","- Fecha del primer pedido"
|
42 |
+
"- Date of latest order","- Fecha del último pedido"
|
43 |
+
"- Total number of orders","- Número total de pedidos"
|
44 |
+
"- Total amount of orders","- Importe total de pedidos"
|
45 |
+
"- Amount of the cheapest order","- Importe de pedido más bajo"
|
46 |
+
"- Amount of the most expensive order","- Importe de pedido más alto"
|
47 |
+
"- Average amount of the orders placed","- Importe medio de pedidos"
|
48 |
+
"Previous","Anterior"
|
49 |
+
"Download and install Sarbacane","Descarga e instala Mailify"
|
50 |
+
"https://www.sarbacane.com/ws/soft-redirect.asp?key=heXmrxBEUO&com=PrestaShopInfo","https://static.mailify.com/ws/soft-redirect.asp?key=heXmrxBEUO&com=PrestaShopInfo&lng=ES"
|
51 |
+
"Create your free account","Crea tu cuenta gratis"
|
52 |
+
"Enable the Prestashop extension in our extensions menu, and then fill in the following fields:","Activa la extensión Magento desde el menú ''Extensiones'' en Mailify e introduce los siguientes datos:"
|
53 |
+
"Url","Url"
|
54 |
+
"Key","Clave"
|
55 |
+
"Generate a new key","Generar una nueva clave"
|
56 |
+
"Read more","Leer más en la"
|
57 |
+
"http://www.sarbacane.com/faq/extensions/configuration-plugin-prestashop/?utm_source=module-prestashop&utm_medium=plugin&utm_content=lien-sarbacane&utm_campaign=prestashop","https://es.mailify.com/faq/herramientas-analisis-email-marketing/configurar-plugin-prestashop/?lng=ES&utm_source=module-prestashop&utm_medium=plugin&utm_content=lien-sarbacane&utm_campaign=prestashop"
|
58 |
+
"in the help section online","ayuda en línea"
|
package.xml
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Sarbacane_Mailify</name>
|
4 |
+
<version>1.0.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://www.opensource.org/licenses/academic.php">AFL</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary> The extension synchronizes your e-shop Magento and the emailing solution software Sarbacane Desktop </summary>
|
10 |
+
<description><i>With Sarbacane Desktop, easily create and send stunning newsletters to inform your community and increase customer loyalty.</i>
|
11 |
+
<br />
|
12 |
+
<h2>Merchant Benefits</h2>
|
13 |
+

|
14 |
+
<p><b>Easy : </b>Simply create beautiful responsive newsletters thanks to the EmailBuilder</p>
|
15 |
+

|
16 |
+
<p><b>Optimal deliverability : </b>Your customers really receive your emails</p>
|
17 |
+

|
18 |
+
<p><b>Advanced Features : </b>Targeting, segmentation, Split test...</p>
|
19 |
+

|
20 |
+
<p><b>Support : </b>Technical support available to help you and many online resources: videos, tutorials, guides, tips, etc.</p>
|
21 |
+

|
22 |
+
<h2>Features</h2>
|
23 |
+

|
24 |
+
<p>Sarbacane Desktop is a complete solution for emailing, <b>affordable for begginners and complete for experts.</b></p>
|
25 |
+

|
26 |
+
<ul>
|
27 |
+
<li>Store data synchronized in real time, no need to export manually</li>
|
28 |
+
<li>Hundreds of free responsive templates to use and customize in the new EmailBuilder. <b>You create your email in a few clicks ! </b></li>
|
29 |
+
<li>Deliverability optimized through our routing platform known to all Internet service providers and Webmails.</li>
|
30 |
+
<li>A / B testing, programmable emailing, 1-click preview in more than 20 email clients.</li>
|
31 |
+
<li>Every element of your message is customizable with the data of your contact database: name, address, city, etc.</li>
|
32 |
+
<li>Ability to target contacts according to their orders data for more effective campaigns</li>
|
33 |
+
<li>Detailed statistics, geolocation, detection of openings, opening time, clicks, type of messaging, churn, incorrect addresses, etc.</li>
|
34 |
+
</ul>
|
35 |
+
<hr />
|
36 |
+
<i>Avec Sarbacane Desktop, créez et envoyez simplement de superbes newsletters pour informer et fidéliser vos clients.</i>
|
37 |
+
<br />
|
38 |
+
<h2>Les &quot;+&quot; pour vous</h2>
|
39 |
+

|
40 |
+
<p><b>Simplicité : </b>Créez simplement de superbes newsletters responsive grâce à l'EmailBuilder.</p>
|
41 |
+

|
42 |
+
<p><b>Délivrabilité optimale : </b>Vos clients reçoivent vraiment vos emails.</p>
|
43 |
+

|
44 |
+
<p><b>Fonctionnalités avancées : </b>ciblage, segmentation, Split test etc.</p>
|
45 |
+

|
46 |
+
<p><b>Accompagnement : </b>Un support technique à votre écoute et de nombreuses ressources en ligne : vidéos, tutoriels, guides, conseils ...</p>
|
47 |
+

|
48 |
+
<h2>Fonctionnalités</h2>
|
49 |
+

|
50 |
+
<p>Sarbacane Desktop est une solution complète pour l'emailing, <b>abordable pour les débutants et complète pour les experts.</b></p>
|
51 |
+

|
52 |
+
<ul>
|
53 |
+
<li>Données de boutique synchronisées en temps réel, pas besoin d'exporter manuellement.</li>
|
54 |
+
<li>Des centaines de modèles responsives gratuits à utiliser et personnaliser dans l'EmailBuilder nouvelle génération. <b>Vous créez votre email en quelques clics ! </b></li>
|
55 |
+
<li>Délivrabilité optimisée grâce à notre plateforme de routage reconnue auprès de l'ensemble des fournisseurs d'accès Internet et grands webmails.</li>
|
56 |
+
<li>Tests A/B, envois programmables, prévisualisation dans plus de 20 messageries en 1 clic.</li>
|
57 |
+
<li>Chaque élément de votre message est personnalisable avec les données présentes dans votre base de contacts : prénom, nom, ville, ...</li>
|
58 |
+
<li>Possibilité de cibler et exploiter les contacts en fonction de leurs données de commandes pour des campagnes plus efficaces</li>
|
59 |
+
<li>Statistiques détaillées, géolocalisation, détection des ouvertures, temps d'ouvertures, clics, type de messageries, désabonnements, adresses erronnées, etc.</li>
|
60 |
+
</ul></description>
|
61 |
+
<notes>First release of this connector for Mailify.
|
62 |
+

|
63 |
+
It allows you to synchronize all your shop data into Mailify</notes>
|
64 |
+
<authors><author><name>Sarbacane Software</name><user>egavard</user><email>connectors@sarbacane.com</email></author></authors>
|
65 |
+
<date>2015-05-20</date>
|
66 |
+
<time>11:20:07</time>
|
67 |
+
<contents><target name="magecommunity"><dir name="Sarbacane"><dir name="Mailify"><dir name="Block"><dir name="Adminhtml"><file name="Mailify.php" hash="f0ad71d64dc619421a67a3af24b23278"/></dir></dir><dir name="Helper"><file name="Data.php" hash="0209b2a9566288c2b030552d8bb2d85b"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="MailifyController.php" hash="a9088e5aab6fbaef8daa9b0f9aac663d"/></dir><file name="IndexController.php" hash="cfe3cd3960333e32e298aa0324543b88"/></dir><dir name="etc"><file name="config.xml" hash="f1170aa559d1d6ceef7f4ebf22fc8ce8"/></dir><dir name="sql"><dir name="mailify_setup"><file name="mysql4-install-1.0.0.0.php" hash="82834af7ce95c1bd9d3063ffdf3a11f5"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="css"><dir name="Sarbacane_Mailify"><file name="mailify.css" hash="6fcee54bdab10db72a361ec5a139cc7c"/></dir></dir><dir name="images"><file name="sd.png" hash="2038d3c503e8f59d14177a131bef7537"/></dir><dir name="js"><dir name="Sarbacane_Mailify"><file name="mailify.js" hash="d38d9ec858dfdce14e0156acc87c1c50"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="mailify.xml" hash="2ce0ac9b7cd4ec8adf80494c86aaae10"/></dir><dir name="template"><dir name="mailify"><file name="mailify.phtml" hash="01ed4cea3b25957dbfbb2ad3e99c41e8"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="app"><dir name="etc"><dir name="modules"><file name="Sarbacane_Mailify.xml" hash="daf2fd2fbde04d804b1fdd7671273c82"/></dir></dir></dir></target><target name="magelocale"><dir name="es_ES"><file name="Sarbacane_Mailify.csv" hash="8935ea92f97fa8f488ce2d6e22dcc1f6"/></dir><dir name="en_US"><file name="Sarbacane_Mailify.csv" hash="14e823bac27169a06084b0683ce8a01c"/></dir></target></contents>
|
68 |
+
<compatible/>
|
69 |
+
<dependencies><required><php><min>5.0.0</min><max>5.6.9</max></php></required></dependencies>
|
70 |
+
</package>
|
skin/adminhtml/default/default/css/Sarbacane_Mailify/mailify.css
ADDED
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Magento
|
3 |
+
*
|
4 |
+
* NOTICE OF LICENSE
|
5 |
+
*
|
6 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
7 |
+
* that is bundled with this package in the file LICENSE.txt.
|
8 |
+
* It is also available through the world-wide-web at this URL:
|
9 |
+
* http://opensource.org/licenses/afl-3.0.php
|
10 |
+
* If you did not receive a copy of the license and are unable to
|
11 |
+
* obtain it through the world-wide-web, please send an email
|
12 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
13 |
+
*
|
14 |
+
* @category Sarbacane
|
15 |
+
* @package Sarbacane_Sarbacanedesktop
|
16 |
+
* @author Sarbacane Software <contact@sarbacane.com>
|
17 |
+
* @copyright 2015 Sarbacane Software
|
18 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
#sarbacanedesktop{width:900px;margin:auto;overflow:hidden;padding-bottom:170px;}
|
22 |
+
#sarbacanedesktop *{font-size:13px;color:#4C5261;line-height:22px;}
|
23 |
+
#sarbacanedesktop p, #sarbacanedesktop form p{margin:0 0 8.5px;padding:0;}
|
24 |
+
#sarbacanedesktop a{color:#f06800;}
|
25 |
+
#sarbacanedesktop .sd_header{padding-top:20px;padding-bottom:20px;}
|
26 |
+
#sarbacanedesktop .sd_logo_sarbacane, #sarbacanedesktop .sd_logo_mailify, #sarbacanedesktop .sd_picto1, #sarbacanedesktop .sd_picto2, #sarbacanedesktop .sd_picto3, #sarbacanedesktop .sd_picto4, #sarbacanedesktop .sd_info_container_left > div > div > p, #sarbacanedesktop .sd_info_line,#sarbacanedesktop .sd_step_line, #sarbacanedesktop .sd_step2_info, #sarbacanedesktop .sd_info_container_right{background-repeat:no-repeat;background-image:url('../../images/sd.png');}
|
27 |
+
#sarbacanedesktop .sd_logo_sarbacane{margin:auto;width:318px;height:45px;background-position:-150px -99px;}
|
28 |
+
#sarbacanedesktop .sd_logo_mailify{margin:auto;width:192px;height:55px;background-position:-469px -98px;}
|
29 |
+
#sarbacanedesktop .sd_separator{border-top:1px solid #ebedf2;padding-bottom:5px;margin-top:5px;}
|
30 |
+
#sarbacanedesktop .sd_title{font-size:23px;text-align:center;}
|
31 |
+
#sarbacanedesktop .sd_title_separator_page, #sarbacanedesktop .sd_title_separator_account_offer{border-top:2px solid #f06800;width:75px;margin:auto;}
|
32 |
+
#sarbacanedesktop .sd_title_separator_account_offer{margin-top:15px;padding-bottom:20px;}
|
33 |
+
#sarbacanedesktop .sd_title_separator_page{margin-top:25px;padding-bottom:35px;}
|
34 |
+
#sarbacanedesktop .sd_picto1, #sarbacanedesktop .sd_picto2, #sarbacanedesktop .sd_picto3, #sarbacanedesktop .sd_picto4{width:72px;height:72px;margin-bottom:20px;}
|
35 |
+
#sarbacanedesktop .sd_picto1{background-position: 0px 0px;}
|
36 |
+
#sarbacanedesktop .sd_picto2{background-position: -73px 0px;}
|
37 |
+
#sarbacanedesktop .sd_picto3{background-position: 0px -73px;}
|
38 |
+
#sarbacanedesktop .sd_picto4{background-position: -73px -73px;}
|
39 |
+
#sarbacanedesktop .sd_long_subtitle{font-size:16px;width:150px;}
|
40 |
+
#sarbacanedesktop .sd_short_subtitle{font-size:16px;width:120px;}
|
41 |
+
#sarbacanedesktop .sd_subtitle_separator{border-top:2px solid #f06800;width:75px;margin-top:15px;padding-bottom:20px;}
|
42 |
+
#sarbacanedesktop .sd_video_config_container{overflow:hidden;padding-bottom:10px;}
|
43 |
+
#sarbacanedesktop .sd_video_container{float:left;width:610px;}
|
44 |
+
#sarbacanedesktop .sd_config_container{float:left;width:270px;}
|
45 |
+
#sarbacanedesktop .sd_config_container p{font-weight:bold;font-size:15px;line-height:25px;}
|
46 |
+
#sarbacanedesktop .sd_config_container .sd_config_button{display:block;padding:7px;width:100%;background:#78a13a;text-align:center;cursor:pointer;margin-top:20px;color:white;text-decoration:none;border:none;}
|
47 |
+
#sarbacanedesktop .sd_detail_description_container{overflow:hidden;padding-bottom:55px;padding-top:25px;}
|
48 |
+
#sarbacanedesktop .sd_detail_description_container > div{overflow:hidden;}
|
49 |
+
#sarbacanedesktop .sd_detail_description_container > div > div{float:left;width:225px;}
|
50 |
+
#sarbacanedesktop .sd_detail_description_container > div > div > div{padding:0px 15px;}
|
51 |
+
#sarbacanedesktop p.sd_info_title{font-weight:bold;font-size:15px;padding-bottom:10px;}
|
52 |
+
#sarbacanedesktop .sd_info_container{overflow:hidden;padding-top:30px;}
|
53 |
+
#sarbacanedesktop .sd_info_container *{font-size:14px;}
|
54 |
+
#sarbacanedesktop .sd_info_container_left{float:left;width:620px;}
|
55 |
+
#sarbacanedesktop .sd_info_container_right{float:left;width:270px;background-position:-678px -101px;}
|
56 |
+
#sarbacanedesktop .sd_info_container_left > div{padding:0px 30px;}
|
57 |
+
#sarbacanedesktop .sd_info_container_right > div{padding-left:30px;}
|
58 |
+
#sarbacanedesktop .sd_info_container_left > div > div > p{padding-left:35px;background-position:-680px -50px;}
|
59 |
+
#sarbacanedesktop .sd_account_offer_container{padding-top:60px;}
|
60 |
+
#sarbacanedesktop .sd_account{color:#5b8217;font-weight:bold;font-size:19px;text-align:center;}
|
61 |
+
#sarbacanedesktop .sd_offer{text-transform:uppercase;font-weight:bold;text-align:center;color:#9c9898;font-size:14px;}
|
62 |
+
#sarbacanedesktop #sd_step{height:100px;}
|
63 |
+
#sarbacanedesktop .sd_step{background:#404040;padding-top:50px;display:none;}
|
64 |
+
#sarbacanedesktop .sd_show_step{display:block;}
|
65 |
+
#sarbacanedesktop .sd_step *{color:white;}
|
66 |
+
#sarbacanedesktop .sd_step .sd_step_buttons a {color: #f06800;text-decoration:underline;}
|
67 |
+
#sarbacanedesktop .sd_step_title{font-size:28px;text-align:center;}
|
68 |
+
#sarbacanedesktop .sd_step_line{width:529px;height:32px;margin:auto;margin-top:55px;margin-bottom:30px;}
|
69 |
+
#sarbacanedesktop #sd_step1 .sd_step_line{background-position:-147px 2px;}
|
70 |
+
#sarbacanedesktop #sd_step2 .sd_step_line{background-position:-147px -30px;}
|
71 |
+
#sarbacanedesktop #sd_step3 .sd_step_line{background-position:-147px -61px;}
|
72 |
+
#sarbacanedesktop .sd_step_buttons{background:#363636;padding:15px;overflow:hidden;}
|
73 |
+
#sarbacanedesktop .sd_step_buttons_left{float:left;width:340px;text-align:left;}
|
74 |
+
#sarbacanedesktop .sd_step_buttons_right{float:right;width:340px;text-align:right;}
|
75 |
+
#sarbacanedesktop .sd_step3_right{float:right;width:340px;text-align:right;padding-top:10px;}
|
76 |
+
#sarbacanedesktop .sd_step_buttons input[type="button"], #sarbacanedesktop .sd_step_buttons input[type="submit"], #sarbacanedesktop input[type="submit"].sd_key_button,.sd_button{color:white;padding:10px 20px;border:none;cursor:pointer;}
|
77 |
+
#sarbacanedesktop .sd_step_buttons .sd_step_buttons_left input[type="button"], #sarbacanedesktop input[type="submit"].sd_key_button{background:#808080;}
|
78 |
+
#sarbacanedesktop .sd_step_buttons .sd_step_buttons_right input[type="submit"],.sd_button{background:#78a13a;}
|
79 |
+
#sarbacanedesktop .sd_step1_instruction, #sarbacanedesktop .sd_step2_instruction{font-size:16px;text-align:center;}
|
80 |
+
#sarbacanedesktop .sd_step1_selection{padding:10px 0px;text-align:center;}
|
81 |
+
#sarbacanedesktop .sd_step1_selection span{padding:0 20px;}
|
82 |
+
#sarbacanedesktop .sd_step1_selection label{font-size:16px;font-weight:normal;}
|
83 |
+
#sarbacanedesktop .sd_step1_button{visibility:hidden;}
|
84 |
+
#sarbacanedesktop .sd_step2_selection{padding-bottom:45px;}
|
85 |
+
#sarbacanedesktop .sd_step2_selection_list{width:530px;margin:auto;}
|
86 |
+
#sarbacanedesktop .sd_step2_selection_shop_title{font-size:16px;padding-top:20px;padding-bottom:5px;border-bottom:1px solid #636363;}
|
87 |
+
#sarbacanedesktop .sd_step2_selection_shop{overflow:hidden;padding:3px 0px;}
|
88 |
+
#sarbacanedesktop .sd_step2_selection_shop_option{overflow:hidden;padding-left:25px;}
|
89 |
+
#sarbacanedesktop .sd_step2_selection_shop_option .sd_step2_selection_shop_text{float:left;width:auto;}
|
90 |
+
#sarbacanedesktop .sd_step2_info{float:left;width:19px;height:19px;margin-left:10px;cursor:pointer;background-position:-682px 0;}
|
91 |
+
#sarbacanedesktop .sd_step2_selection_shop_input{float:left;width:25px;}
|
92 |
+
#sarbacanedesktop .sd_step2_selection_shop_text{float:left;width:475px;}
|
93 |
+
#sarbacanedesktop .sd_step3_instruction{width:750px;margin:auto;}
|
94 |
+
#sarbacanedesktop .sd_step3_instruction a{text-decoration:underline;}
|
95 |
+
#sarbacanedesktop .sd_step3_instruction .sd_key_button_container{text-align:right;padding-top:30px;padding-bottom:50px;}
|
96 |
+
#sarbacanedesktop .sd_step3_instruction p, #sarbacanedesktop .sd_step3_instruction a{font-size:16px;}
|
97 |
+
#sarbacanedesktop .sd_key_container{padding-top:15px;}
|
98 |
+
#sarbacanedesktop .sd_key_container input{cursor:auto;color:black;width:732px;line-height:35px;height:35px;background-color:#dff0d8;border:1px solid #5aab13;padding:0px 8px;border-radius:0px;box-sizing:content-box;box-shadow:none;}
|
99 |
+
#sarbacanedesktop label{width:auto;padding:0;float:none;margin:0;display:inline;text-shadow:none;}
|
100 |
+
#sarbacanedesktop input{vertical-align:baseline;margin:0;padding:0;}
|
101 |
+
#sarbacanedesktop .sd_tooltip{position:relative;display:none;}
|
102 |
+
#sarbacanedesktop .sd_tooltip_show{display:block;}
|
103 |
+
#sarbacanedesktop .sd_tooltip *{font-size:11px;line-height:13px;}
|
104 |
+
#sarbacanedesktop .sd_tooltip div{background:#858585;border:1px solid white;position:absolute;right:15px;width:360px;bottom:25px;padding:20px;}
|
105 |
+
.HIDDEN{
|
106 |
+
display:none;
|
107 |
+
}
|
skin/adminhtml/default/default/images/sd.png
ADDED
Binary file
|
skin/adminhtml/default/default/js/Sarbacane_Mailify/mailify.js
ADDED
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Magento
|
3 |
+
*
|
4 |
+
* NOTICE OF LICENSE
|
5 |
+
*
|
6 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
7 |
+
* that is bundled with this package in the file LICENSE.txt.
|
8 |
+
* It is also available through the world-wide-web at this URL:
|
9 |
+
* http://opensource.org/licenses/afl-3.0.php
|
10 |
+
* If you did not receive a copy of the license and are unable to
|
11 |
+
* obtain it through the world-wide-web, please send an email
|
12 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
13 |
+
*
|
14 |
+
* @category Sarbacane
|
15 |
+
* @package Sarbacane_Sarbacanedesktop
|
16 |
+
* @author Sarbacane Software <contact@sarbacane.com>
|
17 |
+
* @copyright 2015 Sarbacane Software
|
18 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
function changeOptionOrdersData(id_shop_c, value) {
|
22 |
+
if(value == true) {
|
23 |
+
document.getElementById('id_shop_' + id_shop_c).value=id_shop_c + '1';
|
24 |
+
}
|
25 |
+
else {
|
26 |
+
document.getElementById('id_shop_' + id_shop_c).value=id_shop_c + '0';
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
+
function changeOptionOrdersDataDisplay(id_shop_c, value) {
|
31 |
+
if(value == true) {
|
32 |
+
document.getElementById('customer_data_' + id_shop_c).disabled=false;
|
33 |
+
document.getElementById('id_shop_' + id_shop_c).value=id_shop_c + '0';
|
34 |
+
|
35 |
+
}
|
36 |
+
else {
|
37 |
+
document.getElementById('id_shop_' + id_shop_c).value='';
|
38 |
+
document.getElementById('customer_data_' + id_shop_c).disabled=true;
|
39 |
+
document.getElementById('customer_data_' + id_shop_c).checked=false;
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
function sdUserYesNoDisplayButton(user_selection) {
|
44 |
+
Element.removeClassName("sd_step1 .sd_button","sd_step1_button");
|
45 |
+
}
|
46 |
+
|
47 |
+
function sdDisplayStep(step) {
|
48 |
+
var otherSteps = $$(".sd_step");
|
49 |
+
if(otherSteps != null && otherSteps.length > 0 ){
|
50 |
+
otherSteps.each(function(item,i){
|
51 |
+
Element.removeClassName(item,"sd_show_step");
|
52 |
+
});
|
53 |
+
}
|
54 |
+
Element.addClassName("sd_step"+step,"sd_show_step");
|
55 |
+
window.location.href = '#sd_step';
|
56 |
+
}
|
57 |
+
|
58 |
+
function sdInfoDataOrdersHover(id_shop_c) {
|
59 |
+
Element.addClassName('sd_tooltip_' + id_shop_c,"sd_tooltip_show");
|
60 |
+
}
|
61 |
+
|
62 |
+
function sdInfoDataOrdersOut(id_shop_c) {
|
63 |
+
Element.removeClassName('sd_tooltip_' + id_shop_c,"sd_tooltip_show");
|
64 |
+
// $('#sd_tooltip_' + id_shop_c).removeClass('sd_tooltip_show');
|
65 |
+
}
|
66 |
+
|
67 |
+
function sdInfoDataOrdersClick(id_shop_c) {
|
68 |
+
Element.toggleClassName('sd_tooltip_' + id_shop_c,"sd_tooltip_show");
|
69 |
+
// $('#sd_tooltip_' + id_shop_c).toggleClass('sd_tooltip_show');
|
70 |
+
}
|
71 |
+
var isAlreadyUser = false;
|
72 |
+
function showStep2(){
|
73 |
+
if($(sd_user_click_yes).checked){
|
74 |
+
$(sd_step1).removeClassName("sd_show_step");
|
75 |
+
$(sd_step2).addClassName("sd_show_step");
|
76 |
+
$("3_step_block").hide();
|
77 |
+
isAlreadyUser = true;
|
78 |
+
}else{
|
79 |
+
if($(sd_user_click_no).checked){
|
80 |
+
$(sd_step1).removeClassName("sd_show_step");
|
81 |
+
$(sd_step2).addClassName("sd_show_step");
|
82 |
+
$("1_step_block").hide();
|
83 |
+
}else{
|
84 |
+
}
|
85 |
+
}
|
86 |
+
}
|
87 |
+
function showStep3(){
|
88 |
+
$(sd_step2).removeClassName("sd_show_step");
|
89 |
+
$(sd_step3).addClassName("sd_show_step");
|
90 |
+
if(isAlreadyUser){
|
91 |
+
$("3_step_block").hide();
|
92 |
+
}else{
|
93 |
+
$("1_step_block").hide();
|
94 |
+
}
|
95 |
+
}
|