Version Notes
Changelog:
- Bug fix on configuration settings introduced by version 1.5.2, please upgrade to this version
- Added some logging
Download this release
Release Info
Developer | Sevenlike |
Extension | MailUp |
Version | 1.5.3 |
Comparing to | |
See all releases |
Code changes from version 1.5.2 to 1.5.3
app/code/local/SevenLike/MailUp/Model/Observer.php
CHANGED
@@ -102,16 +102,16 @@ class SevenLike_MailUp_Model_Observer
|
|
102 |
));
|
103 |
$result = get_object_vars($result);
|
104 |
$xml = simplexml_load_string($result['ReportByUserResult']);
|
105 |
-
|
106 |
$stato_registrazione = (string)$xml->Canali->Email;
|
107 |
if ($stato_registrazione) {
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
}
|
114 |
-
|
115 |
return $this;
|
116 |
}
|
117 |
|
@@ -122,7 +122,7 @@ class SevenLike_MailUp_Model_Observer
|
|
122 |
|
123 |
$console = Mage::getStoreConfig('newsletter/mailup/url_console');
|
124 |
$listId = Mage::getStoreConfig('newsletter/mailup/list');
|
125 |
-
|
126 |
if(!class_exists(MailUpWsImport)) $MailUpWsImport = Mage::getModel('mailup/ws');
|
127 |
$wsImport = new MailUpWsImport();
|
128 |
$xmlString = $wsImport->GetNlList();
|
102 |
));
|
103 |
$result = get_object_vars($result);
|
104 |
$xml = simplexml_load_string($result['ReportByUserResult']);
|
105 |
+
|
106 |
$stato_registrazione = (string)$xml->Canali->Email;
|
107 |
if ($stato_registrazione) {
|
108 |
+
if ($stato_registrazione == "Iscritto") {
|
109 |
+
Mage::getModel('newsletter/subscriber')->loadByEmail($model->getEmail())->setStatus(Mage_Newsletter_Model_Subscriber::STATUS_SUBSCRIBED)->save();
|
110 |
+
} else {
|
111 |
+
Mage::getModel('newsletter/subscriber')->loadByEmail($model->getEmail())->setStatus(Mage_Newsletter_Model_Subscriber::STATUS_UNSUBSCRIBED)->save();
|
112 |
+
}
|
113 |
}
|
114 |
+
|
115 |
return $this;
|
116 |
}
|
117 |
|
122 |
|
123 |
$console = Mage::getStoreConfig('newsletter/mailup/url_console');
|
124 |
$listId = Mage::getStoreConfig('newsletter/mailup/list');
|
125 |
+
|
126 |
if(!class_exists(MailUpWsImport)) $MailUpWsImport = Mage::getModel('mailup/ws');
|
127 |
$wsImport = new MailUpWsImport();
|
128 |
$xmlString = $wsImport->GetNlList();
|
app/code/local/SevenLike/MailUp/Model/Wssend.php
CHANGED
@@ -39,16 +39,25 @@ class MailUpWsSend {
|
|
39 |
try {
|
40 |
//login with webservice user
|
41 |
$loginData = array ('user' => Mage::getStoreConfig('newsletter/mailup/username_ws'),
|
42 |
-
|
43 |
-
|
44 |
|
45 |
$result = get_object_vars($this->soapClient->LoginFromId($loginData));
|
46 |
$xml = simplexml_load_string($result['LoginFromIdResult']);
|
47 |
-
$
|
48 |
-
$errorDescription = $xml->errorDescription->__toString();
|
49 |
-
$accessKey = $xml->accessKey->__toString();
|
50 |
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
throw new Exception($errorDescription);
|
53 |
}
|
54 |
|
@@ -61,7 +70,7 @@ class MailUpWsSend {
|
|
61 |
Mage::log($e->getMessage(), 0);
|
62 |
return false;
|
63 |
}
|
64 |
-
|
65 |
|
66 |
public function GetFields($accessKey) {
|
67 |
$fields = null;
|
39 |
try {
|
40 |
//login with webservice user
|
41 |
$loginData = array ('user' => Mage::getStoreConfig('newsletter/mailup/username_ws'),
|
42 |
+
'pwd' => Mage::getStoreConfig('newsletter/mailup/password_ws'),
|
43 |
+
'consoleId' => substr(Mage::getStoreConfig('newsletter/mailup/username_ws'), 1));
|
44 |
|
45 |
$result = get_object_vars($this->soapClient->LoginFromId($loginData));
|
46 |
$xml = simplexml_load_string($result['LoginFromIdResult']);
|
47 |
+
Mage::log($xml, 0);
|
|
|
|
|
48 |
|
49 |
+
$errorCode = -1;
|
50 |
+
$errorDescription = 'No response from MailUp API';
|
51 |
+
|
52 |
+
foreach ($xml as $x) {
|
53 |
+
$errorCode = $x->errorCode;
|
54 |
+
$errorDescription = $x->errorDescription;
|
55 |
+
$accessKey = $x->accessKey;
|
56 |
+
}
|
57 |
+
|
58 |
+
if ($errorCode != 0) {
|
59 |
+
Mage::log($errorCode, 0);
|
60 |
+
Mage::log($errorDescription, 0);
|
61 |
throw new Exception($errorDescription);
|
62 |
}
|
63 |
|
70 |
Mage::log($e->getMessage(), 0);
|
71 |
return false;
|
72 |
}
|
73 |
+
}
|
74 |
|
75 |
public function GetFields($accessKey) {
|
76 |
$fields = null;
|
app/code/local/SevenLike/MailUp/etc/config.xml
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<config>
|
4 |
<modules>
|
5 |
<SevenLike_MailUp>
|
6 |
-
<version>1.5.
|
7 |
</SevenLike_MailUp>
|
8 |
</modules>
|
9 |
|
@@ -152,4 +152,4 @@
|
|
152 |
</sevenlike_mailup>
|
153 |
</jobs>
|
154 |
</crontab>
|
155 |
-
</config>
|
3 |
<config>
|
4 |
<modules>
|
5 |
<SevenLike_MailUp>
|
6 |
+
<version>1.5.3</version>
|
7 |
</SevenLike_MailUp>
|
8 |
</modules>
|
9 |
|
152 |
</sevenlike_mailup>
|
153 |
</jobs>
|
154 |
</crontab>
|
155 |
+
</config>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>MailUp</name>
|
4 |
-
<version>1.5.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/academic.php">Academic Free License (AFL)</license>
|
7 |
<channel>community</channel>
|
@@ -47,21 +47,13 @@
|
|
47 |
<p><br />Ad esempio un sito di ecommerce potrebbe alimentare il DB di MailUp con informazioni sugli acquisti e MailUp potr&agrave; quindi inviare, ad esempio dopo 7 giorni dall'acquisto, un messaggio di costumer satisfaction oppure l'invito ad acquistare un prodotto correlato.</p></description>
|
48 |
<notes>Changelog:<br />
|
49 |
<ul>
|
50 |
-
<li>
|
51 |
-
<li>
|
52 |
-
<
|
53 |
-
<li>Users' data uploading (to MailUp) process was rewritten for better performance</li>
|
54 |
-
<li>When a customer logs in Magento his subscription preference is automatically downloaded from MailUp</li>
|
55 |
-
<li>When a customer saves his Magento profile his subscription preference is automatically uploaded to MailUp</li>
|
56 |
-
<li>Italian translation was completed</li>
|
57 |
-
</ul>
|
58 |
-

|
59 |
-
<br /><br />
|
60 |
-
Note: you'll have to review your configuration right after updating the extension.</notes>
|
61 |
<authors><author><name>Sevenlike</name><user>sevenlike</user><email>moduli-magento@sevenlike.com</email></author></authors>
|
62 |
-
<date>2012-05-
|
63 |
-
<time>2012-05-
|
64 |
-
<contents><target name="magelocal"><dir name="SevenLike"><dir name="MailUp"><dir name="Block"><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir><dir name="Helper"><file name="Data.php" hash="a279a072c9df896abd5153789b500a5d"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Source"><dir name="Cron"><file name="Frequency.php" hash="57c892490ca67de41b2d5d4d043761b9"/><file name="Hours.php" hash="3f9ec0f1233b4468ed86b4eba050602e"/></dir></dir></dir></dir><file name="Cron.php" hash="bfcd480184d8c1f0553cdbcbb7015eb8"/><file name="Lists.php" hash="1032c009989f7050c271a16cb49f74df"/><file name="MailUp.php" hash="2829fb8a8ad6317ce5b2a28a2fe0149d"/><dir name="Mysql14"><dir name="MailUp"><file name="Collection.php" hash="1435c91e677f7b668079373599aae3eb"/></dir><file name="MailUp.php" hash="4e6e23f0eccdfe35776d1e8eab68692a"/></dir><file name="Observer.php" hash="
|
65 |
<compatible/>
|
66 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
67 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>MailUp</name>
|
4 |
+
<version>1.5.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/academic.php">Academic Free License (AFL)</license>
|
7 |
<channel>community</channel>
|
47 |
<p><br />Ad esempio un sito di ecommerce potrebbe alimentare il DB di MailUp con informazioni sugli acquisti e MailUp potr&agrave; quindi inviare, ad esempio dopo 7 giorni dall'acquisto, un messaggio di costumer satisfaction oppure l'invito ad acquistare un prodotto correlato.</p></description>
|
48 |
<notes>Changelog:<br />
|
49 |
<ul>
|
50 |
+
<li>Bug fix on configuration settings introduced by version 1.5.2, please upgrade to this version</li>
|
51 |
+
<li>Added some logging</li>
|
52 |
+
</ul></notes>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
<authors><author><name>Sevenlike</name><user>sevenlike</user><email>moduli-magento@sevenlike.com</email></author></authors>
|
54 |
+
<date>2012-05-31</date>
|
55 |
+
<time>2012-05-31</time>
|
56 |
+
<contents><target name="magelocal"><dir name="SevenLike"><dir name="MailUp"><dir name="Block"><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir><dir name="Helper"><file name="Data.php" hash="a279a072c9df896abd5153789b500a5d"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Source"><dir name="Cron"><file name="Frequency.php" hash="57c892490ca67de41b2d5d4d043761b9"/><file name="Hours.php" hash="3f9ec0f1233b4468ed86b4eba050602e"/></dir></dir></dir></dir><file name="Cron.php" hash="bfcd480184d8c1f0553cdbcbb7015eb8"/><file name="Lists.php" hash="1032c009989f7050c271a16cb49f74df"/><file name="MailUp.php" hash="2829fb8a8ad6317ce5b2a28a2fe0149d"/><dir name="Mysql14"><dir name="MailUp"><file name="Collection.php" hash="1435c91e677f7b668079373599aae3eb"/></dir><file name="MailUp.php" hash="4e6e23f0eccdfe35776d1e8eab68692a"/></dir><file name="Observer.php" hash="8882bcd505d163cd96c3e260494d7800"/><dir name="System"><dir name="Source"><dir name="Cron"><file name="Frequency.php" hash="0a9ee4aacdcf270eb192f5b32e1e4a26"/><file name="Hours.php" hash="029b0d2d998c7e246333ee7bff64661a"/></dir></dir></dir><file name="Ws.php" hash="c6968947b0950b52f0fbeeddf347ad8c"/><file name="Wssend.php" hash="6fab8a03bc2c81d67556ae543cd36fda"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="FieldsmappingController.php" hash="0e4ef6aca47bbbd1d1881ce02465a688"/><file name="FilterController.php" hash="732a732286d6679c90a49313a8ebb9c4"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir><dir name="etc"><file name="config.xml" hash="b60bcb53c2e654ff1cf8d005b313419b"/><file name="system.xml" hash="c9e10400e27057dacf2e3f9d18f6ed21"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir><dir name="sql"><dir name="mailup_setup"><file name="mysql4-install-0.1.0.php" hash="46770fc0e2204faeba2b82c975fc6fb8"/><file name="mysql4-upgrade-0.1.0-1.0.0.php" hash="8fb23d8f3c3d38661aa50697f23e98c7"/><file name="mysql4-upgrade-0.3.0-1.0.0.php" hash="89080c835857a5dd135da5608a77ced1"/><file name="mysql4-upgrade-1.0.0-1.5.2.php" hash="d88d151e34f9ddba5bdc7d8c8cc21f97"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="sevenlike"><dir name="mailup"><file name="confirm.phtml" hash="b6e4af2eb21000d218648abc3b2f7caf"/><file name="fieldsmapping.phtml" hash="6d31a300cf8774c94219a38b95635486"/><file name="filter.phtml" hash="8450f9d52e895e9a5171f2b4b4e3bfde"/></dir></dir></dir><dir name="layout"><file name="mailup.xml" hash="37a171055aedfb552cb261dede1e0037"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="SevenLike_MailUp.xml" hash="8377b55193e7524ca9572ed4dc2dca62"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="sevenlike"><dir name="mailup"><dir name="images"><file name="titoli.png" hash="95a7996cd77d3413fd048018095aec6e"/></dir><file name="mailup.css" hash="37febcfd87a78148d5962da507c62ecc"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="SevenLike_MailUp.csv" hash="7388cfb49cf963f78f59c24633027f67"/></dir><dir name="it_IT"><file name="SevenLike_MailUp.csv" hash="53b451a3b28669f6bebfa8f39e391302"/></dir></target></contents>
|
57 |
<compatible/>
|
58 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
59 |
</package>
|