Remarkety_Mgconnector - Version 1.5.1.9

Version Notes

No comments

Download this release

Release Info

Developer Remarkety
Extension Remarkety_Mgconnector
Version 1.5.1.9
Comparing to
See all releases


Code changes from version 1.5.1.8 to 1.5.1.9

CHANGELOG.txt CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  1.5.1.8
2
  -------
3
  Notices fix
1
+ 1.5.1.9
2
+ -------
3
+ Send order updated event only when order status is changed
4
+
5
  1.5.1.8
6
  -------
7
  Notices fix
app/code/community/Remarkety/Mgconnector/Block/Adminhtml/Queue/Configure/Form.php CHANGED
@@ -158,6 +158,16 @@ class Remarkety_Mgconnector_Block_Adminhtml_Queue_Configure_Form extends Mage_Ad
158
  );
159
  }
160
 
 
 
 
 
 
 
 
 
 
 
161
  $button = $fieldset->addField(
162
  'button', 'note', array(
163
  'label' => false,
158
  );
159
  }
160
 
161
+ $fieldset->addField(
162
+ 'force_order_updates', 'checkbox', array(
163
+ 'label' => $this->__('Force order update event to Remarkety when status is not changed'),
164
+ 'name' => 'data[force_order_updates]',
165
+ 'value' => 1,
166
+ 'checked' => Mage::getStoreConfig(Remarkety_Mgconnector_Helper_Configuration::XPATH_FORCE_ORDER_UPDATES) ? 'checked' : '',
167
+ 'style' => 'float:left',
168
+ )
169
+ );
170
+
171
  $button = $fieldset->addField(
172
  'button', 'note', array(
173
  'label' => false,
app/code/community/Remarkety/Mgconnector/Helper/Configuration.php CHANGED
@@ -7,6 +7,7 @@ class Remarkety_Mgconnector_Helper_Configuration extends Mage_Core_Helper_Abstra
7
 
8
  const XPATH_INTERNAL_PRODUCT_URL = 'remarkety/mgconnector/product_url_internal';
9
  const XPATH_SHARED_CUSTOMERS = 'remarkety/mgconnector/allow_shared_customers';
 
10
 
11
  public function getValue($key, $default = null)
12
  {
@@ -106,6 +107,10 @@ class Remarkety_Mgconnector_Helper_Configuration extends Mage_Core_Helper_Abstra
106
  return false;
107
  }
108
 
 
 
 
 
109
  /**
110
  * @param null $store
111
  * @return bool
7
 
8
  const XPATH_INTERNAL_PRODUCT_URL = 'remarkety/mgconnector/product_url_internal';
9
  const XPATH_SHARED_CUSTOMERS = 'remarkety/mgconnector/allow_shared_customers';
10
+ const XPATH_FORCE_ORDER_UPDATES = 'remarkety/mgconnector/force_order_updates';
11
 
12
  public function getValue($key, $default = null)
13
  {
107
  return false;
108
  }
109
 
110
+ public function forceOrderUpdates(){
111
+ return Mage::getStoreConfig(self::XPATH_FORCE_ORDER_UPDATES) == 1;
112
+ }
113
+
114
  /**
115
  * @param null $store
116
  * @return bool
app/code/community/Remarkety/Mgconnector/Model/Observer.php CHANGED
@@ -106,8 +106,17 @@ class Remarkety_Mgconnector_Model_Observer
106
  }
107
 
108
  $eventType = self::EVENT_ORDERS_UPDATED;
109
- if ($order->getOrigData() === null) {
 
110
  $eventType = self::EVENT_ORDERS_CREATED;
 
 
 
 
 
 
 
 
111
  }
112
 
113
  $data = $this->serializeOrder($order);
106
  }
107
 
108
  $eventType = self::EVENT_ORDERS_UPDATED;
109
+ $originalData = $order->getOrigData();
110
+ if ($originalData === null) {
111
  $eventType = self::EVENT_ORDERS_CREATED;
112
+ } else {
113
+ if(!empty($originalData['status']) && $originalData['status'] == $order->getStatus()){
114
+ //Status haven't changed, should ignore this event
115
+ if(!Mage::helper('mgconnector/configuration')->forceOrderUpdates()){
116
+ $this->_log(__FUNCTION__, '', 'Order ('.$order->getIncrementId().') status was not changed', null);
117
+ return $this;
118
+ }
119
+ }
120
  }
121
 
122
  $data = $this->serializeOrder($order);
app/code/community/Remarkety/Mgconnector/controllers/Adminhtml/QueueController.php CHANGED
@@ -104,6 +104,12 @@ class Remarkety_Mgconnector_Adminhtml_QueueController extends Mage_Adminhtml_Con
104
  }
105
  }
106
 
 
 
 
 
 
 
107
  Mage::app()->getCacheInstance()->cleanType('config');
108
  Mage::dispatchEvent('adminhtml_cache_refresh_type', array('type' => 'config'));
109
 
104
  }
105
  }
106
 
107
+ if(isset($params['data']['force_order_updates'])){
108
+ Mage::getModel('core/config')->saveConfig(Remarkety_Mgconnector_Helper_Configuration::XPATH_FORCE_ORDER_UPDATES, true);
109
+ } else {
110
+ Mage::getModel('core/config')->saveConfig(Remarkety_Mgconnector_Helper_Configuration::XPATH_FORCE_ORDER_UPDATES, false);
111
+ }
112
+
113
  Mage::app()->getCacheInstance()->cleanType('config');
114
  Mage::dispatchEvent('adminhtml_cache_refresh_type', array('type' => 'config'));
115
 
app/code/community/Remarkety/Mgconnector/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Remarkety_Mgconnector>
5
- <version>1.5.1.8</version>
6
  </Remarkety_Mgconnector>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <Remarkety_Mgconnector>
5
+ <version>1.5.1.9</version>
6
  </Remarkety_Mgconnector>
7
  </modules>
8
  <global>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Remarkety_Mgconnector</name>
4
- <version>1.5.1.8</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl-3.0.html">GPL v3</license>
7
  <channel>community</channel>
@@ -9,11 +9,11 @@
9
  <summary>Remarkety Magento Connector</summary>
10
  <description>Remarkety Magento Connector</description>
11
  <notes>No comments</notes>
12
- <date>2017-07-12</date>
13
- <time>15-27-25</time>
14
  <contents>
15
  <target name="magecommunity">
16
- <dir name="Remarkety"><dir name="Mgconnector"><dir name="Block"><dir name="Adminhtml"><dir name="Configuration"><dir name="Complete"><file name="Form.php" hash="e6dc10d742071fe8d041801d4ae605ff"/></dir><file name="Complete.php" hash="d816f575e8ef99c8dbb4440666963bd0"/><dir name="Configuration"><file name="Form.php" hash="861b674ee5ac1e384fd68e29bd59bb02"/></dir><file name="Configuration.php" hash="8f8c4988205d9d1e2c7cd23c27a9483f"/><dir name="Install"><file name="Form.php" hash="03f1bcb7b302825f5fecffd05358aa54"/></dir><file name="Install.php" hash="9c093e25a8cc9a1fe16c87cfea2e3819"/><dir name="Upgrade"><file name="Form.php" hash="9af9dbeae95cbcdae2ec32632447f9c6"/></dir><file name="Upgrade.php" hash="93222bbdfff6b417b4b6ecbfc7c3d764"/></dir><file name="Configuration.php" hash="4df74b83acfbbe6e6fdaa708f0d9ba7e"/><dir name="Extension"><file name="RewardPoints.php" hash="82e320930f59dfd45e5aa73005118833"/></dir><dir name="Install"><dir name="Complete"><file name="Form.php" hash="fd219a65921dba3099ba77166f59e8da"/></dir><file name="Complete.php" hash="c20351873d05cde757620ae6458c1ec4"/><dir name="Install"><dir name="Create"><file name="Form.php" hash="22db1b2653b7ab9cca359a779f413d2a"/></dir><file name="Create.php" hash="bcd942c4fd64543c1b65001ec84d0d71"/><dir name="Login"><file name="Form.php" hash="acebe35949c5cf55e4b15fc04f5de086"/></dir><file name="Login.php" hash="6f7e30f2c36e56925be25496fde1e29a"/></dir><dir name="Upgrade"><file name="Form.php" hash="490a20b1e39d153af18e90844593c772"/></dir><file name="Upgrade.php" hash="5e30edfcc5954ccf65dcd36192356bed"/><dir name="Welcome"><file name="Form.php" hash="b4f135c3c0106a8391931d6d5865d599"/><file name="Store.php" hash="0eea3b94c83c8e4c3a4b1a022d5c02b4"/></dir><file name="Welcome.php" hash="de47e1c94e4073e2d2af94a0b5455250"/></dir><dir name="Queue"><dir name="Configure"><file name="Form.php" hash="803f3b3f529b427b54776ec3ef5cf0d4"/></dir><file name="Configure.php" hash="87841e46d93c568bdd09304d016de589"/><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="EventType.php" hash="13fd2faaa07dc11d6052ab9e0c6a4261"/><file name="Status.php" hash="7f087c6d8e55b67d5a7781a31d1ed924"/></dir></dir></dir><file name="Grid.php" hash="80be08c235836e185bec22d439d4e95b"/></dir><file name="Queue.php" hash="b778ce9202431147083365b8021103d0"/></dir><dir name="Tracking"><file name="Base.php" hash="ab4abb09bcff0e5465ed4ac6b8f78a6e"/><file name="General.php" hash="2fbff52cfe2924412376bbb4328068be"/><file name="Product.php" hash="11fd52b220b73fb5f2dc87a4684b056a"/></dir></dir><dir name="Helper"><file name="Configuration.php" hash="2a054d4f1b2a46f85a7a0edfb2daa62d"/><file name="Data.php" hash="e07e033f6594609aa78c82a45708dd85"/><file name="Extension.php" hash="5788a232ffaa32674b4bfc1e12e4ea98"/><file name="Links.php" hash="9f154ee8056f27f8b42f1a42880bb90a"/><file name="Urls.php" hash="2d431aa22e9cd1595c421502ecda62b8"/></dir><dir name="Model"><dir name="Core"><file name="Api.php" hash="3e87c7f2c0fc116ccba52e4f9e933ad2"/></dir><file name="Core.php" hash="c83b08ab26afb676dce793e9b595b446"/><dir name="Extension"><dir name="RewardPoints"><file name="AbstractIntegration.php" hash="4ac34942072ce49d2971065a82d1068c"/><file name="IntegrationInterface.php" hash="f95f9f1e243c9fd920d27b9299b90f72"/><file name="MagestoreRewardPoints.php" hash="70c4c74fedd4bfb717132d6d825e438d"/><dir name="Observer"><file name="AbstractObserver.php" hash="c3842e2d9cf4714f1692422aee344fd8"/><file name="MagestoreRewardPoints.php" hash="a730c68034ca481fee11472677d3ab2e"/></dir></dir></dir><file name="Install.php" hash="0424ebff627edb0898bcdd64a7a0cdf8"/><file name="Observer.php" hash="670542028659a740d5214f1521ae4fa1"/><file name="Queue.php" hash="afda656a56b9d44d2ce18a60fdce0912"/><file name="Recovery.php" hash="69bd78f2a3d92db91601cf2afa9c131c"/><file name="Request.php" hash="e7e8860a186ae21a7eee44f6f49d6a8c"/><dir name="Resource"><file name="Coupon.php" hash="6079c05e422e9c1ad5327fc881cee7e3"/><dir name="Queue"><file name="Collection.php" hash="61b5b2fb72b1cbc9465b8efa6f161e46"/></dir><file name="Queue.php" hash="fd9ce12e48148c2eb88db7336b43e5ac"/><dir name="Rule"><file name="Collection.php" hash="d38eed437f15d67b21c3be935053fea5"/></dir><file name="Setup.php" hash="5387a1470bf28911ba531ed88e156569"/></dir><file name="Webtracking.php" hash="215ef9c2e62d6312a336dab044eb691d"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ConfigureController.php" hash="0b7a6beed2fc4eed01ad7c3363a73dbb"/><dir name="Extension"><file name="AbstractController.php" hash="fa816f490f29820c3b3faa17a3fc00e5"/><file name="RewardPointsController.php" hash="3e94e5ae4d467abf03f41e260b0421f9"/></dir><file name="InstallController.php" hash="ce0898cd92b4d581a2991287f9796029"/><file name="MgconnectorController.php" hash="8eecb0d7625336661d2b541d64999f8a"/><file name="QueueController.php" hash="4528125e9acba5604f97717b3ff49fb5"/></dir><file name="RecoveryController.php" hash="a2493669b27287ceb4ada2f9128f5c08"/><file name="WebtrackingController.php" hash="03835c6f4760d203ed81dcea6b591de5"/></dir><dir name="etc"><file name="adminhtml.xml" hash="a417737a2225ef9f70b47eef77d75b7c"/><file name="api.xml" hash="fce44705bb4418403d2b9494bf32415c"/><file name="config.xml" hash="22fa46046ce5f9bf327a2e569a48241a"/></dir><dir name="sql"><dir name="mgconnector_setup"><file name="mysql4-install-1.0.0.13.php" hash="6d0bc421987b0238e350003629e8c464"/><file name="mysql4-upgrade-1.0.0.13-1.0.0.14.php" hash="2c28f665f2a8f78cdfc0b121703734af"/><file name="mysql4-upgrade-1.0.0.14-1.0.0.15.php" hash="284433b68df4ce4e83389db33f4a197c"/><file name="mysql4-upgrade-1.0.0.14-1.1.0.0.php" hash="2042704f23d7337ba3d0901f662096a8"/><file name="mysql4-upgrade-1.1.0.5-1.1.0.6.php" hash="2cc5dc8b986cd4ea1a70519ca59a7be9"/><file name="mysql4-upgrade-1.1.2.8-1.1.2.9.php" hash="ef7be7f476ed01e81fe8f9a62b63d008"/><file name="mysql4-upgrade-1.1.2.8-1.3.0.0.php" hash="fef6b0ee2a43cd42036ca12915885794"/><file name="mysql4-upgrade-1.1.2.9-1.1.3.0.php" hash="4871718266ef707c3b136e6d5591ed25"/><file name="mysql4-upgrade-1.4.10.4-1.5.0.0.php" hash="e4057db88fb1a28b0bdf5a8317cb7996"/><file name="mysql4-upgrade-1.4.7.2-1.4.8.0.php" hash="d2b686bdedc6645a5c4f9609c6cea434"/><file name="mysql4-upgrade-1.5.0.0-1.5.0.1.php" hash="6164dd763580d0dbcdd489250d800f86"/></dir></dir></dir></dir></target>
17
  <target name="mageetc">
18
  <dir name="modules"><file name="Remarkety_Mgconnector.xml" hash="d584b234f653fbf34376e7dcb8caf117"/></dir></target>
19
  <target name="magedesign">
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Remarkety_Mgconnector</name>
4
+ <version>1.5.1.9</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl-3.0.html">GPL v3</license>
7
  <channel>community</channel>
9
  <summary>Remarkety Magento Connector</summary>
10
  <description>Remarkety Magento Connector</description>
11
  <notes>No comments</notes>
12
+ <date>2017-07-13</date>
13
+ <time>9-45-11</time>
14
  <contents>
15
  <target name="magecommunity">
16
+ <dir name="Remarkety"><dir name="Mgconnector"><dir name="Block"><dir name="Adminhtml"><dir name="Configuration"><dir name="Complete"><file name="Form.php" hash="e6dc10d742071fe8d041801d4ae605ff"/></dir><file name="Complete.php" hash="d816f575e8ef99c8dbb4440666963bd0"/><dir name="Configuration"><file name="Form.php" hash="861b674ee5ac1e384fd68e29bd59bb02"/></dir><file name="Configuration.php" hash="8f8c4988205d9d1e2c7cd23c27a9483f"/><dir name="Install"><file name="Form.php" hash="03f1bcb7b302825f5fecffd05358aa54"/></dir><file name="Install.php" hash="9c093e25a8cc9a1fe16c87cfea2e3819"/><dir name="Upgrade"><file name="Form.php" hash="9af9dbeae95cbcdae2ec32632447f9c6"/></dir><file name="Upgrade.php" hash="93222bbdfff6b417b4b6ecbfc7c3d764"/></dir><file name="Configuration.php" hash="4df74b83acfbbe6e6fdaa708f0d9ba7e"/><dir name="Extension"><file name="RewardPoints.php" hash="82e320930f59dfd45e5aa73005118833"/></dir><dir name="Install"><dir name="Complete"><file name="Form.php" hash="fd219a65921dba3099ba77166f59e8da"/></dir><file name="Complete.php" hash="c20351873d05cde757620ae6458c1ec4"/><dir name="Install"><dir name="Create"><file name="Form.php" hash="22db1b2653b7ab9cca359a779f413d2a"/></dir><file name="Create.php" hash="bcd942c4fd64543c1b65001ec84d0d71"/><dir name="Login"><file name="Form.php" hash="acebe35949c5cf55e4b15fc04f5de086"/></dir><file name="Login.php" hash="6f7e30f2c36e56925be25496fde1e29a"/></dir><dir name="Upgrade"><file name="Form.php" hash="490a20b1e39d153af18e90844593c772"/></dir><file name="Upgrade.php" hash="5e30edfcc5954ccf65dcd36192356bed"/><dir name="Welcome"><file name="Form.php" hash="b4f135c3c0106a8391931d6d5865d599"/><file name="Store.php" hash="0eea3b94c83c8e4c3a4b1a022d5c02b4"/></dir><file name="Welcome.php" hash="de47e1c94e4073e2d2af94a0b5455250"/></dir><dir name="Queue"><dir name="Configure"><file name="Form.php" hash="2bf7ccf56114a0830fc142db22c50984"/></dir><file name="Configure.php" hash="87841e46d93c568bdd09304d016de589"/><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="EventType.php" hash="13fd2faaa07dc11d6052ab9e0c6a4261"/><file name="Status.php" hash="7f087c6d8e55b67d5a7781a31d1ed924"/></dir></dir></dir><file name="Grid.php" hash="80be08c235836e185bec22d439d4e95b"/></dir><file name="Queue.php" hash="b778ce9202431147083365b8021103d0"/></dir><dir name="Tracking"><file name="Base.php" hash="ab4abb09bcff0e5465ed4ac6b8f78a6e"/><file name="General.php" hash="2fbff52cfe2924412376bbb4328068be"/><file name="Product.php" hash="11fd52b220b73fb5f2dc87a4684b056a"/></dir></dir><dir name="Helper"><file name="Configuration.php" hash="206263a78f609c8e7a060ccc974cb27e"/><file name="Data.php" hash="e07e033f6594609aa78c82a45708dd85"/><file name="Extension.php" hash="5788a232ffaa32674b4bfc1e12e4ea98"/><file name="Links.php" hash="9f154ee8056f27f8b42f1a42880bb90a"/><file name="Urls.php" hash="2d431aa22e9cd1595c421502ecda62b8"/></dir><dir name="Model"><dir name="Core"><file name="Api.php" hash="3e87c7f2c0fc116ccba52e4f9e933ad2"/></dir><file name="Core.php" hash="c83b08ab26afb676dce793e9b595b446"/><dir name="Extension"><dir name="RewardPoints"><file name="AbstractIntegration.php" hash="4ac34942072ce49d2971065a82d1068c"/><file name="IntegrationInterface.php" hash="f95f9f1e243c9fd920d27b9299b90f72"/><file name="MagestoreRewardPoints.php" hash="70c4c74fedd4bfb717132d6d825e438d"/><dir name="Observer"><file name="AbstractObserver.php" hash="c3842e2d9cf4714f1692422aee344fd8"/><file name="MagestoreRewardPoints.php" hash="a730c68034ca481fee11472677d3ab2e"/></dir></dir></dir><file name="Install.php" hash="0424ebff627edb0898bcdd64a7a0cdf8"/><file name="Observer.php" hash="4ae569e80f3dcd0fa88bf4b6fb3e77f5"/><file name="Queue.php" hash="afda656a56b9d44d2ce18a60fdce0912"/><file name="Recovery.php" hash="69bd78f2a3d92db91601cf2afa9c131c"/><file name="Request.php" hash="e7e8860a186ae21a7eee44f6f49d6a8c"/><dir name="Resource"><file name="Coupon.php" hash="6079c05e422e9c1ad5327fc881cee7e3"/><dir name="Queue"><file name="Collection.php" hash="61b5b2fb72b1cbc9465b8efa6f161e46"/></dir><file name="Queue.php" hash="fd9ce12e48148c2eb88db7336b43e5ac"/><dir name="Rule"><file name="Collection.php" hash="d38eed437f15d67b21c3be935053fea5"/></dir><file name="Setup.php" hash="5387a1470bf28911ba531ed88e156569"/></dir><file name="Webtracking.php" hash="215ef9c2e62d6312a336dab044eb691d"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ConfigureController.php" hash="0b7a6beed2fc4eed01ad7c3363a73dbb"/><dir name="Extension"><file name="AbstractController.php" hash="fa816f490f29820c3b3faa17a3fc00e5"/><file name="RewardPointsController.php" hash="3e94e5ae4d467abf03f41e260b0421f9"/></dir><file name="InstallController.php" hash="ce0898cd92b4d581a2991287f9796029"/><file name="MgconnectorController.php" hash="8eecb0d7625336661d2b541d64999f8a"/><file name="QueueController.php" hash="755f4566823ac20992cd8d48dce3e4b4"/></dir><file name="RecoveryController.php" hash="a2493669b27287ceb4ada2f9128f5c08"/><file name="WebtrackingController.php" hash="03835c6f4760d203ed81dcea6b591de5"/></dir><dir name="etc"><file name="adminhtml.xml" hash="a417737a2225ef9f70b47eef77d75b7c"/><file name="api.xml" hash="fce44705bb4418403d2b9494bf32415c"/><file name="config.xml" hash="2ef1ed538e0c807ae1722d9189a4219f"/></dir><dir name="sql"><dir name="mgconnector_setup"><file name="mysql4-install-1.0.0.13.php" hash="6d0bc421987b0238e350003629e8c464"/><file name="mysql4-upgrade-1.0.0.13-1.0.0.14.php" hash="2c28f665f2a8f78cdfc0b121703734af"/><file name="mysql4-upgrade-1.0.0.14-1.0.0.15.php" hash="284433b68df4ce4e83389db33f4a197c"/><file name="mysql4-upgrade-1.0.0.14-1.1.0.0.php" hash="2042704f23d7337ba3d0901f662096a8"/><file name="mysql4-upgrade-1.1.0.5-1.1.0.6.php" hash="2cc5dc8b986cd4ea1a70519ca59a7be9"/><file name="mysql4-upgrade-1.1.2.8-1.1.2.9.php" hash="ef7be7f476ed01e81fe8f9a62b63d008"/><file name="mysql4-upgrade-1.1.2.8-1.3.0.0.php" hash="fef6b0ee2a43cd42036ca12915885794"/><file name="mysql4-upgrade-1.1.2.9-1.1.3.0.php" hash="4871718266ef707c3b136e6d5591ed25"/><file name="mysql4-upgrade-1.4.10.4-1.5.0.0.php" hash="e4057db88fb1a28b0bdf5a8317cb7996"/><file name="mysql4-upgrade-1.4.7.2-1.4.8.0.php" hash="d2b686bdedc6645a5c4f9609c6cea434"/><file name="mysql4-upgrade-1.5.0.0-1.5.0.1.php" hash="6164dd763580d0dbcdd489250d800f86"/></dir></dir></dir></dir></target>
17
  <target name="mageetc">
18
  <dir name="modules"><file name="Remarkety_Mgconnector.xml" hash="d584b234f653fbf34376e7dcb8caf117"/></dir></target>
19
  <target name="magedesign">