mobile_assistant_connector - Version 1.3.6

Version Notes

Fixed:
- some possible problems with rendering layout

Download this release

Release Info

Developer eMagicOne
Extension mobile_assistant_connector
Version 1.3.6
Comparing to
See all releases


Code changes from version 1.3.5 to 1.3.6

app/code/community/Emagicone/Mobassistantconnector/Helper/Data.php CHANGED
@@ -96,6 +96,15 @@ class Emagicone_Mobassistantconnector_Helper_Data extends Mage_Core_Helper_Abstr
96
  if (json_last_error() != JSON_ERROR_NONE) {
97
  $json = array();
98
  }
 
 
 
 
 
 
 
 
 
99
  }
100
  }
101
  else {
96
  if (json_last_error() != JSON_ERROR_NONE) {
97
  $json = array();
98
  }
99
+ // $d_r = Mage::helper('core')->jsonDecode($response, Zend_Json::TYPE_OBJECT);
100
+ if (!empty($json)) {
101
+ $json_response = var_export($json, true);
102
+ Mage::log(
103
+ "Google response: ({$json_response})",
104
+ null,
105
+ 'emagicone_mobassistantconnector.log'
106
+ );
107
+ }
108
  }
109
  }
110
  else {
app/code/community/Emagicone/Mobassistantconnector/Helper/Test.php ADDED
File without changes
app/code/community/Emagicone/Mobassistantconnector/Model/Observer.php CHANGED
@@ -149,13 +149,13 @@ class Emagicone_Mobassistantconnector_Model_Observer
149
  Mage::helper('mobassistantconnector')->proceedGoogleResponse($response, array('device_id' => $value['push_device_id'],
150
  'app_connection_id' => $value['app_connection_id']));
151
 
152
- $d_r = Mage::helper('core')->jsonDecode($response, Zend_Json::TYPE_OBJECT);
153
 
154
  Mage::log(
155
  "Google response: (multicast_id = {$d_r->multicast_id}, success = {$d_r->success}, failure = {$d_r->failure}, canonical_ids = {$d_r->canonical_ids})",
156
  null,
157
  'emagicone_mobassistantconnector.log'
158
- );
159
  }
160
  // }
161
  }
149
  Mage::helper('mobassistantconnector')->proceedGoogleResponse($response, array('device_id' => $value['push_device_id'],
150
  'app_connection_id' => $value['app_connection_id']));
151
 
152
+ /* $d_r = Mage::helper('core')->jsonDecode($response, Zend_Json::TYPE_OBJECT);
153
 
154
  Mage::log(
155
  "Google response: (multicast_id = {$d_r->multicast_id}, success = {$d_r->success}, failure = {$d_r->failure}, canonical_ids = {$d_r->canonical_ids})",
156
  null,
157
  'emagicone_mobassistantconnector.log'
158
+ );*/
159
  }
160
  // }
161
  }
app/code/community/Emagicone/Mobassistantconnector/controllers/IndexController.php CHANGED
@@ -28,14 +28,14 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
28
  private $hash_only;
29
  private $session_key;
30
  const GSM_URL = 'https://android.googleapis.com/gcm/send';
31
- const MB_VERSION = '97';
32
 
33
  public function indexAction()
34
  {
35
  // Mage::app()->cleanCache();
36
  if (intval(Mage::getStoreConfig('mobassistantconnectorinfosec/emogeneral/status')) != 1) $this->generate_output('module_disabled');
37
 
38
- $this->loadLayout()->renderLayout();
39
 
40
  $def_currency = $this->_get_default_currency();
41
  $this->def_currency = $def_currency['currency'];
@@ -268,6 +268,18 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
268
  // $data = $this->to_json($data);
269
  $data = Mage::helper('core')->jsonEncode($data);
270
 
 
 
 
 
 
 
 
 
 
 
 
 
271
  if ($this->callback) {
272
  header('Content-Type: text/javascript;charset=utf-8');
273
  die($this->callback . '(' . $data . ');');
@@ -1615,6 +1627,7 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
1615
  ->addObject($invoice)
1616
  ->addObject($invoice->getOrder());
1617
  $transactionSave->save();
 
1618
  $order->addStatusHistoryComment('Invoice was created from Mobile Assistant.', false);
1619
  $order->save();
1620
  $result = array('success' => 'true');
28
  private $hash_only;
29
  private $session_key;
30
  const GSM_URL = 'https://android.googleapis.com/gcm/send';
31
+ const MB_VERSION = '98';
32
 
33
  public function indexAction()
34
  {
35
  // Mage::app()->cleanCache();
36
  if (intval(Mage::getStoreConfig('mobassistantconnectorinfosec/emogeneral/status')) != 1) $this->generate_output('module_disabled');
37
 
38
+ // $this->loadLayout()->renderLayout();
39
 
40
  $def_currency = $this->_get_default_currency();
41
  $this->def_currency = $def_currency['currency'];
268
  // $data = $this->to_json($data);
269
  $data = Mage::helper('core')->jsonEncode($data);
270
 
271
+ // $this->getResponse()->clearHeaders()->setHeader('Content-type', 'application/json');
272
+ // $this->getResponse()->setBody($data);
273
+ // $this->getResponse()->sendResponse();
274
+ // die();
275
+
276
+ if ($this->callback) {
277
+ header('Content-Type: text/javascript;charset=utf-8');
278
+ die($this->callback . '(' . $data . ');');
279
+ } else {
280
+ header('Content-Type: text/javascript;charset=utf-8');
281
+ die($data);
282
+ }
283
  if ($this->callback) {
284
  header('Content-Type: text/javascript;charset=utf-8');
285
  die($this->callback . '(' . $data . ');');
1627
  ->addObject($invoice)
1628
  ->addObject($invoice->getOrder());
1629
  $transactionSave->save();
1630
+ $order->setIsInProcess(true);
1631
  $order->addStatusHistoryComment('Invoice was created from Mobile Assistant.', false);
1632
  $order->save();
1633
  $result = array('success' => 'true');
app/code/community/Emagicone/Mobassistantconnector/etc/config.xml CHANGED
@@ -15,7 +15,7 @@
15
 
16
  <modules>
17
  <Emagicone_Mobassistantconnector>
18
- <version>1.3.5</version>
19
  </Emagicone_Mobassistantconnector>
20
  </modules>
21
  <frontend>
15
 
16
  <modules>
17
  <Emagicone_Mobassistantconnector>
18
+ <version>1.3.6</version>
19
  </Emagicone_Mobassistantconnector>
20
  </modules>
21
  <frontend>
app/code/community/Emagicone/Mobassistantconnector/sql/em1_setup/install-2.0.1.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Created by PhpStorm.
4
+ * User: jarchik
5
+ * Date: 5/13/15
6
+ * Time: 11:41 AM
7
+ */
8
+
9
+ $installer = $this;
10
+
11
+ $installer->startSetup();
12
+
13
+ /*$table = $installer->getConnection()
14
+ ->newTable($installer->getTable('emo_assistantconnector/sessions'))
15
+ ->addColumn('key', Varien_Db_Ddl_Table::TYPE_VARCHAR, 100, array(
16
+ 'identity' => false,
17
+ 'primary' => true,
18
+ ), 'Key')
19
+ ->addColumn('date_added', Varien_Db_Ddl_Table::TYPE_INTEGER, 11, array(
20
+ 'nullable' => false,
21
+ 'unsigned' => false,
22
+ ), 'Date added');
23
+ $installer->getConnection()->createTable($table);*/
24
+
25
+ $installer->run("
26
+ -- DROP TABLE IF EXISTS {$this->getTable('emagicone_mobassistantconnector_sessions')};
27
+ CREATE TABLE IF NOT EXISTS {$this->getTable('emagicone_mobassistantconnector_sessions')} (
28
+ `session_id` int(11) NOT NULL auto_increment,
29
+ `session_key` varchar(100) NOT NULL default '',
30
+ `date_added` int(11) NOT NULL,
31
+ PRIMARY KEY (`session_id`)
32
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
33
+ ");
34
+
35
+
36
+
37
+ /*$table = $installer->getConnection()
38
+ ->newTable($installer->getTable('emagicone_mobassistantconnector/failed'))
39
+ ->addColumn('ip', Varien_Db_Ddl_Table::TYPE_VARCHAR, 100, array(
40
+ 'identity' => false,
41
+ 'primary' => true,
42
+ ), 'Id')
43
+ ->addColumn('date_added', Varien_Db_Ddl_Table::TYPE_INTEGER, 11, array(
44
+ 'nullable' => false,
45
+ 'unsigned' => false,
46
+ ), 'Date added');
47
+ $installer->getConnection()->createTable($table);*/
48
+
49
+ $installer->run("
50
+ -- DROP TABLE IF EXISTS {$this->getTable('emagicone_mobassistantconnector_failed_login')};
51
+ CREATE TABLE IF NOT EXISTS {$this->getTable('emagicone_mobassistantconnector_failed_login')} (
52
+ `attempt_id` int(11) NOT NULL auto_increment,
53
+ `ip` varchar(20) NOT NULL default '',
54
+ `date_added` int(11) NOT NULL,
55
+ PRIMARY KEY (`attempt_id`)
56
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
57
+ ");
58
+
59
+
60
+ $installer->endSetup();
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>mobile_assistant_connector</name>
4
- <version>1.3.5</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl.html">GNU</license>
7
  <channel>community</channel>
@@ -9,11 +9,11 @@
9
  <summary>Mobile Assistant Connector</summary>
10
  <description>Mobile Assistant Connector</description>
11
  <notes>Fixed:&#xD;
12
- - minor bugs</notes>
13
  <authors><author><name>eMagicOne</name><user>mobile</user><email>mobile@emagicone.com</email></author></authors>
14
- <date>2016-03-23</date>
15
- <time>16:08:44</time>
16
- <contents><target name="magecommunity"><dir name="Emagicone"><dir name="Mobassistantconnector"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><file name="Qrcode.php" hash="70dea8e46b446b780f11cd4ee6b198aa"/><file name="Qrconfig.php" hash="dbc08b9915140181ec59f9c625abef75"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Access.php" hash="c6f4c96ca225bbc72cb829c59f7808f1"/><file name="Data.php" hash="f17fda0c656e38c4b239a3be875b7ab3"/></dir><dir name="Model"><file name="Defpassword.php" hash="921e5344ba325ddf1aaba6aeb2202696"/><file name="Failed.php" hash="7da654c3cf1e9a3f5a55da7f36192117"/><file name="Login.php" hash="bedbce507924854910524fbabe1c4948"/><file name="Observer.php" hash="d927259cc475e250006a5f0f742a3edc"/><file name="Order.php" hash="f3d5529e0504ea0265cb661e03f41109"/><file name="Password.php" hash="66e2050ecc7b56deb654b5476ac1746c"/><dir name="Resource"><dir name="Failed"><file name="Collection.php" hash="18980688d80660f6a663a2c4dce20f54"/></dir><file name="Failed.php" hash="a69ca1239d3400097fabc415ee02751b"/><dir name="Sessions"><file name="Collection.php" hash="397e9a6f637472b59abe42bca09ea616"/></dir><file name="Sessions.php" hash="4d9f6cdd340fd95549d287c6107285ac"/></dir><file name="Sessions.php" hash="e3a32e26446e4cd27032c99dde8d4cfa"/></dir><dir name="controllers"><file name="IndexController.php" hash="d019473fced51e896606dd52ea295d38"/><dir name="adminhtml"><file name="IndexController.php" hash="e8fc499b74daeef9dbf856e813cbefb8"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="333ed888c7f8a1e067821b6547e34340"/><file name="config.xml" hash="16651c745f46f5d353c698bf70ef6706"/><file name="system.xml" hash="97fbc5425f62367d796080d5e84ae20c"/></dir><dir name="sql"><dir name="emagicone_mobassistantconnector_setup"><file name="install-1.2.1.php" hash="2394c0bf43b7c8f15fa83d957ed15ffd"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Emagicone_Mobassistantconnector.xml" hash="7bb654478173d96ad294000fc9625820"/></dir></target><target name="magelocale"><dir><dir name="en_GB"><file name="Emagicone_Mobassistantconnector.csv" hash="eaf733f81ff47627c4389d487c93709f"/></dir><dir name="en_US"><file name="Emagicone_Mobassistantconnector.csv" hash="510d79a25c0bfb7a096aab57d8c5b458"/></dir><dir name="es_ES"><file name="Emagicone_Mobassistantconnector.csv" hash="acc37c432dd8b4134844291931b70fbf"/></dir><dir name="fr_FR"><file name="Emagicone_Mobassistantconnector.csv" hash="76c48723a6bbd59534781fd3c7f6d86e"/></dir><dir name="ru_RU"><file name="Emagicone_Mobassistantconnector.csv" hash="2346397cbe029dcc724717b953a3f38c"/></dir><dir name="uk_UA"><file name="Emagicone_Mobassistantconnector.csv" hash="cad0e0c3ec7603e6b886d815357d1766"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="mobassistantconnector.xml" hash="b5c4d423be8de0c5d73d64783dcb9a3c"/></dir><dir name="template"><dir name="mobassistantconnector"><file name="connect_qrcode.phtml" hash="0a7663b0e688bb0da172e256b79edac2"/><file name="jsinit.phtml" hash="0a462da90a18be15dd5b3305c02605b5"/></dir></dir></dir></dir></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><extension><name>curl</name><min>1.0</min><max>3.0</max></extension><extension><name>json</name><min>1.0</min><max>3.0</max></extension><extension><name>date</name><min>1.0</min><max>3.0</max></extension></required></dependencies>
19
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>mobile_assistant_connector</name>
4
+ <version>1.3.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl.html">GNU</license>
7
  <channel>community</channel>
9
  <summary>Mobile Assistant Connector</summary>
10
  <description>Mobile Assistant Connector</description>
11
  <notes>Fixed:&#xD;
12
+ - some possible problems with rendering layout</notes>
13
  <authors><author><name>eMagicOne</name><user>mobile</user><email>mobile@emagicone.com</email></author></authors>
14
+ <date>2016-04-07</date>
15
+ <time>14:57:26</time>
16
+ <contents><target name="magecommunity"><dir name="Emagicone"><dir name="Mobassistantconnector"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><file name="Qrcode.php" hash="70dea8e46b446b780f11cd4ee6b198aa"/><file name="Qrconfig.php" hash="dbc08b9915140181ec59f9c625abef75"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Access.php" hash="c6f4c96ca225bbc72cb829c59f7808f1"/><file name="Data.php" hash="0f1f35e6ef831e6017a989f24d96341a"/><file name="Test.php" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="Model"><file name="Defpassword.php" hash="921e5344ba325ddf1aaba6aeb2202696"/><file name="Failed.php" hash="7da654c3cf1e9a3f5a55da7f36192117"/><file name="Login.php" hash="bedbce507924854910524fbabe1c4948"/><file name="Observer.php" hash="a63058c84f6c29393ebd497e8ca657d3"/><file name="Order.php" hash="f3d5529e0504ea0265cb661e03f41109"/><file name="Password.php" hash="66e2050ecc7b56deb654b5476ac1746c"/><dir name="Resource"><dir name="Failed"><file name="Collection.php" hash="18980688d80660f6a663a2c4dce20f54"/></dir><file name="Failed.php" hash="a69ca1239d3400097fabc415ee02751b"/><dir name="Sessions"><file name="Collection.php" hash="397e9a6f637472b59abe42bca09ea616"/></dir><file name="Sessions.php" hash="4d9f6cdd340fd95549d287c6107285ac"/></dir><file name="Sessions.php" hash="e3a32e26446e4cd27032c99dde8d4cfa"/></dir><dir name="controllers"><file name="IndexController.php" hash="86fd5a1b2d6291597054c57db4ff0aeb"/><dir name="adminhtml"><file name="IndexController.php" hash="e8fc499b74daeef9dbf856e813cbefb8"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="333ed888c7f8a1e067821b6547e34340"/><file name="config.xml" hash="ffccb95ec082ab9dede5223bd833cb94"/><file name="system.xml" hash="97fbc5425f62367d796080d5e84ae20c"/></dir><dir name="sql"><dir name="em1_setup"><file name="install-2.0.1.php" hash="2394c0bf43b7c8f15fa83d957ed15ffd"/></dir><dir name="emagicone_mobassistantconnector_setup"><file name="install-1.2.1.php" hash="2394c0bf43b7c8f15fa83d957ed15ffd"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Emagicone_Mobassistantconnector.xml" hash="7bb654478173d96ad294000fc9625820"/></dir></target><target name="magelocale"><dir><dir name="en_GB"><file name="Emagicone_Mobassistantconnector.csv" hash="eaf733f81ff47627c4389d487c93709f"/></dir><dir name="en_US"><file name="Emagicone_Mobassistantconnector.csv" hash="510d79a25c0bfb7a096aab57d8c5b458"/></dir><dir name="es_ES"><file name="Emagicone_Mobassistantconnector.csv" hash="acc37c432dd8b4134844291931b70fbf"/></dir><dir name="fr_FR"><file name="Emagicone_Mobassistantconnector.csv" hash="76c48723a6bbd59534781fd3c7f6d86e"/></dir><dir name="ru_RU"><file name="Emagicone_Mobassistantconnector.csv" hash="2346397cbe029dcc724717b953a3f38c"/></dir><dir name="uk_UA"><file name="Emagicone_Mobassistantconnector.csv" hash="cad0e0c3ec7603e6b886d815357d1766"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="mobassistantconnector.xml" hash="b5c4d423be8de0c5d73d64783dcb9a3c"/></dir><dir name="template"><dir name="mobassistantconnector"><file name="connect_qrcode.phtml" hash="0a7663b0e688bb0da172e256b79edac2"/><file name="jsinit.phtml" hash="0a462da90a18be15dd5b3305c02605b5"/></dir></dir></dir></dir></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><extension><name>curl</name><min>1.0</min><max>3.0</max></extension><extension><name>json</name><min>1.0</min><max>3.0</max></extension><extension><name>date</name><min>1.0</min><max>3.0</max></extension></required></dependencies>
19
  </package>