MaxicycleCom_Connector - Version 1.0.4

Version Notes

v1.0.4
Fixed bug in PHP 5.4
v1.0.3
Refresh caching
Fix bug when having a multi store setup for SKU check

v1.0.2
Bug fix release

v1.0.1
Stability improvements
Logging into separate logfile

v.1.0.0
* Initial official release

Download this release

Release Info

Developer Maxicycle Software GmbH
Extension MaxicycleCom_Connector
Version 1.0.4
Comparing to
See all releases


Code changes from version 1.0.3 to 1.0.4

app/code/community/Maxicycle/Connector/Model/Observer.php CHANGED
@@ -87,7 +87,7 @@ class Maxicycle_Connector_Model_Observer {
87
  }
88
  } else {
89
  # do nothing
90
- # Mage::log('MAXICYCLE: module disabled or invalid status', null, 'maxicycle.log');
91
  }
92
  }
93
  catch(Exception $e) {
@@ -280,7 +280,7 @@ class Maxicycle_Connector_Model_Observer {
280
  }
281
  }
282
  } else {
283
- Mage::log('MAXICYCLE: Not adding product, campaign in response period');
284
  }
285
  }
286
 
@@ -302,21 +302,31 @@ class Maxicycle_Connector_Model_Observer {
302
  }
303
 
304
  private function shouldExport($order) {
 
305
  return $this->moduleEnabled() && $this->validStatus($order) && $this->hasCampaignOrderTypeSet($order);
306
  }
307
 
308
  // requires config to be set
309
  private function validStatus($order) {
310
- return in_array($order->getStatus(), $this->_config['valid_statuses']);
 
 
 
 
311
  }
312
 
313
  // requires _config to be set
314
  private function moduleEnabled() {
315
- return intval($this->_config['is_enable']);
 
 
316
  }
317
 
318
  // should have type set - fixes bug when exported before order_place_after_ran
319
  private function hasCampaignOrderTypeSet($order) {
320
- return !empty($order->getMaxicycleOrderType());
321
- }
 
 
 
322
  }
87
  }
88
  } else {
89
  # do nothing
90
+ Mage::log('MAXICYCLE: module disabled or invalid status', null, 'maxicycle.log');
91
  }
92
  }
93
  catch(Exception $e) {
280
  }
281
  }
282
  } else {
283
+ Mage::log('MAXICYCLE: Not adding product, campaign in response period', null, 'maxicycle.log');
284
  }
285
  }
286
 
302
  }
303
 
304
  private function shouldExport($order) {
305
+ $this->hasCampaignOrderTypeSet($order);
306
  return $this->moduleEnabled() && $this->validStatus($order) && $this->hasCampaignOrderTypeSet($order);
307
  }
308
 
309
  // requires config to be set
310
  private function validStatus($order) {
311
+ $status = $order->getStatus();
312
+ Mage::log('MAXICYCLE: order status: ' . $status, null, 'maxicycle.log');
313
+ $valid_status = in_array($order->getStatus(), $this->_config['valid_statuses']);
314
+ Mage::log('MAXICYCLE: has valid status: ' . $valid_status, null, 'maxicycle.log');
315
+ return $valid_status;
316
  }
317
 
318
  // requires _config to be set
319
  private function moduleEnabled() {
320
+ $enabled = intval($this->_config['is_enable']);
321
+ Mage::log('MAXICYCLE: Module enabled true/false: ' . $enabled, null, 'maxicycle.log');
322
+ return $enabled;
323
  }
324
 
325
  // should have type set - fixes bug when exported before order_place_after_ran
326
  private function hasCampaignOrderTypeSet($order) {
327
+ $order_type = $order->getMaxicycleOrderType();
328
+ $has_type_set = isset($order_type);
329
+ Mage::log('MAXICYCLE: Campaign order type is set true/false: ' . $has_type_set, null, 'maxicycle.log');
330
+ return $has_type_set;
331
+ }
332
  }
app/code/community/Maxicycle/Connector/etc/config.xml CHANGED
@@ -12,7 +12,7 @@
12
  <config>
13
  <modules>
14
  <Maxicycle_Connector>
15
- <version>1.0.3</version>
16
  </Maxicycle_Connector>
17
  </modules>
18
 
12
  <config>
13
  <modules>
14
  <Maxicycle_Connector>
15
+ <version>1.0.4</version>
16
  </Maxicycle_Connector>
17
  </modules>
18
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>MaxicycleCom_Connector</name>
4
- <version>1.0.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.maxicycle/license">Copyright Maxicycle Software GmbH 2015</license>
7
  <channel>community</channel>
@@ -11,7 +11,9 @@
11
  &#xD;
12
  Did you know that enclosing package inserts (coupons, catalogs, freebies, product samples, etc.) are extremely effective in driving follow-up orders from your existing customer base? Maxicycle is the solution that turns your packages into a real performance-based retention marketing channel with an amazing ROI: Create, manage, measure and optimise package inserts in a similar way than you are used from your AdWords or Facebook ads.&#xD;
13
  </description>
14
- <notes>v1.0.3&#xD;
 
 
15
  Refresh caching&#xD;
16
  Fix bug when having a multi store setup for SKU check&#xD;
17
  &#xD;
@@ -25,9 +27,9 @@ Logging into separate logfile&#xD;
25
  v.1.0.0&#xD;
26
  * Initial official release</notes>
27
  <authors><author><name>Maxicycle Software GmbH</name><user>maxicycle</user><email>support@maxicycle.com</email></author></authors>
28
- <date>2015-09-11</date>
29
- <time>08:39:22</time>
30
- <contents><target name="mageetc"><dir name="modules"><file name="Maxicycle_Connector.xml" hash="0d64b2d2ad66099e225460c349125557"/></dir></target><target name="magecommunity"><dir name="Maxicycle"><dir name="Connector"><dir name="Block"><dir name="Adminhtml"><dir name="Campaigns"><file name="Grid.php" hash="c350b3b4e428bf5f11027a97e38167ae"/></dir><file name="Campaigns.php" hash="b09c985fc4215ecd937024e0364f319b"/><dir name="Cronlog"><file name="Grid.php" hash="256284d0455dbb136baf8e00d2a71a89"/></dir><file name="Cronlog.php" hash="577f5e50a80fbac7b83cf8d5727bbb5f"/><dir name="Results"><file name="Grid.php" hash="4236c80b8faa31e6cba5f184e0d45adc"/><dir name="Renderer"><file name="Campaign.php" hash="ef4d3f0cd6c3558367f82e07853414e6"/><file name="Flag2.php" hash="d8779254a77e19da81c91e81452a7e43"/><file name="Order.php" hash="aecdc4cb460c558773660778060cde0f"/></dir></dir><file name="Results.php" hash="4d32a5f15b1f3a18434e3b2754030659"/></dir></dir><dir name="Helper"><file name="Data.php" hash="77ad31ff601c6f98f54788aaa616f0d6"/></dir><dir name="Model"><dir name="Api"><file name="Abstract.php" hash="71be3bc47c32463bc8f6f84e901719ef"/><file name="Rest.php" hash="260c1849fc5dba7b5698d5160f427d5d"/></dir><file name="Campaigns.php" hash="4e60821d8a19ea5391921e5b358257dc"/><file name="Cronlog.php" hash="dc5eec5445c6c703429992b749c8ef2c"/><dir name="Mysql4"><dir name="Campaigns"><file name="Collection.php" hash="880cbcd1ab65efb9096965c267ad35cc"/></dir><file name="Campaigns.php" hash="98143aae26423260cccb496aac9d28f2"/><dir name="Cronlog"><file name="Collection.php" hash="44d321c218f66619fbbf14271fca361f"/></dir><file name="Cronlog.php" hash="299749238a435407cce37b5dc524c466"/><dir name="Results"><file name="Collection.php" hash="8b046e56516f2f1893b6f3d1e6e2b228"/><dir name="Renderer"><file name="Actions.php" hash="da76e0352436e0570c8e6506a121d031"/><file name="Status.php" hash="37878ac8231edee56041b714077f7aec"/></dir></dir><file name="Results.php" hash="8898f253c8dce9ebe3a6b289e26945a6"/></dir><file name="Observer.php" hash="d6c7dba823b03a5aa9434feba1b3971f"/><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="ccae8f6fc1d48cb5ef6b761211e75bd9"/></dir></dir><file name="Results.php" hash="246fff1018a0b03f521ba96ec61b8a8e"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="CampaignsController.php" hash="420557976cfeda32353ce0b5f435a252"/><file name="CronlogController.php" hash="eb58983412dec2890d22138adecb95a7"/><file name="InstallationController.php" hash="3f61bbc6a06009ed2966df2192c0474d"/><file name="ResultsController.php" hash="78633bbdd767350c56deef829c7b4a62"/></dir><file name="TestConnectionController.php" hash="ddb67e441e3478d45632905b78e5c362"/><file name="V1Controller.php" hash="8cf992ec3ab988d3b11f8428ea98d501"/></dir><dir name="data"><file name="data_sample.sql" hash="c02ad04dc9c1b43814ac7877970ab1ae"/></dir><dir name="etc"><file name="adminhtml.xml" hash="363126b0e935810dd07d42426ce9f766"/><file name="config.xml" hash="425632d64a939ddd598c245fb81b0cf1"/></dir><dir name="sql"><dir name="maxicycle_setup"><file name="mysql4-install-1.0.0.php" hash="ac322e77f8b08beb2d326426f2c23121"/><file name="upgrade-1.0.0-1.0.1.php" hash="dba0e0a874a87c101b379de988646b1f"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="maxicycle"><dir name="connector"><dir name="installation"><file name="step1.phtml" hash="e3efe0f106cc3cf941a77ece30b51041"/></dir></dir></dir></dir><dir name="layout"><dir name="maxicycle"><dir name="connector"><file name="layout.xml" hash="b4c388d059df42d365c945f972e8cfca"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="maxicycle"><dir name="connector"><dir name="css"><file name="css.css" hash="6cb4c9ca0ce1288f028ea80284d368ae"/></dir></dir></dir></dir></dir></dir></target></contents>
31
  <compatible/>
32
- <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
33
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>MaxicycleCom_Connector</name>
4
+ <version>1.0.4</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.maxicycle/license">Copyright Maxicycle Software GmbH 2015</license>
7
  <channel>community</channel>
11
  &#xD;
12
  Did you know that enclosing package inserts (coupons, catalogs, freebies, product samples, etc.) are extremely effective in driving follow-up orders from your existing customer base? Maxicycle is the solution that turns your packages into a real performance-based retention marketing channel with an amazing ROI: Create, manage, measure and optimise package inserts in a similar way than you are used from your AdWords or Facebook ads.&#xD;
13
  </description>
14
+ <notes>v1.0.4&#xD;
15
+ Fixed bug in PHP 5.4&#xD;
16
+ v1.0.3&#xD;
17
  Refresh caching&#xD;
18
  Fix bug when having a multi store setup for SKU check&#xD;
19
  &#xD;
27
  v.1.0.0&#xD;
28
  * Initial official release</notes>
29
  <authors><author><name>Maxicycle Software GmbH</name><user>maxicycle</user><email>support@maxicycle.com</email></author></authors>
30
+ <date>2015-09-23</date>
31
+ <time>21:25:35</time>
32
+ <contents><target name="mageetc"><dir name="modules"><file name="Maxicycle_Connector.xml" hash="0d64b2d2ad66099e225460c349125557"/></dir></target><target name="magecommunity"><dir name="Maxicycle"><dir name="Connector"><dir name="Block"><dir name="Adminhtml"><dir name="Campaigns"><file name="Grid.php" hash="c350b3b4e428bf5f11027a97e38167ae"/></dir><file name="Campaigns.php" hash="b09c985fc4215ecd937024e0364f319b"/><dir name="Cronlog"><file name="Grid.php" hash="256284d0455dbb136baf8e00d2a71a89"/></dir><file name="Cronlog.php" hash="577f5e50a80fbac7b83cf8d5727bbb5f"/><dir name="Results"><file name="Grid.php" hash="4236c80b8faa31e6cba5f184e0d45adc"/><dir name="Renderer"><file name="Campaign.php" hash="ef4d3f0cd6c3558367f82e07853414e6"/><file name="Flag2.php" hash="d8779254a77e19da81c91e81452a7e43"/><file name="Order.php" hash="aecdc4cb460c558773660778060cde0f"/></dir></dir><file name="Results.php" hash="4d32a5f15b1f3a18434e3b2754030659"/></dir></dir><dir name="Helper"><file name="Data.php" hash="77ad31ff601c6f98f54788aaa616f0d6"/></dir><dir name="Model"><dir name="Api"><file name="Abstract.php" hash="71be3bc47c32463bc8f6f84e901719ef"/><file name="Rest.php" hash="260c1849fc5dba7b5698d5160f427d5d"/></dir><file name="Campaigns.php" hash="4e60821d8a19ea5391921e5b358257dc"/><file name="Cronlog.php" hash="dc5eec5445c6c703429992b749c8ef2c"/><dir name="Mysql4"><dir name="Campaigns"><file name="Collection.php" hash="880cbcd1ab65efb9096965c267ad35cc"/></dir><file name="Campaigns.php" hash="98143aae26423260cccb496aac9d28f2"/><dir name="Cronlog"><file name="Collection.php" hash="44d321c218f66619fbbf14271fca361f"/></dir><file name="Cronlog.php" hash="299749238a435407cce37b5dc524c466"/><dir name="Results"><file name="Collection.php" hash="8b046e56516f2f1893b6f3d1e6e2b228"/><dir name="Renderer"><file name="Actions.php" hash="da76e0352436e0570c8e6506a121d031"/><file name="Status.php" hash="37878ac8231edee56041b714077f7aec"/></dir></dir><file name="Results.php" hash="8898f253c8dce9ebe3a6b289e26945a6"/></dir><file name="Observer.php" hash="3487909a46ec0615079f39e09287b497"/><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="ccae8f6fc1d48cb5ef6b761211e75bd9"/></dir></dir><file name="Results.php" hash="246fff1018a0b03f521ba96ec61b8a8e"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="CampaignsController.php" hash="420557976cfeda32353ce0b5f435a252"/><file name="CronlogController.php" hash="eb58983412dec2890d22138adecb95a7"/><file name="InstallationController.php" hash="3f61bbc6a06009ed2966df2192c0474d"/><file name="ResultsController.php" hash="78633bbdd767350c56deef829c7b4a62"/></dir><file name="TestConnectionController.php" hash="ddb67e441e3478d45632905b78e5c362"/><file name="V1Controller.php" hash="8cf992ec3ab988d3b11f8428ea98d501"/></dir><dir name="data"><file name="data_sample.sql" hash="c02ad04dc9c1b43814ac7877970ab1ae"/></dir><dir name="etc"><file name="adminhtml.xml" hash="363126b0e935810dd07d42426ce9f766"/><file name="config.xml" hash="a91915f07ae64031564abc5687d068df"/></dir><dir name="sql"><dir name="maxicycle_setup"><file name="mysql4-install-1.0.0.php" hash="ac322e77f8b08beb2d326426f2c23121"/><file name="upgrade-1.0.0-1.0.1.php" hash="dba0e0a874a87c101b379de988646b1f"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="maxicycle"><dir name="connector"><dir name="installation"><file name="step1.phtml" hash="e3efe0f106cc3cf941a77ece30b51041"/></dir></dir></dir></dir><dir name="layout"><dir name="maxicycle"><dir name="connector"><file name="layout.xml" hash="b4c388d059df42d365c945f972e8cfca"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="maxicycle"><dir name="connector"><dir name="css"><file name="css.css" hash="6cb4c9ca0ce1288f028ea80284d368ae"/></dir></dir></dir></dir></dir></dir></target></contents>
33
  <compatible/>
34
+ <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
35
  </package>