Interakt_App - Version 1.0.4

Version Notes

For any queries, please contact support@interakt.co

Download this release

Release Info

Developer Peeyush Singhla
Extension Interakt_App
Version 1.0.4
Comparing to
See all releases


Code changes from version 1.0.3 to 1.0.4

app/code/community/Interakt/App/Model/SyncUserData.php CHANGED
@@ -11,11 +11,12 @@ class Interakt_App_Model_SyncUserData
11
  public function getInteraktJs()
12
  {
13
  $this->interakt_app_id=Mage::helper('interakt_app')->getAppId();
 
14
  echo "<script>
15
  (function() {
16
  var interakt = document.createElement('script');
17
  interakt.type = 'text/javascript'; interakt.async = true;
18
- interakt.src = 'http://cdn.interakt.co/interakt/$this->interakt_app_id.js'
19
  var scrpt = document.getElementsByTagName('script')[0];
20
  scrpt.parentNode.insertBefore(interakt, scrpt);
21
  })()
@@ -46,7 +47,7 @@ class Interakt_App_Model_SyncUserData
46
  $email=$data->getEmail();
47
  $createdAt=$data->getCreatedAt();
48
  $name=$data->getName();
49
- $this->user_data=array('email'=>$email,'name'=>$name,'created_at'=>$createdAt);
50
  $response=$this->sendData();
51
  if(isset($response)&& $response['status']=='failure')
52
  {
@@ -55,7 +56,7 @@ class Interakt_App_Model_SyncUserData
55
  $this->total_synced++;
56
  }
57
  unset($customerData);
58
- return $this->total_synced;
59
  }
60
  public function userCount()
61
  {
@@ -67,7 +68,7 @@ class Interakt_App_Model_SyncUserData
67
  $this->interakt_app_id=Mage::helper('interakt_app')->getAppId();
68
  $this->interakt_api_key=Mage::helper('interakt_app')->getApiKey();
69
  $this->user_data=json_encode($this->user_data);
70
- $url='http://api.interakt.co/api/v1/members';
71
  $curl = curl_init();
72
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
73
  curl_setopt($curl, CURLOPT_POST, true);
11
  public function getInteraktJs()
12
  {
13
  $this->interakt_app_id=Mage::helper('interakt_app')->getAppId();
14
+ $protocol=isset($_SERVER['HTTPS'])?'https:':'http:';
15
  echo "<script>
16
  (function() {
17
  var interakt = document.createElement('script');
18
  interakt.type = 'text/javascript'; interakt.async = true;
19
+ interakt.src = '$protocol//cdn.interakt.co/interakt/$this->interakt_app_id.js'
20
  var scrpt = document.getElementsByTagName('script')[0];
21
  scrpt.parentNode.insertBefore(interakt, scrpt);
22
  })()
47
  $email=$data->getEmail();
48
  $createdAt=$data->getCreatedAt();
49
  $name=$data->getName();
50
+ $this->user_data[]=array('email'=>$email,'name'=>$name,'created_at'=>$createdAt);
51
  $response=$this->sendData();
52
  if(isset($response)&& $response['status']=='failure')
53
  {
56
  $this->total_synced++;
57
  }
58
  unset($customerData);
59
+ return json_encode($this->user_data);
60
  }
61
  public function userCount()
62
  {
68
  $this->interakt_app_id=Mage::helper('interakt_app')->getAppId();
69
  $this->interakt_api_key=Mage::helper('interakt_app')->getApiKey();
70
  $this->user_data=json_encode($this->user_data);
71
+ $url='https://app.interakt.co/api/v1/members';
72
  $curl = curl_init();
73
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
74
  curl_setopt($curl, CURLOPT_POST, true);
app/design/adminhtml/default/default/template/interakt_app/button.phtml CHANGED
@@ -33,8 +33,8 @@
33
  else
34
  {
35
  to=from+29;
36
- $('#total_users').text('Users synced from'+from+' to '+to);
37
- from+=29;
38
  offset=offset+29;
39
  syncUser=syncUser+30;
40
  sync();
@@ -50,7 +50,8 @@
50
  }
51
  }
52
  function count() {
53
- if(parseInt(syncUser)>=parseInt(totalUsers))
 
54
  {
55
  alert('Users already synced');
56
  }
33
  else
34
  {
35
  to=from+29;
36
+ $('#total_users').text('Users synced from'+from+' to '+to);
37
+ from+=29;
38
  offset=offset+29;
39
  syncUser=syncUser+30;
40
  sync();
50
  }
51
  }
52
  function count() {
53
+ console.log(syncUser);
54
+ if(parseInt(syncUser)>parseInt(totalUsers))
55
  {
56
  alert('Users already synced');
57
  }
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Interakt_App</name>
4
- <version>1.0.3</version>
5
  <stability>stable</stability>
6
  <license>Massachusetts Institute of Technology License (MITL)</license>
7
  <channel>community</channel>
@@ -41,9 +41,9 @@ Route customer queries to our simplified helpdesk and collect valuable feedback
41
  &lt;/ol&gt;</description>
42
  <notes>For any queries, please contact support@interakt.co</notes>
43
  <authors><author><name>Peeyush Singhla</name><user>peeyush</user><email>peeyush@interakt.co</email></author></authors>
44
- <date>2015-11-20</date>
45
- <time>10:42:24</time>
46
- <contents><target name="magecommunity"><dir><dir name="Interakt"><dir name="App"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><file name="Button.php" hash="ab44aad61b65b29bf8e7643d6f2cc57c"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="49d4d9414b044b21cadefb0130b02cd1"/></dir><dir name="Model"><file name="Observer.php" hash="ba370bf6389e84d495ea28daaf5893e7"/><file name="SyncUserData.php" hash="03501b434bf6fdb5eda154e85cc67df4"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="AppController.php" hash="caf8aec8403946617d218d28369ae8bc"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="1302c629c2abfc004cf2654b19082b7e"/><file name="config.xml" hash="51f4fa966cf64016113580fc6339d7f8"/><file name="system.xml" hash="d711a0961c143b132fe4e9a116d7eeaf"/></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="interakt_app"><file name="button.phtml" hash="9c70663aeba6ddc9d7ab266dfb37b997"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Interakt_App.xml" hash="c4bdf884ff2016bc6e319309f3b773ba"/></dir></dir></target></contents>
47
  <compatible/>
48
  <dependencies><required><php><min>5.3.0</min><max>5.6.4</max></php></required></dependencies>
49
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Interakt_App</name>
4
+ <version>1.0.4</version>
5
  <stability>stable</stability>
6
  <license>Massachusetts Institute of Technology License (MITL)</license>
7
  <channel>community</channel>
41
  &lt;/ol&gt;</description>
42
  <notes>For any queries, please contact support@interakt.co</notes>
43
  <authors><author><name>Peeyush Singhla</name><user>peeyush</user><email>peeyush@interakt.co</email></author></authors>
44
+ <date>2015-12-16</date>
45
+ <time>05:55:10</time>
46
+ <contents><target name="magecommunity"><dir><dir name="Interakt"><dir name="App"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><file name="Button.php" hash="ab44aad61b65b29bf8e7643d6f2cc57c"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="49d4d9414b044b21cadefb0130b02cd1"/></dir><dir name="Model"><file name="Observer.php" hash="ba370bf6389e84d495ea28daaf5893e7"/><file name="SyncUserData.php" hash="914fa6ac2d8bd054ca4e725aee02ab28"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="AppController.php" hash="caf8aec8403946617d218d28369ae8bc"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="1302c629c2abfc004cf2654b19082b7e"/><file name="config.xml" hash="51f4fa966cf64016113580fc6339d7f8"/><file name="system.xml" hash="d711a0961c143b132fe4e9a116d7eeaf"/></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="interakt_app"><file name="button.phtml" hash="7d991fb7ff9fd052cd28c214ef28e81d"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Interakt_App.xml" hash="c4bdf884ff2016bc6e319309f3b773ba"/></dir></dir></target></contents>
47
  <compatible/>
48
  <dependencies><required><php><min>5.3.0</min><max>5.6.4</max></php></required></dependencies>
49
  </package>