sendmachine - Version 1.0.6

Version Notes

List cache refresh fix.

Download this release

Release Info

Developer Sendmachine
Extension sendmachine
Version 1.0.6
Comparing to
See all releases


Code changes from version 1.0.5 to 1.0.6

app/code/community/Sendmachine/Sendmachine/Block/AppContainer/Tab/Email.php CHANGED
@@ -21,6 +21,7 @@ class Sendmachine_Sendmachine_Block_AppContainer_Tab_Email extends Mage_Adminhtm
21
 
22
 
23
  $fieldset = $form->addFieldset('email_fieldset', array('legend' => Mage::helper('sendmachine')->__('Email Settings')));
 
24
  if($this->store) {
25
  $testfieldset = $form->addFieldset('emailtest_fieldset', array('legend' => Mage::helper('sendmachine')->__('Test Configuration')));
26
  }
@@ -68,33 +69,33 @@ class Sendmachine_Sendmachine_Block_AppContainer_Tab_Email extends Mage_Adminhtm
68
  'after_element_html' => '<small>' . Mage::helper('sendmachine')->__("Note! If you set a 'From name' here, all other 'from names' will be overriden") . '<small>'
69
  ));
70
 
71
- $fieldset->addField('transactional_campaigns_enabled', 'select', array(
72
  'name' => 'transactional_campaigns_enabled',
73
- 'label' => Mage::helper('sendmachine')->__('Use transactional emails'),
74
- 'title' => Mage::helper('sendmachine')->__('Use transactional emails'),
75
  'values' => Mage::getModel('adminhtml/system_config_source_yesno')->toOptionArray()
76
  ));
77
 
78
- $fieldset->addField('transactional_campaign_prefix', 'text', array(
79
  'name' => 'transactional_campaign_prefix',
80
- 'label' => Mage::helper('sendmachine')->__('Transactional campaigns prefix'),
81
- 'title' => Mage::helper('sendmachine')->__('Transactional campaigns prefix'),
82
- 'after_element_html' => '<small>Campaign\'s prefix<small>'
83
  ));
84
 
85
- $fieldset->addField('transactional_campaign_areas', 'multiselect', array(
86
  'name' => 'transactional_campaign_areas',
87
- 'label' => Mage::helper('sendmachine')->__('Transactional campaigns areas'),
88
- 'title' => Mage::helper('sendmachine')->__('Transactional campaigns areas'),
89
  'values' => Mage::getModel('sendmachine/source_transactionalCampAreas')->toOptionArray(),
90
  'after_element_html' => '<small>' . Mage::helper('sendmachine')->__("Note! Hold 'ctrl' and click the area you want to select/deselect for multiple selection") . '</small>'
91
  ));
92
 
93
- $fieldset->addField('transactional_campaign_suffix', 'text', array(
94
  'name' => 'transactional_campaign_suffix',
95
- 'label' => Mage::helper('sendmachine')->__('Transactional campaigns suffix'),
96
- 'title' => Mage::helper('sendmachine')->__('Transactional campaigns suffix'),
97
- 'after_element_html' => '<small>Campaign\'s suffix<small>'
98
  ));
99
 
100
  if ($this->store) {
21
 
22
 
23
  $fieldset = $form->addFieldset('email_fieldset', array('legend' => Mage::helper('sendmachine')->__('Email Settings')));
24
+ $tranzactionalfieldset = $form->addFieldset('tranzactional_fieldset', array('legend' => Mage::helper('sendmachine')->__('Transactional groups settings')));
25
  if($this->store) {
26
  $testfieldset = $form->addFieldset('emailtest_fieldset', array('legend' => Mage::helper('sendmachine')->__('Test Configuration')));
27
  }
69
  'after_element_html' => '<small>' . Mage::helper('sendmachine')->__("Note! If you set a 'From name' here, all other 'from names' will be overriden") . '<small>'
70
  ));
71
 
72
+ $tranzactionalfieldset->addField('transactional_campaigns_enabled', 'select', array(
73
  'name' => 'transactional_campaigns_enabled',
74
+ 'label' => Mage::helper('sendmachine')->__('Group transactional emails'),
75
+ 'title' => Mage::helper('sendmachine')->__('Group transactional emails'),
76
  'values' => Mage::getModel('adminhtml/system_config_source_yesno')->toOptionArray()
77
  ));
78
 
79
+ $tranzactionalfieldset->addField('transactional_campaign_prefix', 'text', array(
80
  'name' => 'transactional_campaign_prefix',
81
+ 'label' => Mage::helper('sendmachine')->__('Transactional emails prefix'),
82
+ 'title' => Mage::helper('sendmachine')->__('Transactional emails prefix'),
83
+ 'after_element_html' => '<small>Grouped email\'s prefix<small>'
84
  ));
85
 
86
+ $tranzactionalfieldset->addField('transactional_campaign_areas', 'multiselect', array(
87
  'name' => 'transactional_campaign_areas',
88
+ 'label' => Mage::helper('sendmachine')->__('Events to group'),
89
+ 'title' => Mage::helper('sendmachine')->__('Events to group'),
90
  'values' => Mage::getModel('sendmachine/source_transactionalCampAreas')->toOptionArray(),
91
  'after_element_html' => '<small>' . Mage::helper('sendmachine')->__("Note! Hold 'ctrl' and click the area you want to select/deselect for multiple selection") . '</small>'
92
  ));
93
 
94
+ $tranzactionalfieldset->addField('transactional_campaign_suffix', 'text', array(
95
  'name' => 'transactional_campaign_suffix',
96
+ 'label' => Mage::helper('sendmachine')->__('Transactional emails suffix'),
97
+ 'title' => Mage::helper('sendmachine')->__('Transactional emails suffix'),
98
+ 'after_element_html' => '<small>Grouped email\'s suffix<small>'
99
  ));
100
 
101
  if ($this->store) {
app/code/community/Sendmachine/Sendmachine/Model/Sendmachine.php CHANGED
@@ -60,8 +60,9 @@ class Sendmachine_Sendmachine_Model_Sendmachine extends Mage_Core_Model_Abstract
60
 
61
  if ($key) {
62
 
63
- if (is_null($this->appData))
64
  $this->get();
 
65
 
66
  if (is_array($key)) {
67
 
@@ -74,14 +75,16 @@ class Sendmachine_Sendmachine_Model_Sendmachine extends Mage_Core_Model_Abstract
74
  }
75
  } else {
76
 
77
- if (count($value) && $walk_array)
78
  $this->_walkArray($this->appData, $value);
79
- else
80
  $this->appData[$key] = $value;
 
81
  }
82
 
83
- if ($commit)
84
  $this->commit();
 
85
 
86
  return true;
87
  }
@@ -337,7 +340,7 @@ class Sendmachine_Sendmachine_Model_Sendmachine extends Mage_Core_Model_Abstract
337
  $template_name = $template_list[trim($template_id)]['label'];
338
 
339
  return array(
340
- "header_name" => "X-Sendmachine-Campaign",
341
  "header_value" => $trCmpPrexif . $template_name . $trCmpSuffix
342
  );
343
  }
60
 
61
  if ($key) {
62
 
63
+ if (is_null($this->appData)) {
64
  $this->get();
65
+ }
66
 
67
  if (is_array($key)) {
68
 
75
  }
76
  } else {
77
 
78
+ if (count($value) && $walk_array) {
79
  $this->_walkArray($this->appData, $value);
80
+ } else {
81
  $this->appData[$key] = $value;
82
+ }
83
  }
84
 
85
+ if ($commit) {
86
  $this->commit();
87
+ }
88
 
89
  return true;
90
  }
340
  $template_name = $template_list[trim($template_id)]['label'];
341
 
342
  return array(
343
+ "header_name" => "X-Sendmachine-Tag",
344
  "header_value" => $trCmpPrexif . $template_name . $trCmpSuffix
345
  );
346
  }
app/code/community/Sendmachine/Sendmachine/controllers/SendmachineController.php CHANGED
@@ -281,7 +281,10 @@ class Sendmachine_Sendmachine_SendmachineController extends Mage_Adminhtml_Contr
281
 
282
  public function refreshCachedListsAction() {
283
 
284
- if ($this->sm->apiConnected()) {
 
 
 
285
 
286
  if ($resp = $this->sm->fetchContactLists()) {
287
 
281
 
282
  public function refreshCachedListsAction() {
283
 
284
+ $this->sm->setWebsite($this->getRequest()->getParam('website'));
285
+ $this->sm->setStore($this->getRequest()->getParam('store'));
286
+
287
+ if ($this->sm->apiConnected()) {
288
 
289
  if ($resp = $this->sm->fetchContactLists()) {
290
 
js/sendmachine/admin.js CHANGED
@@ -86,9 +86,15 @@ function smExport(url) {
86
  }
87
 
88
  function smRefreshCachedLists(url) {
89
-
 
 
90
  new Ajax.Request(url, {
91
  method: 'post',
 
 
 
 
92
  onSuccess: function () {
93
  location.reload();
94
  }
86
  }
87
 
88
  function smRefreshCachedLists(url) {
89
+
90
+ var website = document.getElementById('website_lists').value;
91
+ var store = document.getElementById('store_lists').value;
92
  new Ajax.Request(url, {
93
  method: 'post',
94
+ parameters: {
95
+ website: website,
96
+ store: store
97
+ },
98
  onSuccess: function () {
99
  location.reload();
100
  }
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>sendmachine</name>
4
- <version>1.0.5</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
@@ -32,11 +32,11 @@
32
  &lt;/li&gt;&#xD;
33
  &lt;/ul&gt;&#xD;
34
  &lt;/div&gt;</description>
35
- <notes>Minor debug fixes</notes>
36
  <authors><author><name>Sendmachine</name><user>sendmachine</user><email>support@sendmachine.com</email></author></authors>
37
- <date>2017-04-12</date>
38
- <time>14:36:45</time>
39
- <contents><target name="magecommunity"><dir name="Sendmachine"><dir name="Sendmachine"><dir name="Block"><dir name="AppContainer"><file name="Grid.php" hash="93132a7ae131d9a446cd6897aeface90"/><file name="Main.php" hash="72bfae321e391f0f6c9534b2c2cf5bdb"/><dir name="Tab"><file name="Email.php" hash="cb60345586e0aa2e7047dbe8bbd517f0"/><file name="General.php" hash="43131871f9862e88d5bbf2aea388cda6"/><file name="Lists.php" hash="b4422f9c2f7043bb280bf789f2955a14"/></dir><file name="Tabs.php" hash="35a2ee900e946b65dbbe9f025b45a7d2"/></dir><file name="PopupBlock.php" hash="4cd81d501ad55345a8d9af28bd5271af"/></dir><dir name="Helper"><file name="Data.php" hash="07f2706e7c8a5535aea556f13d13f8f6"/></dir><dir name="Model"><file name="Cronjobs.php" hash="c9189af524b66278b60a272382777313"/><dir name="Email"><file name="Queue.php" hash="565cf2bee7c364027bd853ccac13a0c8"/><file name="Template.php" hash="e34560b42fad5c838a58655fb2d1e7c4"/></dir><dir name="Mysql4"><dir name="Sendmachine"><file name="Collection.php" hash="e9c6c5e6b32f8ce661448528627f44ee"/></dir><file name="Sendmachine.php" hash="70d59dd115baa6d9e6d7f398508eeb95"/></dir><file name="Observer.php" hash="5cd573bc8bc33e94ad145dc385f8d8ef"/><file name="Sendmachine.php" hash="eb945d67d7f4fa2323c46ec624a27e8f"/><dir name="Source"><file name="Contactlist.php" hash="399c3de2d3616e98bb97310a34c8ae16"/><file name="ImportExportLimit.php" hash="3bde4faece90495bef39e6c862f09350"/><file name="Smtp.php" hash="a99f6c2795a1a2c479bfcef9e8b4d9de"/><file name="TransactionalCampAreas.php" hash="94ec1556a650739051c5d3d3da38be60"/></dir></dir><dir name="controllers"><file name="SendmachineController.php" hash="0578b8d9f7851dc5667eef8de9261a86"/><file name="SubscribeController.php" hash="4beb41648b4efdb530113b6e4cf5d4d7"/></dir><dir name="etc"><file name="adminhtml.xml" hash="2b9bc07f400202cbf4a92e4256319d28"/><file name="config.xml" hash="28d70bc47258baad427a98a02561a088"/></dir><dir name="sql"><dir name="sendmachine_setup"><file name="mysql4-install-1.0.0.php" hash="c7fb051da24f17f073dd0c3fc76a79c1"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="062cab72ea965e951acd43c3f3abc2bb"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Sendmachine_Sendmachine.xml" hash="8378d3fff65502b2677cb5439af9a091"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="sendmachine.xml" hash="111176ded682edb4732351af44f2fa66"/></dir><dir name="template"><dir name="sendmachine"><file name="popup.phtml" hash="456a82301ee6d038a4964ab857645d6b"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Sendmachine_Sendmachine.csv" hash="bdfdd5fda92cf52a1e9c07801f7b2a64"/><dir name="template"><dir name="email"><dir name="sendmachine"><file name="sm_send_test_email.html" hash="572e49104e369c140ea691b83e4888c0"/></dir></dir></dir></dir></target><target name="magelib"><dir name="SendmachineApi"><file name="README.md" hash="4f3be41975112c7b0e2d1b420362ca88"/><file name="SendmachineApiClient.php" hash="780707f47e9640ece77dc63dc0b90300"/><file name="composer.json" hash="14472d29d81169ec0865135d75ceda44"/><dir name="library"><file name="Account.php" hash="d385b9bf2c6ab2cfe59224376b6e5ddd"/><file name="Campaigns.php" hash="27eea607162456cb580ae5b468384cdc"/><file name="Lists.php" hash="1e15afc8cb1bb149df1a3ccf85758dd5"/><file name="Sender.php" hash="fb45b76646ed6a5708f5234955fc327f"/><file name="Templates.php" hash="03c967a70588670bc6a7318a3214e0a1"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="sendmachine"><file name="logo.png" hash="3ded087eb9efd7c6bdcaade0fec6f9e5"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="sendmachine"><file name="frontend.css" hash="d02fbf9fe0d145c7a9e8d59a91b7055d"/><file name="frontend.js" hash="ca7ca5de929041908f263f68ade035bf"/><file name="loading.gif" hash="3fce1e41ae8b01675553928349770faa"/></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="sendmachine"><file name="admin.js" hash="d8c93bf08f8fb4831787aa53fb5aef11"/></dir></dir></target></contents>
40
  <compatible/>
41
  <dependencies><required><php><min>5.3.0</min><max>7.0.0</max></php><extension><name>curl</name><min/><max/></extension></required></dependencies>
42
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>sendmachine</name>
4
+ <version>1.0.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
32
  &lt;/li&gt;&#xD;
33
  &lt;/ul&gt;&#xD;
34
  &lt;/div&gt;</description>
35
+ <notes>List cache refresh fix.</notes>
36
  <authors><author><name>Sendmachine</name><user>sendmachine</user><email>support@sendmachine.com</email></author></authors>
37
+ <date>2017-04-13</date>
38
+ <time>13:02:25</time>
39
+ <contents><target name="magecommunity"><dir name="Sendmachine"><dir name="Sendmachine"><dir name="Block"><dir name="AppContainer"><file name="Grid.php" hash="93132a7ae131d9a446cd6897aeface90"/><file name="Main.php" hash="72bfae321e391f0f6c9534b2c2cf5bdb"/><dir name="Tab"><file name="Email.php" hash="b1804373a660ebd171104f75f3146d83"/><file name="General.php" hash="43131871f9862e88d5bbf2aea388cda6"/><file name="Lists.php" hash="b4422f9c2f7043bb280bf789f2955a14"/></dir><file name="Tabs.php" hash="35a2ee900e946b65dbbe9f025b45a7d2"/></dir><file name="PopupBlock.php" hash="4cd81d501ad55345a8d9af28bd5271af"/></dir><dir name="Helper"><file name="Data.php" hash="07f2706e7c8a5535aea556f13d13f8f6"/></dir><dir name="Model"><file name="Cronjobs.php" hash="c9189af524b66278b60a272382777313"/><dir name="Email"><file name="Queue.php" hash="565cf2bee7c364027bd853ccac13a0c8"/><file name="Template.php" hash="e34560b42fad5c838a58655fb2d1e7c4"/></dir><dir name="Mysql4"><dir name="Sendmachine"><file name="Collection.php" hash="e9c6c5e6b32f8ce661448528627f44ee"/></dir><file name="Sendmachine.php" hash="70d59dd115baa6d9e6d7f398508eeb95"/></dir><file name="Observer.php" hash="5cd573bc8bc33e94ad145dc385f8d8ef"/><file name="Sendmachine.php" hash="a6a1983ee5773eb9de868911b241dda5"/><dir name="Source"><file name="Contactlist.php" hash="399c3de2d3616e98bb97310a34c8ae16"/><file name="ImportExportLimit.php" hash="3bde4faece90495bef39e6c862f09350"/><file name="Smtp.php" hash="a99f6c2795a1a2c479bfcef9e8b4d9de"/><file name="TransactionalCampAreas.php" hash="94ec1556a650739051c5d3d3da38be60"/></dir></dir><dir name="controllers"><file name="SendmachineController.php" hash="04436097484e0acfc9bd91252a9299e9"/><file name="SubscribeController.php" hash="4beb41648b4efdb530113b6e4cf5d4d7"/></dir><dir name="etc"><file name="adminhtml.xml" hash="2b9bc07f400202cbf4a92e4256319d28"/><file name="config.xml" hash="28d70bc47258baad427a98a02561a088"/></dir><dir name="sql"><dir name="sendmachine_setup"><file name="mysql4-install-1.0.0.php" hash="c7fb051da24f17f073dd0c3fc76a79c1"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="062cab72ea965e951acd43c3f3abc2bb"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Sendmachine_Sendmachine.xml" hash="8378d3fff65502b2677cb5439af9a091"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="sendmachine.xml" hash="111176ded682edb4732351af44f2fa66"/></dir><dir name="template"><dir name="sendmachine"><file name="popup.phtml" hash="456a82301ee6d038a4964ab857645d6b"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Sendmachine_Sendmachine.csv" hash="bdfdd5fda92cf52a1e9c07801f7b2a64"/><dir name="template"><dir name="email"><dir name="sendmachine"><file name="sm_send_test_email.html" hash="572e49104e369c140ea691b83e4888c0"/></dir></dir></dir></dir></target><target name="magelib"><dir name="SendmachineApi"><file name="README.md" hash="4f3be41975112c7b0e2d1b420362ca88"/><file name="SendmachineApiClient.php" hash="780707f47e9640ece77dc63dc0b90300"/><file name="composer.json" hash="14472d29d81169ec0865135d75ceda44"/><dir name="library"><file name="Account.php" hash="d385b9bf2c6ab2cfe59224376b6e5ddd"/><file name="Campaigns.php" hash="27eea607162456cb580ae5b468384cdc"/><file name="Lists.php" hash="1e15afc8cb1bb149df1a3ccf85758dd5"/><file name="Sender.php" hash="fb45b76646ed6a5708f5234955fc327f"/><file name="Templates.php" hash="03c967a70588670bc6a7318a3214e0a1"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="sendmachine"><file name="logo.png" hash="3ded087eb9efd7c6bdcaade0fec6f9e5"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="sendmachine"><file name="frontend.css" hash="d02fbf9fe0d145c7a9e8d59a91b7055d"/><file name="frontend.js" hash="ca7ca5de929041908f263f68ade035bf"/><file name="loading.gif" hash="3fce1e41ae8b01675553928349770faa"/></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="sendmachine"><file name="admin.js" hash="e1173888a67a91bd191703fcc1620d02"/></dir></dir></target></contents>
40
  <compatible/>
41
  <dependencies><required><php><min>5.3.0</min><max>7.0.0</max></php><extension><name>curl</name><min/><max/></extension></required></dependencies>
42
  </package>