Version Notes
Added:
- fixed currency converting;
- fixed extra push notifications sending
Download this release
Release Info
Developer | eMagicOne |
Extension | mobile_assistant_connector |
Version | 1.4.8 |
Comparing to | |
See all releases |
Code changes from version 1.4.7 to 1.4.8
app/code/community/Emagicone/Mobassistantconnector/Model/Observer.php
CHANGED
@@ -18,6 +18,8 @@
|
|
18 |
|
19 |
class Emagicone_Mobassistantconnector_Model_Observer
|
20 |
{
|
|
|
|
|
21 |
private static function getActiveDevices()
|
22 |
{
|
23 |
$pushesCollection = Mage::getModel('emagicone_mobassistantconnector/push')->getCollection();
|
@@ -212,8 +214,9 @@ class Emagicone_Mobassistantconnector_Model_Observer
|
|
212 |
|
213 |
if ($oldStatus && $oldStatus != $newStatus) {
|
214 |
$type = 'order_changed';
|
215 |
-
} elseif (!$oldStatus) {
|
216 |
$type = 'new_order';
|
|
|
217 |
} else {
|
218 |
return;
|
219 |
}
|
18 |
|
19 |
class Emagicone_Mobassistantconnector_Model_Observer
|
20 |
{
|
21 |
+
private static $isNewOrderAlreadyInvoked = false;
|
22 |
+
|
23 |
private static function getActiveDevices()
|
24 |
{
|
25 |
$pushesCollection = Mage::getModel('emagicone_mobassistantconnector/push')->getCollection();
|
214 |
|
215 |
if ($oldStatus && $oldStatus != $newStatus) {
|
216 |
$type = 'order_changed';
|
217 |
+
} elseif (!self::$isNewOrderAlreadyInvoked && !$oldStatus) {
|
218 |
$type = 'new_order';
|
219 |
+
self::$isNewOrderAlreadyInvoked = true;
|
220 |
} else {
|
221 |
return;
|
222 |
}
|
app/code/community/Emagicone/Mobassistantconnector/controllers/IndexController.php
CHANGED
@@ -43,7 +43,7 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
|
|
43 |
private $group_id;
|
44 |
|
45 |
// const GSM_URL = 'https://android.googleapis.com/gcm/send';
|
46 |
-
const MB_VERSION = '
|
47 |
|
48 |
public function indexAction()
|
49 |
{
|
@@ -3411,7 +3411,14 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
|
|
3411 |
if ($iso_code != $convert_to && strlen($convert_to) == 3) {
|
3412 |
try {
|
3413 |
// $price = Mage::helper('directory')->currencyConvert($price, $baseCurrencyCode, $convert_to);
|
3414 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3415 |
$iso_code = $convert_to;
|
3416 |
} catch (Exception $e) {
|
3417 |
Mage::log(
|
43 |
private $group_id;
|
44 |
|
45 |
// const GSM_URL = 'https://android.googleapis.com/gcm/send';
|
46 |
+
const MB_VERSION = '105';
|
47 |
|
48 |
public function indexAction()
|
49 |
{
|
3411 |
if ($iso_code != $convert_to && strlen($convert_to) == 3) {
|
3412 |
try {
|
3413 |
// $price = Mage::helper('directory')->currencyConvert($price, $baseCurrencyCode, $convert_to);
|
3414 |
+
if (!Mage::getModel('directory/currency')->load($iso_code)->getRate($convert_to)) {
|
3415 |
+
if ($rate = Mage::getModel('directory/currency')->load($convert_to)->getRate($iso_code)) {
|
3416 |
+
$price = $price / $rate;
|
3417 |
+
}
|
3418 |
+
} else {
|
3419 |
+
$price = Mage::helper('directory')->currencyConvert($price, $iso_code, $convert_to);
|
3420 |
+
}
|
3421 |
+
|
3422 |
$iso_code = $convert_to;
|
3423 |
} catch (Exception $e) {
|
3424 |
Mage::log(
|
app/code/community/Emagicone/Mobassistantconnector/etc/config.xml
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
|
15 |
<modules>
|
16 |
<Emagicone_Mobassistantconnector>
|
17 |
-
<version>1.4.
|
18 |
</Emagicone_Mobassistantconnector>
|
19 |
</modules>
|
20 |
|
14 |
|
15 |
<modules>
|
16 |
<Emagicone_Mobassistantconnector>
|
17 |
+
<version>1.4.8</version>
|
18 |
</Emagicone_Mobassistantconnector>
|
19 |
</modules>
|
20 |
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>mobile_assistant_connector</name>
|
4 |
-
<version>1.4.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.gnu.org/licenses/gpl.html">GNU</license>
|
7 |
<channel>community</channel>
|
@@ -9,11 +9,12 @@
|
|
9 |
<summary>Mobile Assistant Connector</summary>
|
10 |
<description>Mobile Assistant Connector</description>
|
11 |
<notes>Added:
|
12 |
-
- fixed currency converting
|
|
|
13 |
<authors><author><name>eMagicOne</name><user>mobile</user><email>mobile@emagicone.com</email></author></authors>
|
14 |
-
<date>2017-03
|
15 |
-
<time>15:
|
16 |
-
<contents><target name="magecommunity"><dir name="Emagicone"><dir name="Mobassistantconnector"><dir name="Block"><dir name="Adminhtml"><dir name="User"><dir name="Edit"><dir name="Device"><file name="Action.php" hash="748ccfc5bfb27839fbbe5b7599403881"/><file name="Currency.php" hash="7ea09a23a1ea316deeed6c9c9ac80ea1"/><file name="Date.php" hash="346726345f8890bf67744c4f226908ff"/><file name="Grid.php" hash="2724427ef8a4fde14c65082d3cf28a4f"/><file name="MassAction.php" hash="d122d28a33235e0830d563edddd0e91f"/><file name="NewCustomer.php" hash="da848fedc76736fa1d0bf5b4535c179d"/><file name="NewOrder.php" hash="4c294c6e5761b5c5fae94e672b3b8abd"/><file name="OrdStatuses.php" hash="2bb02f497afcc92a94f926eab60e4123"/><file name="Store.php" hash="0e5fc11bc2ffbfdac4f2932ad25ac9db"/></dir><file name="Form.php" hash="cd6ff48abc2dd12f8ac891caf914bc19"/><dir name="Tab"><file name="Devices.php" hash="3d8d69c1365f6a9aed31a08e16d3483a"/><file name="Main.php" hash="dd564e792991dc63d616be45b7b7eba6"/><file name="Permissions.php" hash="b3f0d9841b0a70c351a590aa19510429"/></dir><file name="Tabs.php" hash="acc0ef49c44ca68a0104543d47594600"/></dir><file name="Edit.php" hash="4ba8daecce2767097c30b464bc8e712c"/><file name="Grid.php" hash="c135641a83eb3d53060724390d73242a"/><dir name="Renderer"><file name="Permissions.php" hash="05400fc0d8eee0789894a5ba7b2617eb"/></dir></dir><file name="User.php" hash="3c85641c28ca4f0b06f82f891d0dd5d9"/></dir></dir><dir name="Helper"><file name="Access.php" hash="74d9a003f27060486837bf3790069cce"/><file name="Data.php" hash="b58c0457a0724d522472a25a769d4697"/><file name="DeviceAndPushNotification.php" hash="bae57bdc5f9be6bf999950404561a52d"/><file name="TableCheck.php" hash="5794c6de2b12b06fa5406d4ec910761a"/><file name="UserPermissions.php" hash="352c3beb1767c88cee0f2684d08c0e51"/></dir><dir name="Model"><file name="Account.php" hash="f77aaf7f0353b955a3fd329eadb9c442"/><file name="Device.php" hash="83de38ede2946fd212f9830c4986ac1b"/><file name="Failed.php" hash="7da654c3cf1e9a3f5a55da7f36192117"/><file name="Observer.php" hash="
|
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.4.8</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>Added:
|
12 |
+
- fixed currency converting;
|
13 |
+
- fixed extra push notifications sending</notes>
|
14 |
<authors><author><name>eMagicOne</name><user>mobile</user><email>mobile@emagicone.com</email></author></authors>
|
15 |
+
<date>2017-04-03</date>
|
16 |
+
<time>15:10:40</time>
|
17 |
+
<contents><target name="magecommunity"><dir name="Emagicone"><dir name="Mobassistantconnector"><dir name="Block"><dir name="Adminhtml"><dir name="User"><dir name="Edit"><dir name="Device"><file name="Action.php" hash="748ccfc5bfb27839fbbe5b7599403881"/><file name="Currency.php" hash="7ea09a23a1ea316deeed6c9c9ac80ea1"/><file name="Date.php" hash="346726345f8890bf67744c4f226908ff"/><file name="Grid.php" hash="2724427ef8a4fde14c65082d3cf28a4f"/><file name="MassAction.php" hash="d122d28a33235e0830d563edddd0e91f"/><file name="NewCustomer.php" hash="da848fedc76736fa1d0bf5b4535c179d"/><file name="NewOrder.php" hash="4c294c6e5761b5c5fae94e672b3b8abd"/><file name="OrdStatuses.php" hash="2bb02f497afcc92a94f926eab60e4123"/><file name="Store.php" hash="0e5fc11bc2ffbfdac4f2932ad25ac9db"/></dir><file name="Form.php" hash="cd6ff48abc2dd12f8ac891caf914bc19"/><dir name="Tab"><file name="Devices.php" hash="3d8d69c1365f6a9aed31a08e16d3483a"/><file name="Main.php" hash="dd564e792991dc63d616be45b7b7eba6"/><file name="Permissions.php" hash="b3f0d9841b0a70c351a590aa19510429"/></dir><file name="Tabs.php" hash="acc0ef49c44ca68a0104543d47594600"/></dir><file name="Edit.php" hash="4ba8daecce2767097c30b464bc8e712c"/><file name="Grid.php" hash="c135641a83eb3d53060724390d73242a"/><dir name="Renderer"><file name="Permissions.php" hash="05400fc0d8eee0789894a5ba7b2617eb"/></dir></dir><file name="User.php" hash="3c85641c28ca4f0b06f82f891d0dd5d9"/></dir></dir><dir name="Helper"><file name="Access.php" hash="74d9a003f27060486837bf3790069cce"/><file name="Data.php" hash="b58c0457a0724d522472a25a769d4697"/><file name="DeviceAndPushNotification.php" hash="bae57bdc5f9be6bf999950404561a52d"/><file name="TableCheck.php" hash="5794c6de2b12b06fa5406d4ec910761a"/><file name="UserPermissions.php" hash="352c3beb1767c88cee0f2684d08c0e51"/></dir><dir name="Model"><file name="Account.php" hash="f77aaf7f0353b955a3fd329eadb9c442"/><file name="Device.php" hash="83de38ede2946fd212f9830c4986ac1b"/><file name="Failed.php" hash="7da654c3cf1e9a3f5a55da7f36192117"/><file name="Observer.php" hash="231e2472f6aa0db65cf54b76aee225ed"/><file name="Order.php" hash="f3d5529e0504ea0265cb661e03f41109"/><file name="Push.php" hash="6ea51508c9c0f286e823b3114ecc1574"/><dir name="Resource"><dir name="Account"><file name="Collection.php" hash="f2cca57921b1e4166adba6ec696019b2"/></dir><file name="Account.php" hash="7173f12167679683fd0d988486ac3194"/><dir name="Device"><file name="Collection.php" hash="ca73c4991e75291ae22e3da2001c2135"/></dir><file name="Device.php" hash="af556dc7a9219c8c2410644ebc0aa091"/><dir name="Failed"><file name="Collection.php" hash="18980688d80660f6a663a2c4dce20f54"/></dir><file name="Failed.php" hash="a69ca1239d3400097fabc415ee02751b"/><dir name="Push"><file name="Collection.php" hash="e6c30e6242b49968163445599376e1fb"/></dir><file name="Push.php" hash="f703f63c3e286dd8d130465f1496b421"/><dir name="Sessions"><file name="Collection.php" hash="f3d9c493b3b6a3ddfe518e583c7e5cdd"/></dir><file name="Sessions.php" hash="1b711092c3754a78968fc588b17a5b27"/><dir name="User"><file name="Collection.php" hash="571520e1040d4e02b7561a84cfdbd2d0"/></dir><file name="User.php" hash="6cc54e4e5d8e2a5e79d16fee72d0747c"/></dir><file name="Sessions.php" hash="5235ab4ee8c85e65b6a7acd3822a1f8e"/><file name="User.php" hash="88d00bbf3beba3e7f74f6856c3f6dcef"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="UserController.php" hash="5d6f8867eba5d86cefab341818ea33ef"/></dir><file name="IndexController.php" hash="ce2f45f5272c652a7e4ed87955756df7"/></dir><dir name="data"><dir name="em1_mob_setup"><file name="data-install-1.4.0.php" hash="965122cdb3c3588b12b3183def522865"/></dir></dir><dir name="etc"><file name="config.xml" hash="31498edc2ec1f6f110e6cc9e604aecd4"/></dir><dir name="sql"><dir name="em1_mob_setup"><file name="install-1.2.1.php" hash="47e6e1768eebf16f550bff703d07d6ed"/><file name="install-1.4.0.php" hash="b73da05de23bf5440a027f5848a6c537"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Emagicone_Mobassistantconnector.xml" hash="e2640b07fbf521ed2b46a7babc32c961"/></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="99255762545013b6e08e129507643a4c"/></dir><dir name="template"><dir name="mobassistantconnector"><file name="permissions.phtml" hash="4a5bec0a952e42b8217009c25d13e517"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="emagicone"><dir name="mobassistantconnector"><file name="qr_code.phtml" hash="ef2214ea50bcb16437f442560685fd5e"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="emagicone"><dir name="mobassistantconnector"><file name="style.css" hash="999f613ef0c69cdf66983287863d12c9"/></dir></dir><dir name="images"><dir name="emagicone"><dir name="mobassistantconnector"><file name="no.png" hash="75414819e41cc1416c0d822542000ade"/><file name="yes.png" hash="1f5f13694de74c249ab49f5f3d6594e5"/></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="emagicone"><dir name="mobassistantconnector"><file name="jquery-2.2.2.min.js" hash="1d35678c5edbb639ab7aa5cce0856f57"/><file name="qrcode.min.js" hash="faf8005e4fd1a9ea39d4b6feb930bf09"/><file name="qrcode_app_user_edit.js" hash="360885156fbb459a3cef3f5ce2ff1e97"/><file name="qrcode_app_user_index.js" hash="5bb7797825387d3f7144315008218afc"/><file name="user_edit.js" hash="9e2dde14fb29bd9324c94fa0491a525d"/></dir></dir></dir></target></contents>
|
18 |
<compatible/>
|
19 |
<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>
|
20 |
</package>
|