SimpleRelevance_Integration - Version 0.0.8

Version Notes

-- version 0.0.8
Allowing to send ALL products and customers on each save

-- version 0.0.7
Bug fix on auto submit products and users on Magento 1.6.2.0

-- version 0.0.6
Correcting but on orders export (timestamp)

-- version 0.0.5
Automatic Customer and Product submission

-- version 0.0.4
Bug fixes, new data on product import, debug facility

-- version 0.0.1
First release

Download this release

Release Info

Developer Magento Core Team
Extension SimpleRelevance_Integration
Version 0.0.8
Comparing to
See all releases


Code changes from version 0.0.7 to 0.0.8

app/code/community/SimpleRelevance/Integration/Model/Observer.php CHANGED
@@ -74,6 +74,7 @@ class SimpleRelevance_Integration_Model_Observer
74
  }
75
 
76
  $orderId = (int)(Mage::getSingleton('checkout/type_onepage')->getCheckout()->getLastOrderId());
 
77
  if($orderId){
78
  $order = Mage::getModel('sales/order')->load($orderId);
79
  }
@@ -109,17 +110,17 @@ class SimpleRelevance_Integration_Model_Observer
109
 
110
  $customer = $observer->getEvent()->getCustomer();
111
 
112
- if($customer->isObjectNew() OR !$customer->getOrigData()){
113
- $api = Mage::getModel('simple_relevance/api', Mage::helper('simple_relevance')->config('apikey'));
114
 
115
- $api->async = 1;
116
 
117
- $customerData = array(
118
- 'email' => $customer->getEmail(),
119
- 'user_id' => $customer->getId(),
120
- );
121
- $api->postUsers($customerData);
122
- }
123
  }
124
 
125
  /**
@@ -136,21 +137,21 @@ class SimpleRelevance_Integration_Model_Observer
136
 
137
  $product = $observer->getEvent()->getProduct();
138
 
139
- if($product->isObjectNew() OR !$product->getOrigData()){
140
- $api = Mage::getModel('simple_relevance/api', Mage::helper('simple_relevance')->config('apikey'));
141
 
142
- $api->async = 1;
143
 
144
- $dict = Mage::helper('simple_relevance')->getProductDict($product);
145
 
146
- $data = array(
147
- 'item_name' => $product->getName(),
148
- 'item_id' => $product->getId(),
149
- 'data_dict' => $dict,
150
- );
151
 
152
- $api->postItems($data);
153
- }
154
 
155
  }
156
 
74
  }
75
 
76
  $orderId = (int)(Mage::getSingleton('checkout/type_onepage')->getCheckout()->getLastOrderId());
77
+
78
  if($orderId){
79
  $order = Mage::getModel('sales/order')->load($orderId);
80
  }
110
 
111
  $customer = $observer->getEvent()->getCustomer();
112
 
113
+ //if($customer->isObjectNew() OR !$customer->getOrigData()){
114
+ $api = Mage::getModel('simple_relevance/api', Mage::helper('simple_relevance')->config('apikey'));
115
 
116
+ $api->async = 1;
117
 
118
+ $customerData = array(
119
+ 'email' => $customer->getEmail(),
120
+ 'user_id' => $customer->getId(),
121
+ );
122
+ $api->postUsers($customerData);
123
+ //}
124
  }
125
 
126
  /**
137
 
138
  $product = $observer->getEvent()->getProduct();
139
 
140
+ //if($product->isObjectNew() OR !$product->getOrigData()){
141
+ $api = Mage::getModel('simple_relevance/api', Mage::helper('simple_relevance')->config('apikey'));
142
 
143
+ $api->async = 1;
144
 
145
+ $dict = Mage::helper('simple_relevance')->getProductDict($product);
146
 
147
+ $data = array(
148
+ 'item_name' => $product->getName(),
149
+ 'item_id' => $product->getId(),
150
+ 'data_dict' => $dict,
151
+ );
152
 
153
+ $api->postItems($data);
154
+ //}
155
 
156
  }
157
 
app/code/community/SimpleRelevance/Integration/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <SimpleRelevance_Integration>
5
- <version>0.0.7</version>
6
  </SimpleRelevance_Integration>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <SimpleRelevance_Integration>
5
+ <version>0.0.8</version>
6
  </SimpleRelevance_Integration>
7
  </modules>
8
  <global>
package.xml CHANGED
@@ -1,14 +1,17 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>SimpleRelevance_Integration</name>
4
- <version>0.0.7</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>SimpleRelevance integration module</summary>
10
  <description>Featuring customers, products and orders.</description>
11
- <notes>-- version 0.0.7
 
 
 
12
  Bug fix on auto submit products and users on Magento 1.6.2.0
13
 
14
  -- version 0.0.6
@@ -24,8 +27,8 @@
24
  First release</notes>
25
  <authors><author><name>SimpleRelevance DEV team</name><user>auto-converted</user><email>info@simplerelevance.com</email></author></authors>
26
  <date>2012-04-18</date>
27
- <time>13:43:47</time>
28
- <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="simple_relevance.xml" hash="f0d73f30b7aeff70f63b295327ac906c"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="simple_relevance"><dir name="images"><file name="box-tab.png" hash="208977131fcbe078f10af53295ac686c"/><file name="simplerelevance-header.png" hash="c25099645618a32b8fdb8d4d7786cf2c"/></dir><file name="css.css" hash="c354dd9c0e48bdb99089b1756058efc1"/><file name="js.js" hash="5831e6e503ebd86f93e07230b56a6d2f"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="SimpleRelevance_Integration.csv" hash="05e3ba1c882990c307dbe510bc0bea36"/></dir></target><target name="mageetc"><dir name="modules"><file name="SimpleRelevance_Integration.xml" hash="6ad0b704a9e62de159f09babfe2482d5"/></dir></target><target name="magecommunity"><dir name="SimpleRelevance"><dir name="Integration"><dir name="controllers"><dir name="Adminhtml"><file name="ExportController.php" hash="840104daa154dab436ab043f8ea217af"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="18e9829f6252920f6bf01a5340377b3a"/><file name="config.xml" hash="8662d5c5d6a5486b0475117e041a54a4"/><file name="system.xml" hash="638f6aac1d2d19b8b9d9ca4fed0065f5"/></dir><dir name="Helper"><file name="Data.php" hash="7d3955676a03b690a81c4aa98df25514"/></dir><dir name="Model"><file name="Api.php" hash="3598b602c1adf8f425a57836a743e44f"/><file name="Observer.php" hash="b0113d601c7d99516c8376abbfd2e401"/><file name="Purchase.php" hash="dae8d7e715381a9ec160123f27800b15"/></dir></dir></dir></target></contents>
29
  <compatible/>
30
  <dependencies/>
31
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>SimpleRelevance_Integration</name>
4
+ <version>0.0.8</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>SimpleRelevance integration module</summary>
10
  <description>Featuring customers, products and orders.</description>
11
+ <notes>-- version 0.0.8
12
+ Allowing to send ALL products and customers on each save
13
+
14
+ -- version 0.0.7
15
  Bug fix on auto submit products and users on Magento 1.6.2.0
16
 
17
  -- version 0.0.6
27
  First release</notes>
28
  <authors><author><name>SimpleRelevance DEV team</name><user>auto-converted</user><email>info@simplerelevance.com</email></author></authors>
29
  <date>2012-04-18</date>
30
+ <time>18:44:49</time>
31
+ <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="simple_relevance.xml" hash="f0d73f30b7aeff70f63b295327ac906c"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="simple_relevance"><dir name="images"><file name="box-tab.png" hash="208977131fcbe078f10af53295ac686c"/><file name="simplerelevance-header.png" hash="c25099645618a32b8fdb8d4d7786cf2c"/></dir><file name="css.css" hash="c354dd9c0e48bdb99089b1756058efc1"/><file name="js.js" hash="5831e6e503ebd86f93e07230b56a6d2f"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="SimpleRelevance_Integration.csv" hash="05e3ba1c882990c307dbe510bc0bea36"/></dir></target><target name="mageetc"><dir name="modules"><file name="SimpleRelevance_Integration.xml" hash="6ad0b704a9e62de159f09babfe2482d5"/></dir></target><target name="magecommunity"><dir name="SimpleRelevance"><dir name="Integration"><dir name="controllers"><dir name="Adminhtml"><file name="ExportController.php" hash="840104daa154dab436ab043f8ea217af"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="18e9829f6252920f6bf01a5340377b3a"/><file name="config.xml" hash="f64d26c7be32b15e88163175e5b618d2"/><file name="system.xml" hash="638f6aac1d2d19b8b9d9ca4fed0065f5"/></dir><dir name="Helper"><file name="Data.php" hash="7d3955676a03b690a81c4aa98df25514"/></dir><dir name="Model"><file name="Api.php" hash="3598b602c1adf8f425a57836a743e44f"/><file name="Observer.php" hash="8a247ca67158af2d63c737bdabac53b4"/><file name="Purchase.php" hash="dae8d7e715381a9ec160123f27800b15"/></dir></dir></dir></target></contents>
32
  <compatible/>
33
  <dependencies/>
34
  </package>