mobile_assistant_connector - Version 1.3.2

Version Notes

Fixed:
- saving push messages configuration
- internal changes

Added:
- List of product images (Product details)
- QR-code to get app from Google Play (in module settings)
- Formatting of average sums (Dashboard)
- Sorting results with more parameters (new versions of app)
- Ordered products grouped by "Product ID"
- Stock and availability statuses of product

Download this release

Release Info

Developer eMagicOne
Extension mobile_assistant_connector
Version 1.3.2
Comparing to
See all releases


Code changes from version 1.3.0 to 1.3.2

app/code/community/Emagicone/Mobassistantconnector/Block/Adminhtml/System/Config/Form/Qrcode.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Emagicone_Mobassistantconnector_Block_Adminhtml_System_Config_Form_Qrcode extends Mage_Adminhtml_Block_System_Config_Form_Field
3
+ {
4
+
5
+ protected function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->setTemplate('mobassistantconnector/connect_qrcode.phtml');
9
+ }
10
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
11
+ {
12
+ return $this->_toHtml();
13
+ }
14
+
15
+ }
app/code/community/Emagicone/Mobassistantconnector/Block/Adminhtml/System/Config/Form/Qrconfig.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Emagicone_Mobassistantconnector_Block_Adminhtml_System_Config_Form_Qrconfig extends Mage_Adminhtml_Block_System_Config_Form_Field
3
+ {
4
+
5
+ protected function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->setTemplate('mobassistantconnector/jsinit.phtml');
9
+ }
10
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
11
+ {
12
+ return $this->_toHtml();
13
+ }
14
+
15
+ }
app/code/community/Emagicone/Mobassistantconnector/Helper/Data.php CHANGED
@@ -34,19 +34,20 @@ class Emagicone_Mobassistantconnector_Helper_Data extends Mage_Core_Helper_Abstr
34
  $result = curl_exec( $ch );
35
 
36
  if(curl_errno($ch)) {
37
- Mage::log(
38
- "Push message error while sending CURL request: {$result}",
39
- null,
40
- 'emagicone_mobassistantconnector.log'
41
- );
42
  }
43
 
44
  curl_close($ch);
45
-
46
- return $result;
47
  }
48
 
49
  public function pushSettingsUpgrade() {
 
50
  $deviceIds = Mage::getStoreConfig('mobassistantconnectorinfosec/access/google_ids');
51
 
52
  if(strlen($deviceIds) > 0) {
@@ -88,7 +89,7 @@ class Emagicone_Mobassistantconnector_Helper_Data extends Mage_Core_Helper_Abstr
88
  return $deviceIds;
89
  }
90
 
91
- public function proceedGoogleResponse($response, $deviceIds, $deviceIdActions) {
92
  if ($response) {
93
  $json = json_decode($response, true);
94
  if (function_exists('json_last_error')) {
@@ -100,50 +101,51 @@ class Emagicone_Mobassistantconnector_Helper_Data extends Mage_Core_Helper_Abstr
100
  else {
101
  $json = array();
102
  }
 
 
 
 
 
 
103
 
104
  $failure = isset($json['failure']) ? $json['failure'] : null;
105
 
106
  $canonicalIds = isset($json['canonical_ids']) ? $json['canonical_ids'] : null;
107
 
108
  if ($failure || $canonicalIds) {
109
- $results = isset($json['results']) ? $json['results'] : array();
110
- foreach($results as $id => $result) {
111
- $newRegId = isset($result['registration_id']) ? $result['registration_id'] : null;
112
- $error = isset($result['error']) ? $result['error'] : null;
113
- if ($newRegId) {
114
- // It's duplicated deviceId
115
- if(!is_array($deviceIds)) {
116
- $deviceIds = array($deviceIds);
117
- }
118
- if(in_array($newRegId, $deviceIds) && $newRegId != $deviceIds[$id]) {
119
- // Loop through the devices and delete old
120
- foreach ($deviceIdActions as $settingNum => $deviceId) {
121
- if($deviceId['push_device_id'] == $deviceIds[$id]) {
122
- unset($deviceIdActions[$settingNum]);
123
- }
124
- }
125
- // Need to update old deviceId
126
- } else if(!in_array($newRegId, $deviceIds)) {
127
- foreach ($deviceIdActions as $settingNum => $deviceId) {
128
- if($deviceId['push_device_id'] == $deviceIds[$id]) {
129
- $deviceIdActions[$settingNum]['push_device_id'] = $newRegId;
130
- }
131
  }
132
  }
133
  }
134
- else if ($error) {
135
- // Unset not registered device id
136
- if ($error == 'NotRegistered' || $error == 'InvalidRegistration') {
137
- foreach ($deviceIdActions as $settingNum => $deviceId) {
138
- if($deviceId['push_device_id'] == $deviceIds[$id]) {
139
- unset($deviceIdActions[$settingNum]);
140
- }
141
  }
142
  }
143
  }
144
  }
145
  }
146
 
 
 
 
147
  return $deviceIdActions;
148
  }
149
 
34
  $result = curl_exec( $ch );
35
 
36
  if(curl_errno($ch)) {
37
+ Mage::log(
38
+ "Push message error while sending CURL request: {$result}",
39
+ null,
40
+ 'emagicone_mobassistantconnector.log'
41
+ );
42
  }
43
 
44
  curl_close($ch);
45
+
46
+ return $result;
47
  }
48
 
49
  public function pushSettingsUpgrade() {
50
+ Mage::app()->getCacheInstance()->cleanType('config');
51
  $deviceIds = Mage::getStoreConfig('mobassistantconnectorinfosec/access/google_ids');
52
 
53
  if(strlen($deviceIds) > 0) {
89
  return $deviceIds;
90
  }
91
 
92
+ public function proceedGoogleResponse($response, $current_device) {
93
  if ($response) {
94
  $json = json_decode($response, true);
95
  if (function_exists('json_last_error')) {
101
  else {
102
  $json = array();
103
  }
104
+ Mage::app(0);
105
+
106
+ $deviceIdActions = Mage::helper('mobassistantconnector')->pushSettingsUpgrade();
107
+
108
+ $currentDeviceId = $current_device['device_id'];
109
+ $currentAppConnectionId = $current_device['app_connection_id'];
110
 
111
  $failure = isset($json['failure']) ? $json['failure'] : null;
112
 
113
  $canonicalIds = isset($json['canonical_ids']) ? $json['canonical_ids'] : null;
114
 
115
  if ($failure || $canonicalIds) {
116
+ $result = isset($json['results'][0]) ? $json['results'][0] : array();
117
+
118
+ $newRegId = isset($result['registration_id']) ? $result['registration_id'] : null;
119
+ $error = isset($result['error']) ? $result['error'] : null;
120
+ if ($newRegId) {
121
+ // Need to update old deviceId
122
+ if ($newRegId !== $currentDeviceId) {
123
+ foreach ($deviceIdActions as $settingNum => $device) {
124
+ // Delete duplicated push configs with new RegistrationId
125
+ if ($device['app_connection'] == $currentAppConnectionId && $device['push_device_id'] == $newRegId) {
126
+ unset($deviceIdActions[$settingNum]);
127
+ // Renew push config with new RegistrationId
128
+ } elseif ($device['push_device_id'] == $currentDeviceId) {
129
+ $deviceIdActions[$settingNum]['push_device_id'] = $newRegId;
 
 
 
 
 
 
 
 
130
  }
131
  }
132
  }
133
+ }
134
+ else if ($error) {
135
+ // Unset not registered device id
136
+ if ($error == 'NotRegistered' || $error == 'InvalidRegistration') {
137
+ foreach ($deviceIdActions as $settingNum => $device) {
138
+ if($device['push_device_id'] == $currentDeviceId) {
139
+ unset($deviceIdActions[$settingNum]);
140
  }
141
  }
142
  }
143
  }
144
  }
145
 
146
+ Mage::getModel('core/config')->saveConfig('mobassistantconnectorinfosec/access/google_ids', serialize($deviceIdActions));
147
+ Mage::app()->init();
148
+
149
  return $deviceIdActions;
150
  }
151
 
app/code/community/Emagicone/Mobassistantconnector/Model/Observer.php CHANGED
@@ -19,7 +19,7 @@
19
  class Emagicone_Mobassistantconnector_Model_Observer
20
  {
21
  public function checkOrder($observer) {
22
- Mage::app()->cleanCache();
23
  if(intval(Mage::getStoreConfig('mobassistantconnectorinfosec/emogeneral/status')) == 1) {
24
  $order = $observer->getEvent()->getOrder();
25
  $groupId = $_storeId = Mage::app()->getStore(intval($order->getStoreId()))->getGroupId();
@@ -59,17 +59,24 @@ class Emagicone_Mobassistantconnector_Model_Observer
59
  'emagicone_mobassistantconnector.log'
60
  );
61
 
 
62
  if($deviceId['push_store_group_id'] == $groupId || $deviceId['push_store_group_id'] == -1) {
 
63
  if(intval($deviceId['push_new_order']) == 1 /** && ( ($order->getCreatedAt() == $order->getUpdatedAt()) || $order->getCustomerIsGuest() == true) */ && $state == 'new' && !is_null($deviceId['push_device_id'])){
64
- array_push($deviceIds, $deviceId);
65
- // $deviceIdsByCCode[$deviceId['push_currency_code']][] = $deviceId['push_device_id'];
66
- $type = 'new_order';
 
 
 
67
  }
 
68
  if(strlen($deviceId['push_order_statuses']) > 0 && (!in_array($deviceId['push_device_id'], $deviceIds)) && !($order->getCreatedAt() == $order->getUpdatedAt()) ) {
69
  $statuses = explode('|', $deviceId['push_order_statuses']);
70
  if(in_array($status, $statuses) || intval($deviceId['push_order_statuses']) == -1) {
71
  if (!in_array($deviceId['push_device_id'], $deviceIds)) {
72
- array_push($deviceIds, $deviceId);
 
73
  // $deviceIdsByCCode[$deviceId['push_currency_code']][] = $deviceId['push_device_id'];
74
  // $deviceIdsByCCode[$deviceId['push_currency_code']]['push_device_id'][] = $deviceId['push_device_id'];
75
  // $deviceIdsByCCode[$deviceId['push_currency_code']]['app_connection_id'][] = $deviceId['app_connection_id'];
@@ -117,11 +124,12 @@ class Emagicone_Mobassistantconnector_Model_Observer
117
  $fields = array(
118
  'registration_ids' => array(0 => $value['push_device_id']),
119
  'data' => array( "message" => array("push_notif_type" => $type, "email" => $order->getCustomerEmail(), 'customer_name' => $order->getCustomerFirstname().' '.$order->getCustomerLastname(),
120
- "order_id" => $order->getId(), "total" => $total, "store_url" => $storeUrl, "new_status" => $statusLabel, "group_id" => $groupId, 'app_connection_id' => $app_connection_id) ),
121
  );
122
 
123
  if($type === 'new_order') {
124
  unset($fields['data']['new_status']);
 
125
  }
126
 
127
  $fields_log = var_export($fields, true);
@@ -138,9 +146,8 @@ class Emagicone_Mobassistantconnector_Model_Observer
138
 
139
  $response = Mage::helper('mobassistantconnector')->sendPushMessage($fields);
140
 
141
- $deviceArResult = Mage::helper('mobassistantconnector')->proceedGoogleResponse($response, $value['push_device_id'], $deviceIdActions);
142
-
143
- Mage::getModel('core/config')->saveConfig('mobassistantconnectorinfosec/access/google_ids', serialize($deviceArResult) );
144
 
145
  $d_r = Mage::helper('core')->jsonDecode($response, Zend_Json::TYPE_OBJECT);
146
 
@@ -174,6 +181,7 @@ class Emagicone_Mobassistantconnector_Model_Observer
174
  foreach ($deviceIdActions as $settingNum => $deviceId) {
175
  if(($groupId == $deviceId['push_store_group_id']) || $deviceId['push_store_group_id'] == -1) {
176
  if(intval($deviceId['push_new_customer'] == 1)) {
 
177
  array_push($deviceIds, $deviceId);
178
  }
179
  }
@@ -207,14 +215,15 @@ class Emagicone_Mobassistantconnector_Model_Observer
207
  $response = Mage::helper('mobassistantconnector')->sendPushMessage($fields);
208
 
209
  // $success = true;
210
- $deviceArResult = Mage::helper('mobassistantconnector')->proceedGoogleResponse($response, $deviceIds, $deviceIdActions);
 
211
 
212
- Mage::getModel('core/config')->saveConfig('mobassistantconnectorinfosec/access/google_ids', serialize($deviceArResult) );
213
 
214
  $d_r = Mage::helper('core')->jsonDecode($response, Zend_Json::TYPE_OBJECT);
215
 
216
  Mage::log(
217
- "Google response: (multicast_id = {$d_r->multicast_id}, success = {$d_r->success}, failure = {$d_r->failure}, canonical_ids = {$d_r->canonical_ids})",
218
  null,
219
  'emagicone_mobassistantconnector.log'
220
  );
19
  class Emagicone_Mobassistantconnector_Model_Observer
20
  {
21
  public function checkOrder($observer) {
22
+
23
  if(intval(Mage::getStoreConfig('mobassistantconnectorinfosec/emogeneral/status')) == 1) {
24
  $order = $observer->getEvent()->getOrder();
25
  $groupId = $_storeId = Mage::app()->getStore(intval($order->getStoreId()))->getGroupId();
59
  'emagicone_mobassistantconnector.log'
60
  );
61
 
62
+ // Get devices according to group_id
63
  if($deviceId['push_store_group_id'] == $groupId || $deviceId['push_store_group_id'] == -1) {
64
+ // New order notification
65
  if(intval($deviceId['push_new_order']) == 1 /** && ( ($order->getCreatedAt() == $order->getUpdatedAt()) || $order->getCustomerIsGuest() == true) */ && $state == 'new' && !is_null($deviceId['push_device_id'])){
66
+ if (!in_array($deviceId['push_device_id'], $deviceIds)) {
67
+ $deviceId['setting_num'] = $settingNum;
68
+ $deviceIds[$deviceId['push_device_id']] = $deviceId;
69
+ // $deviceIdsByCCode[$deviceId['push_currency_code']][] = $deviceId['push_device_id'];
70
+ $type = 'new_order';
71
+ }
72
  }
73
+ // New status notification
74
  if(strlen($deviceId['push_order_statuses']) > 0 && (!in_array($deviceId['push_device_id'], $deviceIds)) && !($order->getCreatedAt() == $order->getUpdatedAt()) ) {
75
  $statuses = explode('|', $deviceId['push_order_statuses']);
76
  if(in_array($status, $statuses) || intval($deviceId['push_order_statuses']) == -1) {
77
  if (!in_array($deviceId['push_device_id'], $deviceIds)) {
78
+ $deviceId['setting_num'] = $settingNum;
79
+ $deviceIds[$deviceId['push_device_id']] = $deviceId;
80
  // $deviceIdsByCCode[$deviceId['push_currency_code']][] = $deviceId['push_device_id'];
81
  // $deviceIdsByCCode[$deviceId['push_currency_code']]['push_device_id'][] = $deviceId['push_device_id'];
82
  // $deviceIdsByCCode[$deviceId['push_currency_code']]['app_connection_id'][] = $deviceId['app_connection_id'];
124
  $fields = array(
125
  'registration_ids' => array(0 => $value['push_device_id']),
126
  'data' => array( "message" => array("push_notif_type" => $type, "email" => $order->getCustomerEmail(), 'customer_name' => $order->getCustomerFirstname().' '.$order->getCustomerLastname(),
127
+ "order_id" => $order->getId(), "total" => $total, "store_url" => $storeUrl, "new_status" => $statusLabel, "new_status_code" => $status, "group_id" => $groupId, 'app_connection_id' => $app_connection_id) ),
128
  );
129
 
130
  if($type === 'new_order') {
131
  unset($fields['data']['new_status']);
132
+ unset($fields['data']['new_status_code']);
133
  }
134
 
135
  $fields_log = var_export($fields, true);
146
 
147
  $response = Mage::helper('mobassistantconnector')->sendPushMessage($fields);
148
 
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
 
181
  foreach ($deviceIdActions as $settingNum => $deviceId) {
182
  if(($groupId == $deviceId['push_store_group_id']) || $deviceId['push_store_group_id'] == -1) {
183
  if(intval($deviceId['push_new_customer'] == 1)) {
184
+ $deviceId['setting_num'] = $settingNum;
185
  array_push($deviceIds, $deviceId);
186
  }
187
  }
215
  $response = Mage::helper('mobassistantconnector')->sendPushMessage($fields);
216
 
217
  // $success = true;
218
+ Mage::helper('mobassistantconnector')->proceedGoogleResponse($response, array('device_id' => $value['push_device_id'],
219
+ 'app_connection_id' => $value['app_connection_id']));
220
 
221
+ // Mage::getModel('core/config')->saveConfig('mobassistantconnectorinfosec/access/google_ids', serialize($deviceArResult) );
222
 
223
  $d_r = Mage::helper('core')->jsonDecode($response, Zend_Json::TYPE_OBJECT);
224
 
225
  Mage::log(
226
+ "Google response: (multicast_id = {$d_r->multicast_id}, success = {$d_r->success}, failure = {$d_r->failure}, canonical_ids = {$d_r->canonical_ids}, results = {$d_r->results})",
227
  null,
228
  'emagicone_mobassistantconnector.log'
229
  );
app/code/community/Emagicone/Mobassistantconnector/controllers/IndexController.php CHANGED
@@ -28,11 +28,11 @@ 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 = '94';
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();
@@ -123,6 +123,7 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
123
  'search_val' => 'STR',
124
  'statuses' => 'STR',
125
  'sort_by' => 'STR',
 
126
  'last_order_id' => 'STR',
127
  'product_id' => 'INT',
128
  'get_statuses' => 'INT',
@@ -153,6 +154,7 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
153
  'search_carts' => 'STR',
154
  'param' => 'STR',
155
  'new_value' => 'STR',
 
156
  'show_unregistered_customers' => 'INT',
157
  ));
158
 
@@ -168,6 +170,14 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
168
  $this->currency_code = $this->def_currency;
169
  }
170
 
 
 
 
 
 
 
 
 
171
  if ($this->call_function == 'test_config') {
172
  $this->generate_output(array('test' => 1));
173
  }
@@ -1023,12 +1033,14 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
1023
  $default_currency_sign = $this->_price_format($this->def_currency, 1, $sum, $this->currency_code, true);
1024
 
1025
  if ($d <= 0) $d = 1;
1026
- $average['avg_sum_orders'] = number_format($average['sum_orders'] / $d, 2, '.', ' ');
 
1027
  $average['avg_orders'] = number_format($average['tot_orders'] / $d, 1, '.', ' ');
1028
  $average['avg_customers'] = number_format($average['tot_customers'] / $d, 1, '.', ' ');
1029
 
1030
  if ($average['tot_customers'] > 0) {
1031
- $average['avg_cust_order'] = number_format($average['sum_orders'] / $average['tot_customers'], 1, '.', ' ');
 
1032
  }
1033
  $average['sum_orders'] = number_format($average['sum_orders'], 2, '.', ' ');
1034
  $average['tot_customers'] = number_format($average['tot_customers'], 1, '.', ' ');
@@ -1105,21 +1117,36 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
1105
 
1106
  switch ($this->sort_by) {
1107
  case 'name':
1108
- $ordersCollection->getSelect()->order(array('main_table.customer_firstname ASC'));
1109
- $ordersCollection->getSelect()->order(array('main_table.customer_lastname ASC'));
1110
- $ordersStatsCollection->getSelect()->order(array('main_table.customer_firstname ASC'));
1111
- $ordersStatsCollection->getSelect()->order(array('main_table.customer_lastname ASC'));
 
1112
  break;
1113
  case 'date':
1114
- $ordersCollection->getSelect()->order(array('main_table.created_at DESC'));
1115
- $ordersStatsCollection->getSelect()->order(array('main_table.created_at DESC'));
 
1116
  break;
1117
  case 'id':
1118
- $ordersCollection->getSelect()->order(array('main_table.entity_id DESC'));
1119
- $ordersStatsCollection->getSelect()->order(array('main_table.entity_id DESC'));
 
 
 
 
 
 
 
 
 
 
 
1120
  break;
1121
  }
1122
 
 
 
1123
  if (strlen($this->statuses) > 0) {
1124
  $this->statuses = '\'' . str_replace('|', '\',\'', $this->statuses) . '\'';
1125
  $ordersCollection->getSelect()->where(new Zend_Db_Expr("main_table.status IN ({$this->statuses})"));
@@ -1217,6 +1244,16 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
1217
  "orders_status" => $orders_status);
1218
  }
1219
 
 
 
 
 
 
 
 
 
 
 
1220
  protected function get_orders_info()
1221
  {
1222
  $offset = $this->_get_timezone_offset();
@@ -1797,7 +1834,7 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
1797
  if (isset($this->store_group_id)) {
1798
  $this->group_id = $this->store_group_id;
1799
  }
1800
-
1801
  if (!$this->group_id) {
1802
  $this->group_id = null;
1803
  }
@@ -1929,14 +1966,21 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
1929
 
1930
  switch ($this->sort_by) {
1931
  case 'name':
1932
- $customerCollection->getSelect()->order(array('firstname ASC'));
1933
- $customerCollection->getSelect()->order(array('lastname ASC'));
 
1934
  break;
1935
  case 'date':
1936
- $customerCollection->getSelect()->order(array('e.created_at DESC'));
 
1937
  break;
1938
  case 'id':
1939
- $customerCollection->getSelect()->order(array('e.entity_id DESC'));
 
 
 
 
 
1940
  break;
1941
  }
1942
 
@@ -2093,6 +2137,27 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
2093
  $collection->addAttributeToSelect('*');
2094
 
2095
  $collection->addAttributeToSelect('name');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2096
  $collection->joinField(
2097
  'qty',
2098
  'cataloginventory/stock_item',
@@ -2153,20 +2218,42 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
2153
 
2154
  switch ($this->sort_by) {
2155
  case 'name':
2156
- $collection->getSelect()->order(array('name'));
 
2157
  break;
2158
  case 'id':
2159
- $collection->getSelect()->order(array('e' . '.entity_id DESC'));
 
 
 
 
 
 
 
 
 
 
 
 
 
2160
  break;
2161
  }
2162
 
 
 
2163
  $products_count = $collection->getSize();
2164
 
2165
  if (!empty($this->page) && !empty($this->show)) {
2166
  $collection->getSelect()->limit($this->show, ($this->page - 1) * $this->show);
2167
  }
2168
 
 
 
 
2169
  foreach ($collection as $product) {
 
 
 
2170
  $productFinal['main_id'] = $product->getEntityId();
2171
  $productFinal['product_id'] = $product->getEntityId();
2172
  $productFinal['name'] = $product->getName();
@@ -2192,6 +2279,22 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
2192
  $pArr['price'] = $product->getPrice();
2193
  $pArr['spec_price'] = $product->getSpecialPrice();
2194
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2195
  $productFinal['price'] = $this->_price_format($this->def_currency, 1, $pArr['price'], $this->currency_code);
2196
 
2197
  if ($pArr['spec_price'] > 0 && $pArr['spec_price'] != '') {
@@ -2207,7 +2310,187 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
2207
  'products' => $products);
2208
  }
2209
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2210
  protected function search_products_ordered()
 
 
 
 
 
 
 
 
 
 
 
 
2211
  {
2212
 
2213
  $ordered_products = array();
@@ -2304,18 +2587,30 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
2304
 
2305
  switch ($this->sort_by) {
2306
  case 'name':
2307
- $salesCollection->getSelect()->order(array('main_table' . '.name ASC'));
 
2308
  break;
2309
  case 'id':
2310
- $salesCollection->getSelect()->order(array('main_table' . '.product_id DESC'));
 
 
 
 
 
 
 
 
 
2311
  break;
2312
  }
2313
 
 
 
2314
  if (!empty($this->page) && !empty($this->show)) {
2315
  $salesCollection->getSelect()->limit($this->show, ($this->page - 1) * $this->show);
2316
  }
2317
 
2318
- $ordersDates = $salesCollection->getColumnValues('order' . '.created_at');
2319
  $ordersDates = array_map("strtotime", $ordersDates);
2320
 
2321
  if ($salesCollection->count() > 0) {
@@ -2365,7 +2660,6 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
2365
  );
2366
  }
2367
 
2368
-
2369
  protected function get_products_info()
2370
  {
2371
  $row = null;
@@ -2382,6 +2676,11 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
2382
  $product = Mage::getModel("catalog/product")->load($this->product_id);
2383
 
2384
  if ($product) {
 
 
 
 
 
2385
  // Get count of product orders
2386
  $salesCollection = Mage::getModel("sales/order_item")->getCollection()
2387
  ->addFieldToSelect(array('product_id', 'name', 'sku'));
@@ -2399,8 +2698,11 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
2399
  $row['quantity'] = intval($product->getQuantity());
2400
  }
2401
  $row['sku'] = $product->getSku();
2402
- $row['active'] = $product->getStatus();
2403
- $row['status'] = $product->getStatus();
 
 
 
2404
  // $row['descr'] = $product->getDescription();
2405
  // $row['short_desc'] = $product->getShortDescription();
2406
  $row['image'] = $product->getImage();
@@ -2415,8 +2717,34 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
2415
  unset($row['spec_price']);
2416
  }
2417
 
2418
- $row['id_image'] = (string)Mage::helper('catalog/image')->init($product, 'image')->constrainOnly(TRUE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(256);
2419
- $row['id_image_large'] = (string)Mage::helper('catalog/image')->init($product, 'image')->constrainOnly(TRUE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(800);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2420
  }
2421
 
2422
  return $row;
@@ -2522,12 +2850,15 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
2522
  {
2523
  $abandoned_carts = array();
2524
  $offset = $this->_get_timezone_offset();
 
 
2525
 
2526
 
2527
  $storeTableName = Mage::getSingleton('core/resource')->getTableName('core/store');
2528
  $customerTableName = Mage::getSingleton('core/resource')->getTableName('customer_entity');
2529
 
2530
  $quotes = Mage::getResourceModel('sales/quote_collection');
 
2531
 
2532
  if (!isset($this->group_id)) {
2533
  if ($this->is_group_exists($this->group_id)) {
@@ -2537,6 +2868,7 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
2537
  "cs.store_id = main_table.store_id",
2538
  array());
2539
  $quotes->getSelect()->where(new Zend_Db_Expr("cs.group_id = " . $this->group_id));
 
2540
  }
2541
  }
2542
 
@@ -2545,40 +2877,55 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
2545
  }
2546
  if (!empty($this->search_val) && preg_match('/^\d+(?:,\d+)*$/', $this->search_val)) {
2547
  $quotes->addFieldToFilter('main_table.entity_id', array('eq' => intval($this->search_val)));
 
2548
  } else if (!empty($this->search_val)) {
2549
  $quotes->getSelect()->where("main_table.`customer_email` LIKE '%" . $this->search_val . "%' OR main_table.`customer_firstname` LIKE '%" . $this->search_val . "%' OR main_table.`customer_lastname` LIKE '%" . $this->search_val . "%' OR CONCAT(`customer_firstname`, ' ', `customer_lastname`) LIKE '%" . $this->search_val . "%'");
 
2550
  }
2551
 
2552
  if (!empty($this->carts_from)) {
2553
  $this->carts_from = Mage::getModel('core/date')->timestamp(strtotime($this->carts_from));
2554
  $this->carts_from = date('Y-m-d H:i:s', $this->carts_from);
2555
  $quotes->addFieldToFilter('main_table.updated_at', array('from' => $this->carts_from));
 
2556
  }
2557
 
2558
  if (!empty($this->carts_to)) {
2559
  $this->carts_to = Mage::getModel('core/date')->timestamp(strtotime($this->carts_to));
2560
  $this->carts_to = date('Y-m-d H:i:s', $this->carts_to);
2561
  $quotes->addFieldToFilter('main_table.updated_at', array('to' => $this->carts_to));
 
2562
  }
2563
 
2564
  // if (!empty($this->with_customer_details)) {
2565
  $quotes->addFieldToFilter('main_table.customer_email', array('notnull' => true));
 
2566
  // }
2567
 
2568
  if (empty($this->show_unregistered_customers)) {
2569
  $quotes->addFieldToFilter('main_table.customer_id', array('notnull' => true));
 
2570
  $quotes->getSelect()
2571
  ->joinInner(
2572
  array('c' => $customerTableName),
2573
  "c.entity_id = main_table.customer_id",
2574
  array());
 
 
 
 
 
2575
  }
2576
 
2577
  $quotes->addFieldToFilter('main_table.is_active', array('eq' => 1));
 
2578
  $quotes->addFieldToFilter('main_table.items_count', array('gt' => 0));
 
 
2579
 
2580
  // $quotes->load();
2581
- $cart_total_res['total_sum'] = $this->_price_format($this->def_currency, 1, array_sum($quotes->getColumnValues('base_grand_total')), $this->currency_code);
 
2582
  $cart_total_res['total_count'] = $quotes->getSize();
2583
  // $resource = Mage::getSingleton('core/resource');
2584
  // $readConnection = $resource->getConnection('core_read');
@@ -2593,19 +2940,36 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
2593
 
2594
  switch ($this->sort_by) {
2595
  case 'id':
2596
- $quotes->getSelect()->order(array('main_table' . '.entity_id DESC'));
 
2597
  break;
2598
  case 'date':
2599
- $quotes->getSelect()->order(array('main_table' . '.updated_at DESC'));
 
2600
  break;
2601
  case 'name':
2602
- $quotes->getSelect()->order(array('main_table' . '.customer_firstname ASC'));
 
 
 
 
 
 
 
 
 
 
 
2603
  break;
2604
  default:
2605
- $quotes->getSelect()->order(array('main_table' . '.updated_at DESC'));
 
2606
  break;
2607
  }
2608
  $carts = array();
 
 
 
2609
  // $collection->prepareForAbandonedReport();
2610
  foreach ($quotes as $quote) {
2611
  if (empty($this->show_unregistered_customers)) {
@@ -2650,7 +3014,7 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
2650
  }
2651
 
2652
  // Sort by name
2653
- if ($this->sort_by == 'name') {
2654
  foreach ($carts as $cart) {
2655
  foreach ($cart as $key => $value) {
2656
  if (!isset($sortArray[$key])) {
@@ -2663,11 +3027,21 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
2663
  $orderby = "customer"; //change this to whatever key you want from the array
2664
 
2665
  array_multisort($sortArray[$orderby], SORT_ASC, $carts);
 
 
 
 
 
 
 
2666
  }
2667
-
2668
  return array('abandoned_carts' => $carts,
2669
- 'abandoned_carts_count' => $cart_total_res['total_count'],
2670
- 'abandoned_carts_total' => $cart_total_res['total_sum'],
 
 
 
2671
  );
2672
 
2673
  return $quote;
@@ -2859,6 +3233,18 @@ class Emagicone_Mobassistantconnector_IndexController extends Mage_Core_Controll
2859
  );
2860
  }
2861
 
 
 
 
 
 
 
 
 
 
 
 
 
2862
  protected function _price_format($iso_code, $curr_format, $price, $convert_to, $force = false, $format = true)
2863
  {
2864
  $currency_symbol = '';
28
  private $hash_only;
29
  private $session_key;
30
  const GSM_URL = 'https://android.googleapis.com/gcm/send';
31
+ const MB_VERSION = '95';
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();
123
  'search_val' => 'STR',
124
  'statuses' => 'STR',
125
  'sort_by' => 'STR',
126
+ 'order_by' => 'STR',
127
  'last_order_id' => 'STR',
128
  'product_id' => 'INT',
129
  'get_statuses' => 'INT',
154
  'search_carts' => 'STR',
155
  'param' => 'STR',
156
  'new_value' => 'STR',
157
+ 'group_by_product_id' => 'INT',
158
  'show_unregistered_customers' => 'INT',
159
  ));
160
 
170
  $this->currency_code = $this->def_currency;
171
  }
172
 
173
+ if (empty($this->page)) {
174
+ $this->page = 1;
175
+ }
176
+
177
+ if (empty($this->show)) {
178
+ $this->show = 20;
179
+ }
180
+
181
  if ($this->call_function == 'test_config') {
182
  $this->generate_output(array('test' => 1));
183
  }
1033
  $default_currency_sign = $this->_price_format($this->def_currency, 1, $sum, $this->currency_code, true);
1034
 
1035
  if ($d <= 0) $d = 1;
1036
+ // $average['avg_sum_orders'] = number_format($average['sum_orders'] / $d, 2, '.', ' ');
1037
+ $average['avg_sum_orders'] = $this->_price_format($this->def_currency, 1, $average['sum_orders'] / $d, $this->currency_code, false);
1038
  $average['avg_orders'] = number_format($average['tot_orders'] / $d, 1, '.', ' ');
1039
  $average['avg_customers'] = number_format($average['tot_customers'] / $d, 1, '.', ' ');
1040
 
1041
  if ($average['tot_customers'] > 0) {
1042
+ // $average['avg_cust_order'] = number_format($average['sum_orders'] / $average['tot_customers'], 1, '.', ' ');
1043
+ $average['avg_cust_order'] = $this->_price_format($this->def_currency, 1, $average['sum_orders'] / $average['tot_customers'], $this->currency_code, false);
1044
  }
1045
  $average['sum_orders'] = number_format($average['sum_orders'], 2, '.', ' ');
1046
  $average['tot_customers'] = number_format($average['tot_customers'], 1, '.', ' ');
1117
 
1118
  switch ($this->sort_by) {
1119
  case 'name':
1120
+ $dir = $this->get_sort_direction('ASC');
1121
+ $ordersCollection->getSelect()->order(array('main_table.customer_firstname' . $dir));
1122
+ $ordersCollection->getSelect()->order(array('main_table.customer_lastname' . $dir));
1123
+ $ordersStatsCollection->getSelect()->order(array('main_table.customer_firstname' . $dir));
1124
+ $ordersStatsCollection->getSelect()->order(array('main_table.customer_lastname' . $dir));
1125
  break;
1126
  case 'date':
1127
+ $dir = $this->get_sort_direction('DESC');
1128
+ $ordersCollection->getSelect()->order(array('main_table.created_at' . $dir));
1129
+ $ordersStatsCollection->getSelect()->order(array('main_table.created_at' . $dir));
1130
  break;
1131
  case 'id':
1132
+ $dir = $this->get_sort_direction('DESC');
1133
+ $ordersCollection->getSelect()->order(array('main_table.entity_id' . $dir));
1134
+ $ordersStatsCollection->getSelect()->order(array('main_table.entity_id' . $dir));
1135
+ break;
1136
+ case 'total':
1137
+ $dir = $this->get_sort_direction('DESC');
1138
+ $ordersCollection->getSelect()->order(array('total_paid' . $dir));
1139
+ $ordersStatsCollection->getSelect()->order(array('total_paid' . $dir));
1140
+ break;
1141
+ case 'qty':
1142
+ $dir = $this->get_sort_direction('DESC');
1143
+ $ordersCollection->getSelect()->order(array('main_table.total_item_count' . $dir));
1144
+ $ordersStatsCollection->getSelect()->order(array('main_table.total_item_count' . $dir));
1145
  break;
1146
  }
1147
 
1148
+ // echo($ordersCollection->getSelect()->__toString());die();
1149
+
1150
  if (strlen($this->statuses) > 0) {
1151
  $this->statuses = '\'' . str_replace('|', '\',\'', $this->statuses) . '\'';
1152
  $ordersCollection->getSelect()->where(new Zend_Db_Expr("main_table.status IN ({$this->statuses})"));
1244
  "orders_status" => $orders_status);
1245
  }
1246
 
1247
+ protected function get_sort_direction($default_direction = 'DESC') {
1248
+ if (isset($this->order_by) && !empty($this->order_by)) {
1249
+ $direction = $this->order_by;
1250
+ } else {
1251
+ $direction = $default_direction;
1252
+ }
1253
+
1254
+ return ' ' . $direction;
1255
+ }
1256
+
1257
  protected function get_orders_info()
1258
  {
1259
  $offset = $this->_get_timezone_offset();
1834
  if (isset($this->store_group_id)) {
1835
  $this->group_id = $this->store_group_id;
1836
  }
1837
+
1838
  if (!$this->group_id) {
1839
  $this->group_id = null;
1840
  }
1966
 
1967
  switch ($this->sort_by) {
1968
  case 'name':
1969
+ $dir = $this->get_sort_direction('ASC');
1970
+ $customerCollection->getSelect()->order(array('firstname' . $dir));
1971
+ $customerCollection->getSelect()->order(array('lastname' . $dir));
1972
  break;
1973
  case 'date':
1974
+ $dir = $this->get_sort_direction('DESC');
1975
+ $customerCollection->getSelect()->order(array('e.created_at' . $dir));
1976
  break;
1977
  case 'id':
1978
+ $dir = $this->get_sort_direction('DESC');
1979
+ $customerCollection->getSelect()->order(array('e.entity_id' . $dir));
1980
+ break;
1981
+ case 'qty':
1982
+ $dir = $this->get_sort_direction('DESC');
1983
+ $customerCollection->getSelect()->order(array('count_ords' . $dir));
1984
  break;
1985
  }
1986
 
2137
  $collection->addAttributeToSelect('*');
2138
 
2139
  $collection->addAttributeToSelect('name');
2140
+ $collection->addAttributeToSelect('status', 'left');
2141
+ // $collection->addAttributeToSelect('price', 'left');
2142
+ // $collection->addAttributeToSelect('qty', 'left');
2143
+
2144
+ $collection->getSelect()->joinLeft(
2145
+ ['et_product' => Mage::getConfig()->getTablePrefix() . 'eav_entity_type'],
2146
+ "et_product.entity_type_code = 'catalog_product'",
2147
+ []
2148
+ )
2149
+ ->joinLeft(
2150
+ ['a_price' => Mage::getConfig()->getTablePrefix() . 'eav_attribute'],
2151
+ "a_price.entity_type_id = et_product.entity_type_id AND a_price.attribute_code = 'price'",
2152
+ []
2153
+ )
2154
+ ->joinLeft(
2155
+ ['p_price' => Mage::getConfig()->getTablePrefix() . 'catalog_product_entity_decimal'],
2156
+ "p_price.entity_id = e.entity_id AND p_price.attribute_id = a_price.attribute_id AND p_price.store_id = 0",
2157
+ ['p_price.value AS price']
2158
+ );
2159
+
2160
+
2161
  $collection->joinField(
2162
  'qty',
2163
  'cataloginventory/stock_item',
2218
 
2219
  switch ($this->sort_by) {
2220
  case 'name':
2221
+ $dir = $this->get_sort_direction('DESC');
2222
+ $collection->getSelect()->order(array('name' . $dir));
2223
  break;
2224
  case 'id':
2225
+ $dir = $this->get_sort_direction('DESC');
2226
+ $collection->getSelect()->order(array('e' . '.entity_id' . $dir));
2227
+ break;
2228
+ case 'qty':
2229
+ $dir = $this->get_sort_direction('DESC');
2230
+ $collection->getSelect()->order(array('at_qty.qty' . $dir));
2231
+ break;
2232
+ case 'price':
2233
+ $dir = $this->get_sort_direction('DESC');
2234
+ $collection->getSelect()->order(array('price' . $dir));
2235
+ break;
2236
+ case 'status':
2237
+ $dir = $this->get_sort_direction('DESC');
2238
+ $collection->getSelect()->order(array('status' . $dir));
2239
  break;
2240
  }
2241
 
2242
+ // echo($collection->getSelect()->__toString());die();
2243
+
2244
  $products_count = $collection->getSize();
2245
 
2246
  if (!empty($this->page) && !empty($this->show)) {
2247
  $collection->getSelect()->limit($this->show, ($this->page - 1) * $this->show);
2248
  }
2249
 
2250
+ $statusOptions = Mage::getSingleton('catalog/product_status')->getOptionArray();
2251
+ $stockOptions = $this->getStockOptions();
2252
+
2253
  foreach ($collection as $product) {
2254
+ $status = $product->getStatus();
2255
+ $isInStock = $product->getStockItem()->getIsInStock();
2256
+
2257
  $productFinal['main_id'] = $product->getEntityId();
2258
  $productFinal['product_id'] = $product->getEntityId();
2259
  $productFinal['name'] = $product->getName();
2279
  $pArr['price'] = $product->getPrice();
2280
  $pArr['spec_price'] = $product->getSpecialPrice();
2281
 
2282
+ /*if ($status == 1) {
2283
+ $productFinal['status'] = 'Enabled';
2284
+ } else {
2285
+ $productFinal['status'] = 'Disabled';
2286
+ }
2287
+ if ($productFinal['quantity'] < 0 || $product->getIsInStock() == 0) {
2288
+ $productFinal['stock'] = 'Out of Stock';
2289
+ } else {
2290
+ $productFinal['status'] = 'In Stock';
2291
+ }*/
2292
+ $productFinal['status_code'] = $status;
2293
+ $productFinal['status_title'] = $statusOptions[$status];
2294
+
2295
+ $productFinal['stock_code'] = $isInStock;
2296
+ $productFinal['stock_title'] = $stockOptions[$isInStock];
2297
+
2298
  $productFinal['price'] = $this->_price_format($this->def_currency, 1, $pArr['price'], $this->currency_code);
2299
 
2300
  if ($pArr['spec_price'] > 0 && $pArr['spec_price'] != '') {
2310
  'products' => $products);
2311
  }
2312
 
2313
+ protected function search_grouped_ordered_products() {
2314
+ $ordered_products = array();
2315
+ $max_date = "";
2316
+ $min_date = "";
2317
+ $offset = $this->_get_timezone_offset();
2318
+ // $storeId = Mage::app()->getStore()->getId();
2319
+ $salesItemCollection = Mage::getModel("sales/order_item")->getCollection();
2320
+ // ->addFieldToSelect(array('product_id', 'name', 'sku'))
2321
+ $salesItemCollection->getSelect()->columns(array(
2322
+ 'qty_ordered_product' => 'SUM(main_table.qty_ordered)',
2323
+ 'price_total' => 'SUM(main_table.base_price - main_table.base_discount_amount)',
2324
+ 'orig_price' => 'SUM(main_table.base_price - main_table.base_discount_amount) * main_table.qty_ordered'
2325
+ )
2326
+ );
2327
+ // $salesCollection->getSelect()->columns("SUM(main_table.qty_ordered)");
2328
+ // $salesCollection->getSelect()->columns("SUM(main_table.base_price - main_table.base_discount_amount)");
2329
+ $salesItemCollection->getSelect()->group('product_id');
2330
+
2331
+ $orderTableName = Mage::getSingleton('core/resource')->getTableName('sales/order');
2332
+ $storeTableName = Mage::getSingleton('core/resource')->getTableName('core/store');
2333
+
2334
+ $salesItemCollection->getSelect()
2335
+ ->joinLeft(
2336
+ array('order' => $orderTableName),
2337
+ "`order`.entity_id = main_table.order_id",
2338
+ array());
2339
+
2340
+ if (!empty($this->group_id)) {
2341
+ if ($this->is_group_exists($this->group_id)) {
2342
+ $salesItemCollection->getSelect()
2343
+ ->joinLeft(
2344
+ array('cs' => $storeTableName),
2345
+ "cs.store_id = `order`.store_id",
2346
+ array());
2347
+ $salesItemCollection->getSelect()->where(new Zend_Db_Expr("cs.group_id = " . $this->group_id));
2348
+ }
2349
+ }
2350
+
2351
+ $salesItemCollection->getSelect()->columns(array('created_order_at' => new Zend_Db_Expr ("CONVERT_TZ(`order`.created_at, '+00:00', '" . $offset . "' )")));
2352
+
2353
+ if (strlen($this->val) > 0) {
2354
+ $filter_cols = array();
2355
+ $filters = array();
2356
+ if (strlen($this->params) > 0) {
2357
+ $this->params = explode("|", $this->params);
2358
+ foreach ($this->params as $param) {
2359
+ switch ($param) {
2360
+ case 'pr_id':
2361
+ $filter_cols[] = 'main_table' . '.product_id';
2362
+ $filters[] = array('eq' => $this->val);
2363
+ break;
2364
+ case 'pr_sku':
2365
+ $filter_cols[] = 'main_table' . '.sku';
2366
+ $filters[] = array('like' => '%' . $this->val . '%');
2367
+ break;
2368
+ case 'pr_name':
2369
+ $filter_cols[] = 'main_table' . '.name';
2370
+ $filters[] = array('like' => '%' . $this->val . '%');
2371
+ break;
2372
+ case 'order_id':
2373
+ $filter_cols[] = 'main_table' . '.order_id';
2374
+ $filters[] = array('eq' => $this->val);
2375
+ break;
2376
+ }
2377
+ }
2378
+ $salesItemCollection->addFieldToFilter($filter_cols, $filters);
2379
+ }
2380
+ }
2381
+
2382
+ if (!empty($this->products_from)) {
2383
+ $this->products_from .= " 00:00:00";
2384
+ $date_filter['from'] = $this->products_from;
2385
+ }
2386
+
2387
+ if (!empty($this->products_to)) {
2388
+ $this->products_to .= " 23:59:59";
2389
+ $date_filter['to'] = $this->products_to;
2390
+ }
2391
+
2392
+ $date_filter['date'] = true;
2393
+
2394
+ if (!empty($this->products_from) || !empty($this->products_to)) {
2395
+ $salesItemCollection->addFieldToFilter('order' . '.created_at',
2396
+ $date_filter);
2397
+ }
2398
+
2399
+ if (!empty($this->statuses)) {
2400
+ $this->statuses = explode('|', $this->statuses);
2401
+ $salesItemCollection->addFieldToFilter('order' . '.status',
2402
+ array('in' => array($this->statuses)));
2403
+ }
2404
+
2405
+ switch ($this->sort_by) {
2406
+ case 'name':
2407
+ $dir = $this->get_sort_direction('ASC');
2408
+ $salesItemCollection->getSelect()->order(array('main_table' . '.name' . $dir));
2409
+ break;
2410
+ case 'id':
2411
+ $dir = $this->get_sort_direction('DESC');
2412
+ $salesItemCollection->getSelect()->order(array('main_table' . '.product_id' . $dir));
2413
+ break;
2414
+ case 'qty':
2415
+ $dir = $this->get_sort_direction('DESC');
2416
+ $salesItemCollection->getSelect()->order(array('qty_ordered_product' . $dir));
2417
+ break;
2418
+ case 'total':
2419
+ $dir = $this->get_sort_direction('DESC');
2420
+ $salesItemCollection->getSelect()->order(array('orig_price' . $dir));
2421
+ break;
2422
+ }
2423
+
2424
+ $size = $salesItemCollection->count();
2425
+ // echo($salesItemCollection->getSelect()->__toString());die();
2426
+
2427
+ if (!empty($this->page) && !empty($this->show)) {
2428
+ $salesItemCollection->clear();
2429
+ $salesItemCollection->getSelect()->limit($this->show, ($this->page - 1) * $this->show);
2430
+ }
2431
+
2432
+ $ordersDates = $salesItemCollection->getColumnValues('created_order_at');
2433
+ $ordersDates = array_map("strtotime", $ordersDates);
2434
+
2435
+ if ($size > 0) {
2436
+ $max_date = date("n/j/Y", max(array_values($ordersDates)));
2437
+ $min_date = date("n/j/Y", min(array_values($ordersDates)));
2438
+ }
2439
+
2440
+ foreach ($salesItemCollection as $item) {
2441
+
2442
+ // $product = Mage::getModel('catalog/product')->load($item->getProductId());
2443
+
2444
+ $thumbnail = (string)Mage::helper('catalog/image')
2445
+ ->init($item->getProduct(), 'image')
2446
+ ->constrainOnly(TRUE)
2447
+ ->keepAspectRatio(TRUE)
2448
+ ->resize(150, null);
2449
+
2450
+ if (($thumbnail == 'no_selection') || (!isset($thumbnail))) {
2451
+ $thumbnail = '';
2452
+ }
2453
+
2454
+ $ordered_products[] = array(
2455
+ 'item_id' => $item->getItemId(),
2456
+ 'product_id' => $item->getProductId(),
2457
+ 'name' => $item->getName(),
2458
+ 'sku' => $item->getSku(),
2459
+ 'main_id' => $item->getItemId(),
2460
+ 'price' => $this->_price_format($this->def_currency, 1, $item->getOrigPrice(), $this->currency_code),
2461
+ 'quantity' => (int)$item->getQtyOrderedProduct(),
2462
+ 'type_id' => ucfirst($item->getProductType()),
2463
+ 'iso_code' => $this->def_currency,
2464
+ // 'status' => $item->getStatus(),
2465
+ // 'created_at' => $item->getCreatedAt(),
2466
+ // 'order_id' => $item->getOrderId(),
2467
+ 'thumbnail' => $thumbnail,
2468
+ );
2469
+ }
2470
+
2471
+
2472
+
2473
+ return array(
2474
+ "products_count" => $size,
2475
+ "products" => $ordered_products,
2476
+ "max_date" => $max_date,
2477
+ "min_date" => $min_date
2478
+ );
2479
+ }
2480
+
2481
  protected function search_products_ordered()
2482
+ {
2483
+ if (isset($this->group_by_product_id) && !empty($this->group_by_product_id)) {
2484
+ $result = $this->search_grouped_ordered_products();
2485
+ } else {
2486
+ // $result = $this->search_grouped_ordered_products();
2487
+ $result = $this->search_products_ordered_atomic();
2488
+ }
2489
+
2490
+ return $result;
2491
+ }
2492
+
2493
+ protected function search_products_ordered_atomic()
2494
  {
2495
 
2496
  $ordered_products = array();
2587
 
2588
  switch ($this->sort_by) {
2589
  case 'name':
2590
+ $dir = $this->get_sort_direction('ASC');
2591
+ $salesCollection->getSelect()->order(array('main_table' . '.name' . $dir));
2592
  break;
2593
  case 'id':
2594
+ $dir = $this->get_sort_direction('DESC');
2595
+ $salesCollection->getSelect()->order(array('main_table' . '.product_id' . $dir));
2596
+ break;
2597
+ case 'qty':
2598
+ $dir = $this->get_sort_direction('DESC');
2599
+ $salesCollection->getSelect()->order(array('quantity' . $dir));
2600
+ break;
2601
+ case 'total':
2602
+ $dir = $this->get_sort_direction('DESC');
2603
+ $salesCollection->getSelect()->order(array('price' . $dir));
2604
  break;
2605
  }
2606
 
2607
+ // echo($salesCollection->getSelect()->__toString());die();
2608
+
2609
  if (!empty($this->page) && !empty($this->show)) {
2610
  $salesCollection->getSelect()->limit($this->show, ($this->page - 1) * $this->show);
2611
  }
2612
 
2613
+ $ordersDates = $salesCollection->getColumnValues('created_at');
2614
  $ordersDates = array_map("strtotime", $ordersDates);
2615
 
2616
  if ($salesCollection->count() > 0) {
2660
  );
2661
  }
2662
 
 
2663
  protected function get_products_info()
2664
  {
2665
  $row = null;
2676
  $product = Mage::getModel("catalog/product")->load($this->product_id);
2677
 
2678
  if ($product) {
2679
+ $statusOptions = Mage::getSingleton('catalog/product_status')->getOptionArray();
2680
+ $stockOptions = $this->getStockOptions();
2681
+ $status = $product->getStatus();
2682
+ $isInStock = $product->getStockItem()->getIsInStock();
2683
+
2684
  // Get count of product orders
2685
  $salesCollection = Mage::getModel("sales/order_item")->getCollection()
2686
  ->addFieldToSelect(array('product_id', 'name', 'sku'));
2698
  $row['quantity'] = intval($product->getQuantity());
2699
  }
2700
  $row['sku'] = $product->getSku();
2701
+ // $row['active'] = $product->getStatus();
2702
+ $row['status_code'] = $status;
2703
+ $row['status_label'] = $statusOptions[$status];
2704
+ $row['stock_code'] = $isInStock;
2705
+ $row['stock_label'] = $stockOptions[$isInStock];
2706
  // $row['descr'] = $product->getDescription();
2707
  // $row['short_desc'] = $product->getShortDescription();
2708
  $row['image'] = $product->getImage();
2717
  unset($row['spec_price']);
2718
  }
2719
 
2720
+ $images = array();
2721
+ // $mediaGallery = Mage::getModel('catalog/product')->load($product->getId())->getMediaGalleryImages();
2722
+ $mediaGallery = $product->getMediaGallery();
2723
+ if (is_array($mediaGallery['images'])) {
2724
+ foreach ($mediaGallery['images'] as $image) {
2725
+ if ($image['disabled']) {
2726
+ // continue;
2727
+ }
2728
+ $small = Mage::helper('catalog/image')->init($product, 'image', $image['file'])->resize(300)
2729
+ ->keepAspectRatio(true)->constrainOnly(true)->keepFrame(false);
2730
+ $small_image = $small->__toString();
2731
+ $large = Mage::helper('catalog/image')->init($product, 'image', $image['file'])->resize(800)
2732
+ ->keepAspectRatio(true)->constrainOnly(true)->keepFrame(false);
2733
+ $large_image = $large->__toString();
2734
+ $images[] = ['large' => $large_image,
2735
+ 'small' => $small_image
2736
+ ];
2737
+ }
2738
+ }
2739
+
2740
+ $row['images'] = $images;
2741
+
2742
+ // For compatibility with old app version
2743
+ if (count($images) > 0) {
2744
+ $row['id_image'] = $images[0]['small'];
2745
+ $row['id_image_large'] = $images[0]['large'];
2746
+ }
2747
+
2748
  }
2749
 
2750
  return $row;
2850
  {
2851
  $abandoned_carts = array();
2852
  $offset = $this->_get_timezone_offset();
2853
+ $cartsTotal = 0;
2854
+ $cartsCount = 0;
2855
 
2856
 
2857
  $storeTableName = Mage::getSingleton('core/resource')->getTableName('core/store');
2858
  $customerTableName = Mage::getSingleton('core/resource')->getTableName('customer_entity');
2859
 
2860
  $quotes = Mage::getResourceModel('sales/quote_collection');
2861
+ $quotesExtra = Mage::getResourceModel('sales/quote_collection');
2862
 
2863
  if (!isset($this->group_id)) {
2864
  if ($this->is_group_exists($this->group_id)) {
2868
  "cs.store_id = main_table.store_id",
2869
  array());
2870
  $quotes->getSelect()->where(new Zend_Db_Expr("cs.group_id = " . $this->group_id));
2871
+ $quotesExtra->getSelect()->where(new Zend_Db_Expr("cs.group_id = " . $this->group_id));
2872
  }
2873
  }
2874
 
2877
  }
2878
  if (!empty($this->search_val) && preg_match('/^\d+(?:,\d+)*$/', $this->search_val)) {
2879
  $quotes->addFieldToFilter('main_table.entity_id', array('eq' => intval($this->search_val)));
2880
+ $quotesExtra->addFieldToFilter('main_table.entity_id', array('eq' => intval($this->search_val)));
2881
  } else if (!empty($this->search_val)) {
2882
  $quotes->getSelect()->where("main_table.`customer_email` LIKE '%" . $this->search_val . "%' OR main_table.`customer_firstname` LIKE '%" . $this->search_val . "%' OR main_table.`customer_lastname` LIKE '%" . $this->search_val . "%' OR CONCAT(`customer_firstname`, ' ', `customer_lastname`) LIKE '%" . $this->search_val . "%'");
2883
+ $quotesExtra->getSelect()->where("main_table.`customer_email` LIKE '%" . $this->search_val . "%' OR main_table.`customer_firstname` LIKE '%" . $this->search_val . "%' OR main_table.`customer_lastname` LIKE '%" . $this->search_val . "%' OR CONCAT(`customer_firstname`, ' ', `customer_lastname`) LIKE '%" . $this->search_val . "%'");
2884
  }
2885
 
2886
  if (!empty($this->carts_from)) {
2887
  $this->carts_from = Mage::getModel('core/date')->timestamp(strtotime($this->carts_from));
2888
  $this->carts_from = date('Y-m-d H:i:s', $this->carts_from);
2889
  $quotes->addFieldToFilter('main_table.updated_at', array('from' => $this->carts_from));
2890
+ $quotesExtra->addFieldToFilter('main_table.updated_at', array('from' => $this->carts_from));
2891
  }
2892
 
2893
  if (!empty($this->carts_to)) {
2894
  $this->carts_to = Mage::getModel('core/date')->timestamp(strtotime($this->carts_to));
2895
  $this->carts_to = date('Y-m-d H:i:s', $this->carts_to);
2896
  $quotes->addFieldToFilter('main_table.updated_at', array('to' => $this->carts_to));
2897
+ $quotesExtra->addFieldToFilter('main_table.updated_at', array('to' => $this->carts_to));
2898
  }
2899
 
2900
  // if (!empty($this->with_customer_details)) {
2901
  $quotes->addFieldToFilter('main_table.customer_email', array('notnull' => true));
2902
+ $quotesExtra->addFieldToFilter('main_table.customer_email', array('notnull' => true));
2903
  // }
2904
 
2905
  if (empty($this->show_unregistered_customers)) {
2906
  $quotes->addFieldToFilter('main_table.customer_id', array('notnull' => true));
2907
+ $quotesExtra->addFieldToFilter('main_table.customer_id', array('notnull' => true));
2908
  $quotes->getSelect()
2909
  ->joinInner(
2910
  array('c' => $customerTableName),
2911
  "c.entity_id = main_table.customer_id",
2912
  array());
2913
+ $quotesExtra->getSelect()
2914
+ ->joinInner(
2915
+ array('c' => $customerTableName),
2916
+ "c.entity_id = main_table.customer_id",
2917
+ array());
2918
  }
2919
 
2920
  $quotes->addFieldToFilter('main_table.is_active', array('eq' => 1));
2921
+ $quotesExtra->addFieldToFilter('main_table.is_active', array('eq' => 1));
2922
  $quotes->addFieldToFilter('main_table.items_count', array('gt' => 0));
2923
+ $quotesExtra->addFieldToFilter('main_table.items_count', array('gt' => 0));
2924
+ $quotes->getSelect()->columns(array('customer_name' => "CONCAT(main_table.customer_firstname, ' ', main_table.customer_lastname)"));
2925
 
2926
  // $quotes->load();
2927
+ // $cart_total_res['total_sum'] = $this->_price_format($this->def_currency, 1, array_sum($quotes->getColumnValues('base_grand_total')), $this->currency_code);
2928
+ $cart_total_res['total_sum'] = 0;
2929
  $cart_total_res['total_count'] = $quotes->getSize();
2930
  // $resource = Mage::getSingleton('core/resource');
2931
  // $readConnection = $resource->getConnection('core_read');
2940
 
2941
  switch ($this->sort_by) {
2942
  case 'id':
2943
+ $dir = $this->get_sort_direction('DESC');
2944
+ $quotes->getSelect()->order(array('main_table' . '.entity_id' . $dir));
2945
  break;
2946
  case 'date':
2947
+ $dir = $this->get_sort_direction('DESC');
2948
+ $quotes->getSelect()->order(array('main_table' . '.updated_at' . $dir));
2949
  break;
2950
  case 'name':
2951
+ $dir = $this->get_sort_direction('ASC');
2952
+ // $quotes->getSelect()->order(array('main_table' . '.customer_firstname' . $dir));
2953
+ $quotes->getSelect()->order(array('customer_name ' . $dir));
2954
+ break;
2955
+ case 'qty':
2956
+ $dir = $this->get_sort_direction('ASC');
2957
+ // $quotes->getSelect()->order(array('quantity' . $dir));
2958
+ $quotes->getSelect()->order(array('main_table.items_count' . $dir));
2959
+ break;
2960
+ case 'total':
2961
+ $dir = $this->get_sort_direction('ASC');
2962
+ $quotes->getSelect()->order(array('base_subtotal_with_discount' . $dir));
2963
  break;
2964
  default:
2965
+ $dir = $this->get_sort_direction('DESC');
2966
+ $quotes->getSelect()->order(array('main_table' . '.updated_at' . $dir));
2967
  break;
2968
  }
2969
  $carts = array();
2970
+
2971
+ // echo($quotes->getSelect()->__toString());die();
2972
+
2973
  // $collection->prepareForAbandonedReport();
2974
  foreach ($quotes as $quote) {
2975
  if (empty($this->show_unregistered_customers)) {
3014
  }
3015
 
3016
  // Sort by name
3017
+ /*if ($this->sort_by == 'name') {
3018
  foreach ($carts as $cart) {
3019
  foreach ($cart as $key => $value) {
3020
  if (!isset($sortArray[$key])) {
3027
  $orderby = "customer"; //change this to whatever key you want from the array
3028
 
3029
  array_multisort($sortArray[$orderby], SORT_ASC, $carts);
3030
+ }*/
3031
+
3032
+ $quotesExtra->getSelect()->columns(array('total' => 'SUM(main_table.base_grand_total)', 'count' => 'COUNT(main_table.entity_id)'));
3033
+
3034
+ foreach ($quotesExtra as $data) {
3035
+ $cartsTotal = $data->getTotal();
3036
+ $cartsCount = $data->getCount();
3037
  }
3038
+
3039
  return array('abandoned_carts' => $carts,
3040
+ // 'abandoned_carts_count' => $cart_total_res['total_count'],
3041
+ 'abandoned_carts_count' => $cartsCount,
3042
+ // 'abandoned_carts_total' => $cart_total_res['total_sum'],
3043
+ // 'abandoned_carts_total' => $cartsTotal,
3044
+ 'abandoned_carts_total' => $this->_price_format($this->def_currency, 1, $cartsTotal, $this->currency_code)
3045
  );
3046
 
3047
  return $quote;
3233
  );
3234
  }
3235
 
3236
+ private function getStockOptions() {
3237
+ $stockOptions = array();
3238
+ $options = Mage::getSingleton('Mage_CatalogInventory_Model_Source_Stock')->toOptionArray();
3239
+ $count = count($options);
3240
+
3241
+ for ($i = 0; $i < $count; $i++) {
3242
+ $stockOptions[$options[$i]['value']] = $options[$i]['label'];
3243
+ }
3244
+
3245
+ return $stockOptions;
3246
+ }
3247
+
3248
  protected function _price_format($iso_code, $curr_format, $price, $convert_to, $force = false, $format = true)
3249
  {
3250
  $currency_symbol = '';
app/code/community/Emagicone/Mobassistantconnector/etc/config.xml CHANGED
@@ -15,7 +15,7 @@
15
 
16
  <modules>
17
  <Emagicone_Mobassistantconnector>
18
- <version>1.3.0</version>
19
  </Emagicone_Mobassistantconnector>
20
  </modules>
21
  <frontend>
@@ -52,6 +52,11 @@
52
  </admin>
53
 
54
  <global>
 
 
 
 
 
55
  <helpers>
56
  <mobassistantconnector>
57
  <class>Emagicone_Mobassistantconnector_Helper</class>
@@ -113,13 +118,13 @@
113
  </observers>
114
  </customer_register_success>
115
  </events>
116
- <layout>
117
- <updates>
118
- <emagicone_mobassistantconnector>
119
- <file>emagicone_mobassistantconnector.xml</file>
120
- </emagicone_mobassistantconnector>
121
- </updates>
122
- </layout>
123
  </global>
124
 
125
  <adminhtml>
@@ -132,13 +137,13 @@
132
  </translations>
133
  </modules>
134
  </translate>
135
- <layout>
136
- <updates>
137
- <mobassistantconnector>
138
- <file>mobassistantconnector.xml</file>
139
- </mobassistantconnector>
140
- </updates>
141
- </layout>
142
  </adminhtml>
143
 
144
  </config>
15
 
16
  <modules>
17
  <Emagicone_Mobassistantconnector>
18
+ <version>1.3.2</version>
19
  </Emagicone_Mobassistantconnector>
20
  </modules>
21
  <frontend>
52
  </admin>
53
 
54
  <global>
55
+ <blocks>
56
+ <mobassistantconnector>
57
+ <class>Emagicone_Mobassistantconnector_Block</class>
58
+ </mobassistantconnector>
59
+ </blocks>
60
  <helpers>
61
  <mobassistantconnector>
62
  <class>Emagicone_Mobassistantconnector_Helper</class>
118
  </observers>
119
  </customer_register_success>
120
  </events>
121
+ <!--<layout>-->
122
+ <!--<updates>-->
123
+ <!--<emagicone_mobassistantconnector>-->
124
+ <!--<file>emagicone_mobassistantconnector.xml</file>-->
125
+ <!--</emagicone_mobassistantconnector>-->
126
+ <!--</updates>-->
127
+ <!--</layout>-->
128
  </global>
129
 
130
  <adminhtml>
137
  </translations>
138
  </modules>
139
  </translate>
140
+ <!--<layout>-->
141
+ <!--<updates>-->
142
+ <!--<mobassistantconnector>-->
143
+ <!--<file>mobassistantconnector.xml</file>-->
144
+ <!--</mobassistantconnector>-->
145
+ <!--</updates>-->
146
+ <!--</layout>-->
147
  </adminhtml>
148
 
149
  </config>
app/code/community/Emagicone/Mobassistantconnector/etc/system.xml CHANGED
@@ -10,7 +10,7 @@
10
  <mobassistantconnectorinfosec translate="label">
11
  <label>Mobile Assistant Connector</label>
12
  <tab>mobassistantconnectorinfo</tab>
13
- <frontend_type>text</frontend_type>
14
  <sort_order>1000</sort_order>
15
  <show_in_default>1</show_in_default>
16
  <show_in_website>1</show_in_website>
@@ -36,7 +36,7 @@
36
  </status>
37
  </fields>
38
  </emogeneral>
39
- <emoaccess translate="label">
40
  <label>Access Settings</label>
41
  <sort_order>20</sort_order>
42
  <show_in_default>1</show_in_default>
@@ -46,7 +46,7 @@
46
  <login translate="label comment">
47
  <label>Login</label>
48
  <frontend_type>text</frontend_type>
49
- <backend_model>emagiconemobassistantconnector/login</backend_model>
50
  <sort_order>10</sort_order>
51
  <show_in_default>1</show_in_default>
52
  <show_in_website>1</show_in_website>
@@ -56,8 +56,8 @@
56
  <password translate="label comment">
57
  <label>Password</label>
58
  <frontend_type>password</frontend_type>
59
- <source_model>emagiconemobassistantconnector/defpassword</source_model>
60
- <backend_model>emagiconemobassistantconnector/password</backend_model>
61
  <sort_order>20</sort_order>
62
  <show_in_default>1</show_in_default>
63
  <show_in_website>1</show_in_website>
@@ -66,14 +66,50 @@
66
  </password>
67
  </fields>
68
  </emoaccess>
69
- <emoqr translate="label comment">
70
- <expanded>1</expanded>
71
  <label>QR Code</label>
72
  <sort_order>30</sort_order>
73
  <show_in_default>1</show_in_default>
74
  <show_in_website>1</show_in_website>
75
  <show_in_store>1</show_in_store>
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  </emoqr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  </groups>
78
  </mobassistantconnectorinfosec>
79
  </sections>
10
  <mobassistantconnectorinfosec translate="label">
11
  <label>Mobile Assistant Connector</label>
12
  <tab>mobassistantconnectorinfo</tab>
13
+ <frontend_type>text</frontend_type>
14
  <sort_order>1000</sort_order>
15
  <show_in_default>1</show_in_default>
16
  <show_in_website>1</show_in_website>
36
  </status>
37
  </fields>
38
  </emogeneral>
39
+ <emoaccess translate="label">
40
  <label>Access Settings</label>
41
  <sort_order>20</sort_order>
42
  <show_in_default>1</show_in_default>
46
  <login translate="label comment">
47
  <label>Login</label>
48
  <frontend_type>text</frontend_type>
49
+ <backend_model>emagiconemobassistantconnector/login</backend_model>
50
  <sort_order>10</sort_order>
51
  <show_in_default>1</show_in_default>
52
  <show_in_website>1</show_in_website>
56
  <password translate="label comment">
57
  <label>Password</label>
58
  <frontend_type>password</frontend_type>
59
+ <source_model>emagiconemobassistantconnector/defpassword</source_model>
60
+ <backend_model>emagiconemobassistantconnector/password</backend_model>
61
  <sort_order>20</sort_order>
62
  <show_in_default>1</show_in_default>
63
  <show_in_website>1</show_in_website>
66
  </password>
67
  </fields>
68
  </emoaccess>
69
+ <emoqr translate="label comment">
70
+ <expanded>1</expanded>
71
  <label>QR Code</label>
72
  <sort_order>30</sort_order>
73
  <show_in_default>1</show_in_default>
74
  <show_in_website>1</show_in_website>
75
  <show_in_store>1</show_in_store>
76
+ <fields>
77
+ <qrconfig translate="label comment">
78
+ <label>QR Code for Config</label>
79
+ <frontend_type>text</frontend_type>
80
+ <frontend_model>mobassistantconnector/adminhtml_system_config_form_qrconfig</frontend_model>
81
+ <!--<base_url type="media" scope_info="1">connect</base_url>-->
82
+ <sort_order>10</sort_order>
83
+ <show_in_default>1</show_in_default>
84
+ <show_in_website>1</show_in_website>
85
+ <show_in_store>1</show_in_store>
86
+ <!--<comment>Store URL and access details (login and password) for Mobile Assistant Connector are encoded in this QR code. Scan it with special option available on connection settings page of Magento Mobile Assistant to autofill acess settings and connect to your Magento store.</comment>-->
87
+ </qrconfig>
88
+ </fields>
89
  </emoqr>
90
+ <emoconnectqr translate="label comment">
91
+ <expanded>1</expanded>
92
+ <label>Get the App from Google Play</label>
93
+ <sort_order>40</sort_order>
94
+ <show_in_default>1</show_in_default>
95
+ <show_in_website>1</show_in_website>
96
+ <show_in_store>1</show_in_store>
97
+ <fields>
98
+ <qrconnect translate="label comment">
99
+ <label>QR Code for Application</label>
100
+ <frontend_type>text</frontend_type>
101
+ <frontend_model>mobassistantconnector/adminhtml_system_config_form_qrcode</frontend_model>
102
+ <!--<base_url type="media" scope_info="1">connect</base_url>-->
103
+ <sort_order>10</sort_order>
104
+ <show_in_default>1</show_in_default>
105
+ <show_in_website>1</show_in_website>
106
+ <show_in_store>1</show_in_store>
107
+ <comment>Click or use your device camera to read the QR-code.</comment>
108
+ </qrconnect>
109
+ </fields>
110
+ </emoconnectqr>
111
+ <emoconnectorqr2>
112
+ </emoconnectorqr2>
113
  </groups>
114
  </mobassistantconnectorinfosec>
115
  </sections>
app/design/adminhtml/default/default/template/mobassistantconnector/connect_qrcode.phtml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $url = 'https://goo.gl/B20FrE';
4
+
5
+ ?>
6
+ <div id="qr_app">
7
+ <a href="https://goo.gl/B20FrE" onmouseover='this.style.background_color="white"' target="_blank"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAIAAAD2HxkiAAAABmJLR0QA/wD/AP+gvaeTAAAFH0lEQVR4nO3dQY4bNxQA0SjI/a+sLB0kNoG0KdbnzHtbY9xSSwUuvsh+vd/vP4DOn/ULgO9OhBATIcRECDERQkyEEBMhxEQIMRFCTIQQEyHERAgxEUJMhBATIcRECDERQkyEEBMhxEQIMRFCTIQQEyHERAgxEUJMhBATIcRECDERQkyEEBMhxEQIMRFCTIQQEyHERAixvw5f7/V6Hb7iRu/3+1f/tHhfV//VM1/1U/4QKyHERAgxEUJMhBATIcRECDERQkyEEDs9rF84PyT9qWeD5mdT8u0vY76rP+UPsRJCTIQQEyHERAgxEUJMhBATIcRECLFBw/qF7aPV+XvJn73C7ZvuF77qPTzPSggxEUJMhBATIcRECDERQkyEEBMhxO4Y1vNPJyfyHGAlhJgIISZCiIkQYiKEmAghJkKIiRBihvUft32P/Em3bE6/mpUQYiKEmAghJkKIiRBiIoSYCCEmQojdMayfPzI+OZHffjee7cc/+TK+NishxEQIMRFCTIQQEyHERAgxEUJMhBAbNKwfspf8me1D7SED9O2u/pQ/xEoIMRFCTIQQEyHERAgxEUJMhBATIcROD+vnT5Ofufp9nfylAf9lJYSYCCEmQoiJEGIihJgIISZCiIkQYqeH9Sc3Vm8/mv7kbvchN+rkQf3b3/ItpxNYCSEmQoiJEGIihJgIISZCiIkQYiKE2KBj8LdPeE8Omoc8R/6ZIRP57fdw1ER+wUoIMRFCTIQQEyHERAgxEUJMhBATIcReo6aWvzL/QecnZ+vbbd+BfnL6/wVYCSEmQoiJEGIihJgIISZCiIkQYiKE2KCd9ScN2cW/MP8M/yH78bdf6zwrIcRECDERQkyEEBMhxEQIMRFCTIQQu/6Z9fPPTj95av0tT2n/qe3v65YRv5UQYiKEmAghJkKIiRBiIoSYCCEmQogNOgZ//jT5pO2D5iH/4TPzf5LxO6yEEBMhxEQIMRFCTIQQEyHERAgxEULs+mPw54+MTx4mMH8iv/1at2yfX7ASQkyEEBMhxEQIMRFCTIQQEyHERAixQcfgDxkZL2zfjj1k7D5/Iv/sWgt21gM/iBBiIoSYCCEmQoiJEGIihJgIITboGPyFk9vnF4bMoIf84OGrMqyHb0eEEBMhxEQIMRFCTIQQEyHERAixO4b1843aqb3Ryfe1/UcI2//qQ6yEEBMhxEQIMRFCTIQQEyHERAgxEUJs0DH48y3GuEMm8kMe4D5kFH7Ll81KCDERQkyEEBMhxEQIMRFCTIQQEyHETg/rF66ed5+81snZ+jMnP8ohX5vfYSWEmAghJkKIiRBiIoSYCCEmQoiJEGKDhvULV0+TF+a/jMWdH/KrhlvOul+wEkJMhBATIcRECDERQkyEEBMhxEQIsTuG9fMNmQsPudb22frC9r/yzHr4dkQIMRFCTIQQEyHERAgxEUJMhBAzrP8uth+5f3Jn/faXYWc98IMIISZCiIkQYiKEmAghJkKIiRBidwzrR41W/6+TQ+1nrr69C7e8LyshxEQIMRFCTIQQEyHERAgxEUJMhBB7HR5ozp9cL5x8PPqoc9o3mv8FcAw+fDsihJgIISZCiIkQYiKEmAghJkKInR7WA/9iJYSYCCEmQoiJEGIihJgIISZCiIkQYiKEmAghJkKIiRBiIoSYCCEmQoiJEGIihJgIISZCiIkQYiKEmAghJkKIiRBiIoSYCCEmQoiJEGIihJgIISZCiIkQYiKEmAghJkKIiRBiIoTY329QcGLo+WURAAAAAElFTkSuQmCC" title="QR Code for Application" /></a>
8
+ </div>
app/design/adminhtml/default/default/template/mobassistantconnector/jsinit.phtml CHANGED
@@ -28,22 +28,34 @@
28
  var elem_p_span = document.createElement("span");
29
  var mobassistantconnectorinfosec_emoaccess_password = document.getElementById('mobassistantconnectorinfosec_emoaccess_password');
30
  var mobassistantconnectorinfosec_emoaccess_login = document.getElementById('mobassistantconnectorinfosec_emoaccess_login');
31
- var mobassistantconnectorinfosec_emoqr = document.getElementById("mobassistantconnectorinfosec_emoqr");
 
 
32
 
 
 
 
 
 
 
 
 
33
 
34
  window.password = mobassistantconnectorinfosec_emoaccess_password.value;
35
  window.login = mobassistantconnectorinfosec_emoaccess_login.value;
36
 
37
  mobassistantconnectorinfosec_emoaccess_password.setAttribute("onkeyup" , "changeQRCode()");
38
  mobassistantconnectorinfosec_emoaccess_login.setAttribute("onkeyup" , "changeQRCode()");
 
 
39
 
40
  elem_div0.setAttribute("id", "mobassistantconnectorinfosec_div0");
41
  mobassistantconnectorinfosec_emoqr.appendChild(elem_div0);
42
  var mobassistantconnectorinfosec_div0 = document.getElementById("mobassistantconnectorinfosec_div0");
43
- mobassistantconnectorinfosec_div0.style.position="relative";
44
- mobassistantconnectorinfosec_div0.style.width="300px";
45
- mobassistantconnectorinfosec_div0.style.height="300px";
46
- mobassistantconnectorinfosec_div0.style.zIndex="800";
47
 
48
  elem.src = "<?php echo $qr_url; ?>";
49
  elem.setAttribute("height", "300");
@@ -51,6 +63,7 @@
51
  elem.setAttribute("alt", "QR Code");
52
  elem.setAttribute("id", "mobassistantconnectorinfosec_qr_code");
53
  mobassistantconnectorinfosec_div0.appendChild(elem);
 
54
 
55
  elem_div_main.setAttribute("class", "form-list");
56
  elem_div_main.setAttribute("id", "mobassistantconnectorinfosec_div_main");
@@ -59,8 +72,9 @@
59
 
60
  elem_p.setAttribute("id", "mobassistantconnectorinfosec_qr_p_note");
61
  elem_p.setAttribute("class", "note");
 
62
  mobassistantconnectorinfosec_div_main.appendChild(elem_p);
63
- mobassistantconnectorinfosec_div_main.style.paddingLeft="25px";
64
  mobassistantconnectorinfosec_div_main.style.marginTop="-5px";
65
 
66
  elem_p_span.setAttribute("id", "mobassistantconnectorinfosec_qr_p_span_note");
@@ -69,6 +83,18 @@
69
  document.getElementById("mobassistantconnectorinfosec_qr_p_span_note").innerHTML = 'Store URL and access details (login and password) for Mobile Assistant Connector are encoded in this QR code. Scan it with special option available on connection settings page of Magento Mobile Assistant to autofill acess settings and connect to your Magento store.';
70
  }
71
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  function changeQRCode() {
73
  var elem_div_change = document.createElement("div");
74
  var mobassistantconnectorinfosec_qr_code = document.getElementById('mobassistantconnectorinfosec_qr_code');
@@ -92,8 +118,8 @@
92
  mobassistantconnectorinfosec_elem_div_change.innerHTML = "Login details have been changed. Save changes for code to be regenerated";
93
  mobassistantconnectorinfosec_elem_div_change.style.position="absolute";
94
  mobassistantconnectorinfosec_elem_div_change.style.width="150px";
95
- mobassistantconnectorinfosec_elem_div_change.style.top="36%";
96
- mobassistantconnectorinfosec_elem_div_change.style.zIndex="1000";
97
  mobassistantconnectorinfosec_elem_div_change.style.left="25%";
98
  mobassistantconnectorinfosec_elem_div_change.style.color="red";
99
  mobassistantconnectorinfosec_elem_div_change.style.textAlign="center";
28
  var elem_p_span = document.createElement("span");
29
  var mobassistantconnectorinfosec_emoaccess_password = document.getElementById('mobassistantconnectorinfosec_emoaccess_password');
30
  var mobassistantconnectorinfosec_emoaccess_login = document.getElementById('mobassistantconnectorinfosec_emoaccess_login');
31
+ var mobassistantconnectorinfosec_emoqr = document.getElementById("row_mobassistantconnectorinfosec_emoqr_qrconfig");
32
+ var mobassistantconnectorinfosec_emoconnectorqr = document.getElementById("mobassistantconnectorinfosec_emoconnectorqr");
33
+ var mobassistantconnectorinfosec_qr_app = document.getElementById("qr_app");
34
 
35
+ // Get last td
36
+ // var mytable = document.getElementById('tableid');
37
+ var myrows = document.getElementById('row_mobassistantconnectorinfosec_emoqr_qrconfig');
38
+ // var lastrow = myrows[myrows.length -1];
39
+ var mycells = myrows.getElementsByTagName('td');
40
+ var lastcell = mycells[mycells.length -3];
41
+
42
+ mobassistantconnectorinfosec_emoqr = lastcell;
43
 
44
  window.password = mobassistantconnectorinfosec_emoaccess_password.value;
45
  window.login = mobassistantconnectorinfosec_emoaccess_login.value;
46
 
47
  mobassistantconnectorinfosec_emoaccess_password.setAttribute("onkeyup" , "changeQRCode()");
48
  mobassistantconnectorinfosec_emoaccess_login.setAttribute("onkeyup" , "changeQRCode()");
49
+ mobassistantconnectorinfosec_qr_app.setAttribute("onmouseover" , "qrAppMouseOver()");
50
+ mobassistantconnectorinfosec_qr_app.setAttribute("onmouseout" , "qrAppMouseOut()");
51
 
52
  elem_div0.setAttribute("id", "mobassistantconnectorinfosec_div0");
53
  mobassistantconnectorinfosec_emoqr.appendChild(elem_div0);
54
  var mobassistantconnectorinfosec_div0 = document.getElementById("mobassistantconnectorinfosec_div0");
55
+ // mobassistantconnectorinfosec_div0.style.position="relative";
56
+ // mobassistantconnectorinfosec_div0.style.width="300px";
57
+ // mobassistantconnectorinfosec_div0.style.height="300px";
58
+ // mobassistantconnectorinfosec_div0.style.zIndex="800";
59
 
60
  elem.src = "<?php echo $qr_url; ?>";
61
  elem.setAttribute("height", "300");
63
  elem.setAttribute("alt", "QR Code");
64
  elem.setAttribute("id", "mobassistantconnectorinfosec_qr_code");
65
  mobassistantconnectorinfosec_div0.appendChild(elem);
66
+ mobassistantconnectorinfosec_div0.style.position="relative";
67
 
68
  elem_div_main.setAttribute("class", "form-list");
69
  elem_div_main.setAttribute("id", "mobassistantconnectorinfosec_div_main");
72
 
73
  elem_p.setAttribute("id", "mobassistantconnectorinfosec_qr_p_note");
74
  elem_p.setAttribute("class", "note");
75
+ // elem_p.style.paddingLeft="-125px";
76
  mobassistantconnectorinfosec_div_main.appendChild(elem_p);
77
+ // mobassistantconnectorinfosec_div_main.style.paddingLeft="25px";
78
  mobassistantconnectorinfosec_div_main.style.marginTop="-5px";
79
 
80
  elem_p_span.setAttribute("id", "mobassistantconnectorinfosec_qr_p_span_note");
83
  document.getElementById("mobassistantconnectorinfosec_qr_p_span_note").innerHTML = 'Store URL and access details (login and password) for Mobile Assistant Connector are encoded in this QR code. Scan it with special option available on connection settings page of Magento Mobile Assistant to autofill acess settings and connect to your Magento store.';
84
  }
85
 
86
+ function qrAppMouseOver() {
87
+ var mobassistantconnectorinfosec_qr_app = document.getElementById("qr_app");
88
+
89
+ mobassistantconnectorinfosec_qr_app.style.opacity = "0.7";
90
+ }
91
+
92
+ function qrAppMouseOut() {
93
+ var mobassistantconnectorinfosec_qr_app = document.getElementById("qr_app");
94
+
95
+ mobassistantconnectorinfosec_qr_app.style.opacity = "1";
96
+ }
97
+
98
  function changeQRCode() {
99
  var elem_div_change = document.createElement("div");
100
  var mobassistantconnectorinfosec_qr_code = document.getElementById('mobassistantconnectorinfosec_qr_code');
118
  mobassistantconnectorinfosec_elem_div_change.innerHTML = "Login details have been changed. Save changes for code to be regenerated";
119
  mobassistantconnectorinfosec_elem_div_change.style.position="absolute";
120
  mobassistantconnectorinfosec_elem_div_change.style.width="150px";
121
+ mobassistantconnectorinfosec_elem_div_change.style.top="35%";
122
+ // mobassistantconnectorinfosec_elem_div_change.style.zIndex="1000";
123
  mobassistantconnectorinfosec_elem_div_change.style.left="25%";
124
  mobassistantconnectorinfosec_elem_div_change.style.color="red";
125
  mobassistantconnectorinfosec_elem_div_change.style.textAlign="center";
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>mobile_assistant_connector</name>
4
- <version>1.3.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl.html">GNU</license>
7
  <channel>community</channel>
@@ -9,14 +9,20 @@
9
  <summary>Mobile Assistant Connector</summary>
10
  <description>Mobile Assistant Connector</description>
11
  <notes>Fixed:&#xD;
12
- - search restrictions in orders list&#xD;
13
  - internal changes&#xD;
14
  &#xD;
15
- *Works only with release of app (2.6.1) and higher</notes>
 
 
 
 
 
 
16
  <authors><author><name>eMagicOne</name><user>mobile</user><email>mobile@emagicone.com</email></author></authors>
17
- <date>2016-02-10</date>
18
- <time>15:49:58</time>
19
- <contents><target name="magecommunity"><dir name="Emagicone"><dir name="Mobassistantconnector"><dir name="Helper"><file name="Access.php" hash="c6f4c96ca225bbc72cb829c59f7808f1"/><file name="Data.php" hash="efa0278512e07a2b87bcb4ee3fe80470"/></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="fbf33b9ed5ae4a05910619d95245d924"/><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="7ced4bf13156f35a291e278d746207c3"/><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="ff38464daf32c4b1535c5a39238364cb"/><file name="system.xml" hash="916fe7ee643e4dcb15a5498219605896"/></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="jsinit.phtml" hash="98e914ee799ba8944a0dd9ecb5ebc54b"/></dir></dir></dir></dir></dir></target></contents>
20
  <compatible/>
21
  <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>
22
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>mobile_assistant_connector</name>
4
+ <version>1.3.2</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
+ - saving push messages configuration&#xD;
13
  - internal changes&#xD;
14
  &#xD;
15
+ Added:&#xD;
16
+ - List of product images (Product details)&#xD;
17
+ - QR-code to get app from Google Play (in module settings)&#xD;
18
+ - Formatting of average sums (Dashboard)&#xD;
19
+ - Sorting results with more parameters (new versions of app)&#xD;
20
+ - Ordered products grouped by "Product ID"&#xD;
21
+ - Stock and availability statuses of product</notes>
22
  <authors><author><name>eMagicOne</name><user>mobile</user><email>mobile@emagicone.com</email></author></authors>
23
+ <date>2016-02-29</date>
24
+ <time>16:23:02</time>
25
+ <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="66f81043e54919ecf4991970fd3e6ff8"/></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="7dedaba05f3fabcf11a1627cdb4608e7"/><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="5bf33174acdbabc10d4b509ae7b090cc"/><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="d376f0352bcb78007ef7c7f83a89c9a8"/><file name="jsinit.phtml" hash="0a462da90a18be15dd5b3305c02605b5"/></dir></dir></dir></dir></dir></target></contents>
26
  <compatible/>
27
  <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>
28
  </package>