Version Notes
Transnational emails fixed.
Security fixes
Download this release
Release Info
Developer | Campaign Monitor |
Extension | Campaignmonitor_Createsend |
Version | 1.0.6 |
Comparing to | |
See all releases |
Code changes from version 1.0.4 to 1.0.6
- app/code/community/Campaignmonitor/Createsend/Block/Linkedattributes.php +2 -1
- app/code/community/Campaignmonitor/Createsend/Model/Api.php +9 -1
- app/code/community/Campaignmonitor/Createsend/Model/Customer/Observer.php +4 -2
- app/code/community/Campaignmonitor/Createsend/Model/Email/Template.php +18 -4
- app/code/community/Campaignmonitor/Createsend/Model/List/Initial/Cron.php +1 -1
- app/code/community/Campaignmonitor/Createsend/etc/config.xml +1 -1
- package.xml +6 -5
app/code/community/Campaignmonitor/Createsend/Block/Linkedattributes.php
CHANGED
@@ -54,8 +54,9 @@ class Campaignmonitor_Createsend_Block_Linkedattributes extends Mage_Adminhtml_B
|
|
54 |
if ($columnName == 'magento') {
|
55 |
$rendered = '<select name="'.$inputName.'">';
|
56 |
foreach ($this->magentoOptions as $att => $name) {
|
57 |
-
$rendered .= '<option value="'.$att.'">'
|
58 |
}
|
|
|
59 |
$rendered .= '</select>';
|
60 |
} else {
|
61 |
return '<input type="text" name="' . $inputName . '" value="#{' . $columnName . '}" ' . ($column['size'] ? 'size="' . $column['size'] . '"' : '') . '/>';
|
54 |
if ($columnName == 'magento') {
|
55 |
$rendered = '<select name="'.$inputName.'">';
|
56 |
foreach ($this->magentoOptions as $att => $name) {
|
57 |
+
$rendered .= '<option value="'.$att.'">'. htmlspecialchars($name) .'</option>';
|
58 |
}
|
59 |
+
|
60 |
$rendered .= '</select>';
|
61 |
} else {
|
62 |
return '<input type="text" name="' . $inputName . '" value="#{' . $columnName . '}" ' . ($column['size'] ? 'size="' . $column['size'] . '"' : '') . '/>';
|
app/code/community/Campaignmonitor/Createsend/Model/Api.php
CHANGED
@@ -171,7 +171,13 @@ class Campaignmonitor_Createsend_Model_Api
|
|
171 |
|
172 |
try {
|
173 |
// Calculate whether the install has gift cards. if it doesn't, it's community.
|
174 |
-
$hasGiftcards =
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
if ($hasGiftcards) {
|
176 |
// Check whether the installation has the enterprise search observer. Only enterprise has this.
|
177 |
$hasSolr = Mage::getModel('enterprise_search/observer');
|
@@ -745,6 +751,8 @@ class Campaignmonitor_Createsend_Model_Api
|
|
745 |
$errors = array();
|
746 |
|
747 |
foreach ($linkedAttributes as $la) {
|
|
|
|
|
748 |
$magentoAtt = $la['magento'];
|
749 |
$cmAtt = $attrSource->getCustomFieldName($la['magento'], true);
|
750 |
$dataType = $attrSource->getFieldType($magentoAtt);
|
171 |
|
172 |
try {
|
173 |
// Calculate whether the install has gift cards. if it doesn't, it's community.
|
174 |
+
$hasGiftcards = false;
|
175 |
+
try {
|
176 |
+
$hasGiftcards = Mage::getModel('enterprise_giftcard/giftcard');
|
177 |
+
} catch (Exception $exception) {
|
178 |
+
|
179 |
+
}
|
180 |
+
|
181 |
if ($hasGiftcards) {
|
182 |
// Check whether the installation has the enterprise search observer. Only enterprise has this.
|
183 |
$hasSolr = Mage::getModel('enterprise_search/observer');
|
751 |
$errors = array();
|
752 |
|
753 |
foreach ($linkedAttributes as $la) {
|
754 |
+
|
755 |
+
$la['magento'] = htmlspecialchars( $la['magento'] );
|
756 |
$magentoAtt = $la['magento'];
|
757 |
$cmAtt = $attrSource->getCustomFieldName($la['magento'], true);
|
758 |
$dataType = $attrSource->getFieldType($magentoAtt);
|
app/code/community/Campaignmonitor/Createsend/Model/Customer/Observer.php
CHANGED
@@ -313,10 +313,10 @@ class Campaignmonitor_Createsend_Model_Customer_Observer
|
|
313 |
if (!empty($linkedAttributes)) {
|
314 |
if ($customer->getId()) {
|
315 |
$customerData = $customer->getData();
|
316 |
-
|
317 |
} else {
|
318 |
$customerData = array();
|
319 |
-
|
320 |
}
|
321 |
foreach ($linkedAttributes as $la) {
|
322 |
$magentoAtt = $la['magento'];
|
@@ -510,6 +510,8 @@ class Campaignmonitor_Createsend_Model_Customer_Observer
|
|
510 |
}
|
511 |
}
|
512 |
|
|
|
|
|
513 |
// Clear out other items, if any
|
514 |
for ($i = $count + 1; $i <= $maxWishlistItems; $i++) {
|
515 |
foreach ($productAttributes as $pa) {
|
313 |
if (!empty($linkedAttributes)) {
|
314 |
if ($customer->getId()) {
|
315 |
$customerData = $customer->getData();
|
316 |
+
|
317 |
} else {
|
318 |
$customerData = array();
|
319 |
+
|
320 |
}
|
321 |
foreach ($linkedAttributes as $la) {
|
322 |
$magentoAtt = $la['magento'];
|
510 |
}
|
511 |
}
|
512 |
|
513 |
+
Mage::log(print_r($customFields, true), null, 'customer.fields.log', true);
|
514 |
+
|
515 |
// Clear out other items, if any
|
516 |
for ($i = $count + 1; $i <= $maxWishlistItems; $i++) {
|
517 |
foreach ($productAttributes as $pa) {
|
app/code/community/Campaignmonitor/Createsend/Model/Email/Template.php
CHANGED
@@ -32,6 +32,8 @@ class Campaignmonitor_Createsend_Model_Email_Template extends Mage_Core_Model_Em
|
|
32 |
*/
|
33 |
public function send($email, $name = null, array $variables = array())
|
34 |
{
|
|
|
|
|
35 |
/** @var $helper Campaignmonitor_Createsend_Helper_Data */
|
36 |
$helper = Mage::helper("createsend");
|
37 |
|
@@ -69,7 +71,7 @@ class Campaignmonitor_Createsend_Model_Email_Template extends Mage_Core_Model_Em
|
|
69 |
'ReplyTo' => null,
|
70 |
'To' => null,
|
71 |
'CC' => null,
|
72 |
-
'BCC' =>
|
73 |
'Html' => '',
|
74 |
'Text' => '',
|
75 |
'Attachments' => null,
|
@@ -119,9 +121,9 @@ class Campaignmonitor_Createsend_Model_Email_Template extends Mage_Core_Model_Em
|
|
119 |
$this->_send($emailData, $variables);
|
120 |
$this->_mail = null;
|
121 |
} catch (Exception $e) {
|
122 |
-
|
123 |
-
|
124 |
-
return
|
125 |
}
|
126 |
|
127 |
return true;
|
@@ -169,6 +171,7 @@ class Campaignmonitor_Createsend_Model_Email_Template extends Mage_Core_Model_Em
|
|
169 |
*/
|
170 |
protected function _send(array $emailData, array $variables = array())
|
171 |
{
|
|
|
172 |
/** @var Campaignmonitor_Createsend_Helper_Data $helper */
|
173 |
$helper = Mage::helper('createsend');
|
174 |
|
@@ -197,8 +200,19 @@ class Campaignmonitor_Createsend_Model_Email_Template extends Mage_Core_Model_Em
|
|
197 |
$scopeId
|
198 |
);
|
199 |
|
|
|
|
|
|
|
200 |
if (!$result['success']) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
throw new Exception($result['data']['Message']);
|
|
|
202 |
}
|
203 |
}
|
204 |
}
|
32 |
*/
|
33 |
public function send($email, $name = null, array $variables = array())
|
34 |
{
|
35 |
+
|
36 |
+
|
37 |
/** @var $helper Campaignmonitor_Createsend_Helper_Data */
|
38 |
$helper = Mage::helper("createsend");
|
39 |
|
71 |
'ReplyTo' => null,
|
72 |
'To' => null,
|
73 |
'CC' => null,
|
74 |
+
'BCC' => $this->_bccEmails,
|
75 |
'Html' => '',
|
76 |
'Text' => '',
|
77 |
'Attachments' => null,
|
121 |
$this->_send($emailData, $variables);
|
122 |
$this->_mail = null;
|
123 |
} catch (Exception $e) {
|
124 |
+
|
125 |
+
Mage::log( sprintf(self::ERR_CANNOT_SEND_EMAIL, $e->getMessage()), null, 'campaignmonitor_createsend_email.log', true );
|
126 |
+
return parent::send($email, $name, $variables);
|
127 |
}
|
128 |
|
129 |
return true;
|
171 |
*/
|
172 |
protected function _send(array $emailData, array $variables = array())
|
173 |
{
|
174 |
+
|
175 |
/** @var Campaignmonitor_Createsend_Helper_Data $helper */
|
176 |
$helper = Mage::helper('createsend');
|
177 |
|
200 |
$scopeId
|
201 |
);
|
202 |
|
203 |
+
Mage::log( print_r($emailData,true), null, 'email.log', true );
|
204 |
+
Mage::log( print_r($result,true), null, 'email.log', true );
|
205 |
+
Mage::log( print_r($this->getData(),true), null, 'email2.log', true );
|
206 |
if (!$result['success']) {
|
207 |
+
$notice = 'Couldn\'t send email through campaign monitor but your email was sent through magento though';
|
208 |
+
|
209 |
+
if (!empty( $result['data'] )) {
|
210 |
+
$notice .= ' ';
|
211 |
+
$notice .= $result['data']['Message'];
|
212 |
+
}
|
213 |
+
Mage::getSingleton('core/session')->addNotice($notice);
|
214 |
throw new Exception($result['data']['Message']);
|
215 |
+
|
216 |
}
|
217 |
}
|
218 |
}
|
app/code/community/Campaignmonitor/Createsend/Model/List/Initial/Cron.php
CHANGED
@@ -51,7 +51,7 @@ class Campaignmonitor_Createsend_Model_List_Initial_Cron extends Campaignmonitor
|
|
51 |
);
|
52 |
}
|
53 |
|
54 |
-
|
55 |
// Check for stale process
|
56 |
if ($processData['status'] === $configHelper::FLAG_PROCESS_RUNNING) {
|
57 |
$startDate = new DateTime($processData['start']);
|
51 |
);
|
52 |
}
|
53 |
|
54 |
+
|
55 |
// Check for stale process
|
56 |
if ($processData['status'] === $configHelper::FLAG_PROCESS_RUNNING) {
|
57 |
$startDate = new DateTime($processData['start']);
|
app/code/community/Campaignmonitor/Createsend/etc/config.xml
CHANGED
@@ -19,7 +19,7 @@
|
|
19 |
<config>
|
20 |
<modules>
|
21 |
<Campaignmonitor_Createsend>
|
22 |
-
<version>1.0.
|
23 |
</Campaignmonitor_Createsend>
|
24 |
</modules>
|
25 |
<adminhtml>
|
19 |
<config>
|
20 |
<modules>
|
21 |
<Campaignmonitor_Createsend>
|
22 |
+
<version>1.0.6</version>
|
23 |
</Campaignmonitor_Createsend>
|
24 |
</modules>
|
25 |
<adminhtml>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Campaignmonitor_Createsend</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="https://opensource.org/licenses/OSL-3.0">OSL</license>
|
7 |
<channel>community</channel>
|
@@ -18,13 +18,14 @@ Research shows that personalized, relevant email marketing campaigns have at lea
|
|
18 |
- Celebrate an important date, such as a birthday<br /><br />
|
19 |

|
20 |
Campaign Monitor makes it easy for you to get started by automatically creating segments for you based on what we’ve found to be the most actionable audiences in Magento. Use these segments to automate marketing campaigns.</description>
|
21 |
-
<notes>
|
|
|
22 |

|
23 |
</notes>
|
24 |
<authors><author><name>Campaign Monitor</name><user>CampaignMonitor</user><email>vibhor@campaignmonitor.com</email></author></authors>
|
25 |
-
<date>2016-
|
26 |
-
<time>
|
27 |
-
<contents><target name="magecommunity"><dir name="Campaignmonitor"><dir name="Createsend"><dir name="Block"><dir name="Adminhtml"><dir name="Customer"><dir name="Edit"><file name="Grid.php" hash="48e28e2303623522c1a29365b94744df"/></dir></dir><dir name="Email"><file name="Grid.php" hash="1693e7a7d2dd6eaf024ed6dda06dafd0"/><dir name="View"><file name="Abstract.php" hash="480c6ac7134e47bf43c4fd6a3213b3c7"/><file name="Form.php" hash="5661cfe457e8526b2c47313fc264cd55"/><dir name="Tab"><file name="Clicks.php" hash="42f4a1ba85451b34617eeecd4a4a34d3"/><file name="Details.php" hash="2b8a673ccbbf0172c6d750259724c910"/><file name="Html.php" hash="ab99f5396dd23e2c874bdcbea2c9f064"/><file name="Opens.php" hash="5c7c80be07535869099b9adb35d4b5a1"/><file name="Text.php" hash="8448dd4755d6b0fac8136188a4259e95"/></dir><file name="Tabs.php" hash="ab071552f0a18c06f6c6b5deba46ad39"/></dir><file name="View.php" hash="da2d91894a55ff5dadcc3052f76ea4a2"/></dir><file name="Email.php" hash="d515199f4b0a380bbdb18ed4646406ab"/><file name="Switcher.php" hash="a652b662a97986b2a6e9d482c4dd91de"/></dir><dir name="AjaxButton"><file name="Abstract.php" hash="c1fc0f3a54612e2a1a29b2334ce7596e"/></dir><file name="CreateExampleSegments.php" hash="275651dd04e7d33aa59979c420c2970b"/><file name="Linkedattributes.php" hash="
|
28 |
<compatible/>
|
29 |
<dependencies><required><php><min>5.3.0</min><max>8.0.0</max></php></required></dependencies>
|
30 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Campaignmonitor_Createsend</name>
|
4 |
+
<version>1.0.6</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="https://opensource.org/licenses/OSL-3.0">OSL</license>
|
7 |
<channel>community</channel>
|
18 |
- Celebrate an important date, such as a birthday<br /><br />
|
19 |

|
20 |
Campaign Monitor makes it easy for you to get started by automatically creating segments for you based on what we’ve found to be the most actionable audiences in Magento. Use these segments to automate marketing campaigns.</description>
|
21 |
+
<notes>Transnational emails fixed.
|
22 |
+
Security fixes
|
23 |

|
24 |
</notes>
|
25 |
<authors><author><name>Campaign Monitor</name><user>CampaignMonitor</user><email>vibhor@campaignmonitor.com</email></author></authors>
|
26 |
+
<date>2016-12-04</date>
|
27 |
+
<time>01:05:55</time>
|
28 |
+
<contents><target name="magecommunity"><dir name="Campaignmonitor"><dir name="Createsend"><dir name="Block"><dir name="Adminhtml"><dir name="Customer"><dir name="Edit"><file name="Grid.php" hash="48e28e2303623522c1a29365b94744df"/></dir></dir><dir name="Email"><file name="Grid.php" hash="1693e7a7d2dd6eaf024ed6dda06dafd0"/><dir name="View"><file name="Abstract.php" hash="480c6ac7134e47bf43c4fd6a3213b3c7"/><file name="Form.php" hash="5661cfe457e8526b2c47313fc264cd55"/><dir name="Tab"><file name="Clicks.php" hash="42f4a1ba85451b34617eeecd4a4a34d3"/><file name="Details.php" hash="2b8a673ccbbf0172c6d750259724c910"/><file name="Html.php" hash="ab99f5396dd23e2c874bdcbea2c9f064"/><file name="Opens.php" hash="5c7c80be07535869099b9adb35d4b5a1"/><file name="Text.php" hash="8448dd4755d6b0fac8136188a4259e95"/></dir><file name="Tabs.php" hash="ab071552f0a18c06f6c6b5deba46ad39"/></dir><file name="View.php" hash="da2d91894a55ff5dadcc3052f76ea4a2"/></dir><file name="Email.php" hash="d515199f4b0a380bbdb18ed4646406ab"/><file name="Switcher.php" hash="a652b662a97986b2a6e9d482c4dd91de"/></dir><dir name="AjaxButton"><file name="Abstract.php" hash="c1fc0f3a54612e2a1a29b2334ce7596e"/></dir><file name="CreateExampleSegments.php" hash="275651dd04e7d33aa59979c420c2970b"/><file name="Linkedattributes.php" hash="100e7027a3f81483619eb656dd601c9c"/><file name="OauthPermissionRequest.php" hash="500f081e10b335c5f8a48dc4e66c6cf5"/><file name="OauthRedirectUrl.php" hash="c620189b986869119ef663c1219d3638"/><file name="TestApi.php" hash="18becb7036d41b984e1ef3b8610e9fbe"/><file name="Wishlistattributes.php" hash="215c9f748b4dc961bb55c855a5cd05a0"/></dir><dir name="Helper"><file name="Api.php" hash="db3ae7b5f34c7e863c57d5709aaa1da5"/><file name="Config.php" hash="a3fb0f14af014d75e408fc7b8d082b20"/><file name="Data.php" hash="19c555bc15be41c0e27ebded59176acf"/></dir><dir name="Model"><dir name="Api"><file name="Observer.php" hash="7ddceb0ca6cd952716cb9551ab220fd7"/></dir><file name="Api.php" hash="12160dd532468da92699280d3eb2d24e"/><dir name="Config"><file name="Api.php" hash="16c3d74c28fa1e1fd7ccd339a01790b2"/><dir name="Attributes"><file name="Abstract.php" hash="a9253efd2e6e57d8a00ce6daf04de7e0"/></dir><file name="AuthenticationMethod.php" hash="90307b668c7ba94867823aba983b2fdc"/><dir name="Backend"><file name="Apikey.php" hash="82d8bafbdcbbb74078bc8427e7569290"/><file name="Listid.php" hash="ebebd820797f3aa4b5bf69e75771a513"/></dir><file name="ClientSelection.php" hash="0adc61c13342da28e8a1815f4f65ae0d"/><file name="ConflictResolutionMethod.php" hash="48938666ddfd96e6b3b5c13c01a4c36c"/><file name="CustomerAttributes.php" hash="5cf999910a27b44d4c7747e2e10b4179"/><file name="DefaultCustomFields.php" hash="fbca6fc17b394e5f38511760a10a9aa1"/><file name="ExampleSegments.php" hash="4ab29a0f8a62c18b3d846ae4901ae2fb"/><file name="ListFlag.php" hash="b259912cdf6a68883a58534079f4db71"/><file name="ListSelection.php" hash="763601cc87f4948c0f3ee93eea3093eb"/><file name="ProductAttributes.php" hash="1a3c82d010fa5aec93d56b1bbabf6568"/><file name="Scope.php" hash="f6c06f4344c1db712925314a7dce7c3d"/><file name="SubscriptionSources.php" hash="e9291723ce6420cb9ebfeff4c994372a"/></dir><file name="Cron.php" hash="4eb2cf346c0705237a402d24053c8ea2"/><dir name="Customer"><file name="Observer.php" hash="9a0a9a3f300dc9acd20bf1e12e37f036"/></dir><dir name="Email"><file name="Cron.php" hash="00b7d38721fde5732a92d9d733f32439"/><file name="Template.php" hash="3705134c86e34126c59b802fcd4c0695"/></dir><file name="Email.php" hash="b587fc5062c33e2f2b97111e11095b2c"/><dir name="List"><file name="Cron.php" hash="010417a44ddaaf4d5cf254dedb5f188e"/><dir name="Initial"><file name="Cron.php" hash="7d5037fd6ebdff2662b702f531797741"/></dir></dir><dir name="Newsletter"><file name="Observer.php" hash="0c194bd321eb4ce58d0859d505254a0d"/></dir><file name="Newsletter.php" hash="4bcb7a0970b9e55c905e753990263f56"/><dir name="Product"><file name="Observer.php" hash="70834ac17bd0ff931b9b9334d79980bb"/></dir><dir name="Resource"><dir name="Email"><file name="Collection.php" hash="85165381ae7416ecdb24cd11c88fd591"/></dir><file name="Email.php" hash="42f44bf5cbbbdb5dc6e7f4944dec9cf8"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Createsend"><file name="ApiController.php" hash="3dfa90cd58af3ce08f77dfafc4485885"/><file name="EmailController.php" hash="14bf61eb251af1444335723475d67f38"/><file name="SegmentController.php" hash="d3aaf5498b92589f2a6ca816931a8978"/></dir></dir><file name="OauthController.php" hash="4f20e1a620363465aa33cda712282646"/><file name="UnsubscribeController.php" hash="062e972b753446efc1d226f83952aeda"/><file name="WebhooksController.php" hash="1bcf68eda9e4fa643c149fc96bfb35df"/></dir><dir name="etc"><file name="adminhtml.xml" hash="4b9b24169fc9612fcf941022d7918071"/><file name="config.xml" hash="fbecc39879cfa6acc159dec2937c7c7a"/><file name="system.xml" hash="aadf9a7a0bb9d018d8e90f51442c8935"/></dir><dir name="sql"><dir name="campaignmonitor_createsend_setup"><file name="install-1.0.0.php" hash="5af34eba2541737bf1701e2a989d7961"/><file name="install-1.0.1.php" hash="5af34eba2541737bf1701e2a989d7961"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Campaignmonitor_Createsend.xml" hash="e2b42c271a897551d0750506555af6d4"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="campaignmonitor"><file name="createsend.xml" hash="5e2dbc978680b1631759eb5664303d1b"/></dir></dir><dir name="template"><dir name="campaignmonitor"><dir name="createsend"><file name="ajax.phtml" hash="74eb59c4ad5b2f686536e33c929419ca"/><file name="apiclient.phtml" hash="753efb7fad644b1d4122689cd48123d6"/><dir name="email"><file name="details.phtml" hash="7a280f81e7fc737ab3a44de8fb3bdb01"/><file name="html.phtml" hash="e5c2f2d96fde96eb62887bb0cdb511f5"/><file name="text.phtml" hash="666a3bece1273f29d42044ee3054b08e"/><file name="tracking.phtml" hash="ca3cee04bf39c89001cb654cbc0acf1c"/></dir><file name="switcher.phtml" hash="f0ebd5e04640cba50b022ad77159ae2b"/><dir name="system"><dir name="config"><dir name="form"><dir name="field"><file name="array_dropdown.phtml" hash="9e47b2ee3ce33ca21cc95d2e360ecc77"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="shell"><file name="campaignmonitor_list.php" hash="a6ef94412cf5f57fd31b4db409ca028d"/><file name="campaignmonitor_email.php" hash="8a1b04a4970e178c04351247de4ec59a"/><file name="campaignmonitor_list_initial.php" hash="5dc090760799d568ab3906c84b7cbc6d"/></dir></target></contents>
|
29 |
<compatible/>
|
30 |
<dependencies><required><php><min>5.3.0</min><max>8.0.0</max></php></required></dependencies>
|
31 |
</package>
|