mobile_assistant_connector - Version 1.2.2

Version Notes

FIxed:
- Product quantity in case of Stock Management
- Missed tables on some file systems
- Some minor fixes

*Works only with release of app (2.6.1) and higher

Download this release

Release Info

Developer eMagicOne
Extension mobile_assistant_connector
Version 1.2.2
Comparing to
See all releases


Code changes from version 1.2.1 to 1.2.2

app/code/community/Emagicone/Mobassistantconnector/Model/Defpassword.php CHANGED
@@ -21,6 +21,29 @@ class Emagicone_Mobassistantconnector_Model_Defpassword extends Mage_Core_Model_
21
  public function toOptionArray()
22
  {
23
  Mage::app()->cleanCache();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  $password = Mage::getStoreConfig('mobassistantconnectorinfosec/emoaccess/password');
25
  if($password === 'c4ca4238a0b923820dcc509a6f75849b') {
26
  Mage::getSingleton('core/session')->addNotice(Mage::helper('mobassistantconnector/data')->__('<span style="color:green">Mobile Assistant Connector: </span> Default password is "1". Please change it because of security reasons!'));
21
  public function toOptionArray()
22
  {
23
  Mage::app()->cleanCache();
24
+
25
+ $db = Mage::getSingleton('core/resource')->getConnection('core_write');
26
+ if (!$db->showTableStatus('emagicone_mobassistantconnector_sessions')) {
27
+ $db->query("CREATE TABLE `" . (string)Mage::getConfig()->getNode('global/resources/default_setup/connection/dbname') .
28
+ (string)Mage::getConfig()->getTablePrefix() . ".emagicone_mobassistantconnector_sessions` (
29
+ `session_id` int(11) NOT NULL auto_increment,
30
+ `session_key` varchar(100) NOT NULL default '',
31
+ `date_added` int(11) NOT NULL,
32
+ PRIMARY KEY (`session_id`)
33
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
34
+ }
35
+ if (!$db->showTableStatus('emagicone_mobassistantconnector_failed_login')) {
36
+ $db->query("CREATE TABLE `" . (string)Mage::getConfig()->getNode('global/resources/default_setup/connection/dbname') .
37
+ (string)Mage::getConfig()->getTablePrefix() . "emagicone_mobassistantconnector_failed_login` (
38
+ `attempt_id` int(11) NOT NULL auto_increment,
39
+ `ip` varchar(20) NOT NULL default '',
40
+ `date_added` int(11) NOT NULL,
41
+ PRIMARY KEY (`attempt_id`)
42
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
43
+ }
44
+
45
+
46
+
47
  $password = Mage::getStoreConfig('mobassistantconnectorinfosec/emoaccess/password');
48
  if($password === 'c4ca4238a0b923820dcc509a6f75849b') {
49
  Mage::getSingleton('core/session')->addNotice(Mage::helper('mobassistantconnector/data')->__('<span style="color:green">Mobile Assistant Connector: </span> Default password is "1". Please change it because of security reasons!'));
app/code/community/Emagicone/Mobassistantconnector/controllers/IndexController.php CHANGED
@@ -28,7 +28,7 @@ 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 = '86';
32
 
33
  public function indexAction()
34
  {
@@ -561,8 +561,14 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
561
  ->addFieldToFilter('path', 'currency/options/allow')
562
  ->addFieldToFilter('scope_id', $storeId)
563
  ->getData();
564
- $currencies_array = explode(',', $CurrencyCode[0]['value']);
565
- if ($currencies_array[0] == '') {
 
 
 
 
 
 
566
  // $currencies_array[] = Mage::app()->getStore($storeId)->getCurrentCurrencyCode();
567
  $currencies_array = Mage::app()->getStore($storeId)->getAvailableCurrencyCodes();
568
  }
@@ -2404,7 +2410,11 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
2404
  $row['name'] = $product->getName();
2405
  $row['price'] = $product->getPrice();
2406
  $row['spec_price'] = $product->getSpecialPrice();
2407
- $row['quantity'] = intval($product->getQuantity());
 
 
 
 
2408
  $row['sku'] = $product->getSku();
2409
  $row['active'] = $product->getStatus();
2410
  $row['status'] = $product->getStatus();
28
  private $hash_only;
29
  private $session_key;
30
  const GSM_URL = 'https://android.googleapis.com/gcm/send';
31
+ const MB_VERSION = '87';
32
 
33
  public function indexAction()
34
  {
561
  ->addFieldToFilter('path', 'currency/options/allow')
562
  ->addFieldToFilter('scope_id', $storeId)
563
  ->getData();
564
+
565
+
566
+ if (count($CurrencyCode) > 0) {
567
+ $currencies_array = explode(',', $CurrencyCode[0]['value']);
568
+ } else {
569
+
570
+ // }
571
+ // if ($currencies_array[0] == '') {
572
  // $currencies_array[] = Mage::app()->getStore($storeId)->getCurrentCurrencyCode();
573
  $currencies_array = Mage::app()->getStore($storeId)->getAvailableCurrencyCodes();
574
  }
2410
  $row['name'] = $product->getName();
2411
  $row['price'] = $product->getPrice();
2412
  $row['spec_price'] = $product->getSpecialPrice();
2413
+ if ($product->isInStock()) {
2414
+ $row['quantity'] = intval($product->getStockItem()->getQty());
2415
+ } else {
2416
+ $row['quantity'] = intval($product->getQuantity());
2417
+ }
2418
  $row['sku'] = $product->getSku();
2419
  $row['active'] = $product->getStatus();
2420
  $row['status'] = $product->getStatus();
app/code/community/Emagicone/Mobassistantconnector/etc/config.xml CHANGED
@@ -15,7 +15,7 @@
15
 
16
  <modules>
17
  <Emagicone_Mobassistantconnector>
18
- <version>1.2.1</version>
19
  </Emagicone_Mobassistantconnector>
20
  </modules>
21
  <frontend>
15
 
16
  <modules>
17
  <Emagicone_Mobassistantconnector>
18
+ <version>1.2.2</version>
19
  </Emagicone_Mobassistantconnector>
20
  </modules>
21
  <frontend>
app/code/community/Emagicone/Mobassistantconnector/sql/emagicone_mobassistantconnector_setup/{install-1.0.0.php → install-1.2.1.php} RENAMED
File without changes
package.xml CHANGED
@@ -1,23 +1,23 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>mobile_assistant_connector</name>
4
- <version>1.2.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl.html">GNU</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Mobile Assistant Connector</summary>
10
  <description>Mobile Assistant Connector</description>
11
- <notes>Added:&#xD;
12
- - 'Previous quarter' stats on dashboard&#xD;
13
- - security level has been changed and improved&#xD;
14
- - ability to download and print PDF invoice&#xD;
15
  &#xD;
16
  *Works only with release of app (2.6.1) and higher</notes>
17
  <authors><author><name>eMagicOne</name><user>mobile</user><email>mobile@emagicone.com</email></author></authors>
18
- <date>2015-07-01</date>
19
- <time>15:16:36</time>
20
- <contents><target name="magecommunity"><dir name="Emagicone"><dir name="Mobassistantconnector"><dir name="Helper"><file name="Access.php" hash="2aaa400c32b63a6ce62859c73153f9c0"/><file name="Data.php" hash="2209bd29f7745d48d515ac68fd451e2d"/></dir><dir name="Model"><file name="Defpassword.php" hash="ab8f696fce0029f113986b83ddeb8232"/><file name="Failed.php" hash="7da654c3cf1e9a3f5a55da7f36192117"/><file name="Login.php" hash="bedbce507924854910524fbabe1c4948"/><file name="Observer.php" hash="bb18972490df3223aeb473d917a2acf4"/><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="dc32618fe8962304f258efc06f59f7db"/><dir name="adminhtml"><file name="IndexController.php" hash="ef5ca028e534cbf81b39a643885c9511"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="333ed888c7f8a1e067821b6547e34340"/><file name="config.xml" hash="db827e45192d8be190f3f4ea5205570d"/><file name="system.xml" hash="916fe7ee643e4dcb15a5498219605896"/></dir><dir name="sql"><dir name="emagicone_mobassistantconnector_setup"><file name="install-1.0.0.php" hash="93cc0471b2386cc278cdf7ec8f1a2ae5"/></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"/><file name="__Emagicone_Mobassistantconnector.csv" hash="eaf733f81ff47627c4389d487c93709f"/></dir><dir name="en_US"><file name="Emagicone_Mobassistantconnector.csv" hash="510d79a25c0bfb7a096aab57d8c5b458"/><file name="__Emagicone_Mobassistantconnector.csv" hash="510d79a25c0bfb7a096aab57d8c5b458"/></dir><dir name="es_ES"><file name="Emagicone_Mobassistantconnector.csv" hash="acc37c432dd8b4134844291931b70fbf"/><file name="__Emagicone_Mobassistantconnector.csv" hash="acc37c432dd8b4134844291931b70fbf"/></dir><dir name="fr_FR"><file name="Emagicone_Mobassistantconnector.csv" hash="76c48723a6bbd59534781fd3c7f6d86e"/><file name="__Emagicone_Mobassistantconnector.csv" hash="76c48723a6bbd59534781fd3c7f6d86e"/></dir><dir name="ru_RU"><file name="Emagicone_Mobassistantconnector.csv" hash="2346397cbe029dcc724717b953a3f38c"/><file name="__Emagicone_Mobassistantconnector.csv" hash="2346397cbe029dcc724717b953a3f38c"/></dir><dir name="uk_UA"><file name="Emagicone_Mobassistantconnector.csv" hash="cad0e0c3ec7603e6b886d815357d1766"/><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="jsinit.phtml" hash="785c82b5cf6b2a7dc94a1436d1c9115f"/></dir></dir></dir></dir></dir></target></contents>
21
  <compatible/>
22
  <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>
23
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>mobile_assistant_connector</name>
4
+ <version>1.2.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl.html">GNU</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Mobile Assistant Connector</summary>
10
  <description>Mobile Assistant Connector</description>
11
+ <notes>FIxed:&#xD;
12
+ - Product quantity in case of Stock Management&#xD;
13
+ - Missed tables on some file systems&#xD;
14
+ - Some minor fixes&#xD;
15
  &#xD;
16
  *Works only with release of app (2.6.1) and higher</notes>
17
  <authors><author><name>eMagicOne</name><user>mobile</user><email>mobile@emagicone.com</email></author></authors>
18
+ <date>2015-07-13</date>
19
+ <time>13:03:44</time>
20
+ <contents><target name="magecommunity"><dir name="Emagicone"><dir name="Mobassistantconnector"><dir name="Helper"><file name="Access.php" hash="2aaa400c32b63a6ce62859c73153f9c0"/><file name="Data.php" hash="2209bd29f7745d48d515ac68fd451e2d"/></dir><dir name="Model"><file name="Defpassword.php" hash="76a3fdf670d02899a897afd3c89e4d64"/><file name="Failed.php" hash="7da654c3cf1e9a3f5a55da7f36192117"/><file name="Login.php" hash="bedbce507924854910524fbabe1c4948"/><file name="Observer.php" hash="bb18972490df3223aeb473d917a2acf4"/><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="ed602a50bb72be9f1bc4ccb8602f602b"/><dir name="adminhtml"><file name="IndexController.php" hash="ef5ca028e534cbf81b39a643885c9511"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="333ed888c7f8a1e067821b6547e34340"/><file name="config.xml" hash="3800b2c76fe71a8a00cb0c0b2c754d9e"/><file name="system.xml" hash="916fe7ee643e4dcb15a5498219605896"/></dir><dir name="sql"><dir name="emagicone_mobassistantconnector_setup"><file name="install-1.2.1.php" hash="93cc0471b2386cc278cdf7ec8f1a2ae5"/></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"/><file name="__Emagicone_Mobassistantconnector.csv" hash="eaf733f81ff47627c4389d487c93709f"/></dir><dir name="en_US"><file name="Emagicone_Mobassistantconnector.csv" hash="510d79a25c0bfb7a096aab57d8c5b458"/><file name="__Emagicone_Mobassistantconnector.csv" hash="510d79a25c0bfb7a096aab57d8c5b458"/></dir><dir name="es_ES"><file name="Emagicone_Mobassistantconnector.csv" hash="acc37c432dd8b4134844291931b70fbf"/><file name="__Emagicone_Mobassistantconnector.csv" hash="acc37c432dd8b4134844291931b70fbf"/></dir><dir name="fr_FR"><file name="Emagicone_Mobassistantconnector.csv" hash="76c48723a6bbd59534781fd3c7f6d86e"/><file name="__Emagicone_Mobassistantconnector.csv" hash="76c48723a6bbd59534781fd3c7f6d86e"/></dir><dir name="ru_RU"><file name="Emagicone_Mobassistantconnector.csv" hash="2346397cbe029dcc724717b953a3f38c"/><file name="__Emagicone_Mobassistantconnector.csv" hash="2346397cbe029dcc724717b953a3f38c"/></dir><dir name="uk_UA"><file name="Emagicone_Mobassistantconnector.csv" hash="cad0e0c3ec7603e6b886d815357d1766"/><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="jsinit.phtml" hash="785c82b5cf6b2a7dc94a1436d1c9115f"/></dir></dir></dir></dir></dir></target></contents>
21
  <compatible/>
22
  <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>
23
  </package>