magento_mobile_assistant_manager - Version 0.2.7

Version Notes

- Enhancement

Download this release

Release Info

Developer Biztech
Extension magento_mobile_assistant_manager
Version 0.2.7
Comparing to
See all releases


Code changes from version 0.2.6 to 0.2.7

app/code/local/Biztech/Mobileassistant/Block/Adminhtml/Config/Form/Renderer/Website.php DELETED
@@ -1,39 +0,0 @@
1
- <?php
2
- class Biztech_Mobileassistant_Block_Adminhtml_Config_Form_Renderer_Website extends Mage_Adminhtml_Block_System_Config_Form_Field
3
- {
4
- protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
5
- {
6
- $html = '';
7
- $data = Mage::getStoreConfig('mobileassistant/activation/data');
8
- $ele_value = explode(',', str_replace($data, '', Mage::helper('core')->decrypt($element->getValue())));
9
- $ele_name = $element->getName();
10
- $ele_id = $element->getId();
11
- $element->setName($ele_name . '[]');
12
- $data_info = Mage::helper('mobileassistant')->getDataInfo();
13
- if(isset($data_info['dom']) && intval($data_info['c']) > 0 && intval($data_info['suc']) == 1){
14
- foreach (Mage::app()->getWebsites() as $website) {
15
- $url = $website->getConfig('web/unsecure/base_url');
16
- $url = Mage::helper('mobileassistant')->getFormatUrl(trim(preg_replace('/^.*?\/\/(.*)?\//', '$1', $url)));
17
- foreach($data_info['dom'] as $web){
18
- if($web['dom'] == $url && $web['suc'] == 1) {
19
- $element->setChecked(false);
20
- $id = $website->getId();
21
-
22
- $name = $website->getName();
23
- $element->setId($ele_id.'_'.$id);
24
- $element->setValue($id);
25
- if(in_array($id, $ele_value) !== false){
26
- $element->setChecked(true);
27
- }
28
- if ($id!=0) {
29
- $html .= '<div><label>'.$element->getElementHtml().' '.$name.' </label></div>';
30
- }
31
- }
32
- }
33
- }
34
- }else{
35
- $html = sprintf('<strong class="required">%s</strong>', $this->__('Please enter a valid key'));
36
- }
37
- return $html;
38
- }
39
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/local/Biztech/Mobileassistant/Helper/Data.php CHANGED
@@ -205,93 +205,6 @@ class Biztech_Mobileassistant_Helper_Data extends Mage_Core_Helper_Abstract {
205
  return true;
206
  }
207
 
208
- public function checkKey($k, $s = '') {
209
- $ch = curl_init();
210
- curl_setopt($ch, CURLOPT_URL, sprintf('http://store.biztechconsultancy.com/extension/licence.php'));
211
- curl_setopt($ch, CURLOPT_POST, true);
212
- curl_setopt($ch, CURLOPT_POSTFIELDS, 'key=' . urlencode($k) . '&domains=' . urlencode(implode(',', $this->getAllStoreDomains())) . '&sec=mobileassistant');
213
- curl_setopt($ch, CURLOPT_TIMEOUT, 30);
214
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
215
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
216
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
217
- $content = curl_exec($ch);
218
- $res = Zend_Json::decode($content);
219
- $modulestatus = new Mage_Core_Model_Config();
220
- $enc = Mage::helper('core');
221
- if (empty($res)) {
222
- $modulestatus->saveConfig('mobileassistant/activation/key', "");
223
- $modulestatus->saveConfig('mobileassistant/mobileassistant_general/enabled', 0);
224
- $data = Mage::getStoreConfig('mobileassistant/activation/data');
225
- $groups = array(
226
- 'activation' => array(
227
- 'fields' => array(
228
- 'data' => array(
229
- 'value' => $data
230
- ),
231
- 'websites' => array(
232
- 'value' => ''
233
- )
234
- )
235
- )
236
- );
237
- Mage::getModel('adminhtml/config_data')
238
- ->setSection('mobileassistant')
239
- ->setGroups($groups)
240
- ->save();
241
- Mage::getConfig()->reinit();
242
- Mage::app()->reinitStores();
243
- return;
244
- }
245
- $data = '';
246
- $web = '';
247
- $en = '';
248
-
249
- if (isset($res['dom']) && intval($res['c']) > 0 && intval($res['suc']) == 1) {
250
- $data = $enc->encrypt(base64_encode(Zend_Json::encode($res)));
251
- if (!$s) {
252
- $params = Mage::app()->getRequest()->getParam('groups');
253
- if (isset($params['activation']['fields']['websites']['value'])) {
254
- $s = $params['activation']['fields']['websites']['value'];
255
- } else if (Mage::app()->getRequest()->getParam('website')) {
256
- $s = explode(',', str_replace($data, '', Mage::helper('core')->decrypt(Mage::getStoreConfig('mobileassistant/activation/websites'))));
257
- }
258
- }
259
- $en = $res['suc'];
260
- if (isset($s) && $s != null) {
261
- $web = $enc->encrypt($data . implode(',', $s) . $data);
262
- } else {
263
- $web = $enc->encrypt($data . $data);
264
- }
265
- } else {
266
- $modulestatus->saveConfig('mobileassistant/activation/key', "");
267
- $modulestatus->saveConfig('mobileassistant/mobileassistant_general/enabled', 0);
268
- }
269
- $groups = array(
270
- 'activation' => array(
271
- 'fields' => array(
272
- 'data' => array(
273
- 'value' => $data
274
- ),
275
- 'websites' => array(
276
- 'value' => (string) $web
277
- ),
278
- 'en' => array(
279
- 'value' => $en
280
- ),
281
- 'installed' => array(
282
- 'value' => 1
283
- )
284
- )
285
- )
286
- );
287
- Mage::getModel('adminhtml/config_data')
288
- ->setSection('mobileassistant')
289
- ->setGroups($groups)
290
- ->save();
291
- Mage::getConfig()->reinit();
292
- Mage::app()->reinitStores();
293
- }
294
-
295
  public function getDataInfo() {
296
  $data = Mage::getStoreConfig('mobileassistant/activation/data');
297
  return Zend_Json::decode(base64_decode(Mage::helper('core')->decrypt($data)));
205
  return true;
206
  }
207
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
208
  public function getDataInfo() {
209
  $data = Mage::getStoreConfig('mobileassistant/activation/data');
210
  return Zend_Json::decode(base64_decode(Mage::helper('core')->decrypt($data)));
app/code/local/Biztech/Mobileassistant/etc/config.xml CHANGED
@@ -142,15 +142,6 @@
142
  </mobileassistant>
143
  </helpers>
144
  <events>
145
- <admin_system_config_changed_section_mobileassistant>
146
- <observers>
147
- <magemobcart>
148
- <type>model</type>
149
- <class>mobileassistant/observer</class>
150
- <method>checkKey</method>
151
- </magemobcart>
152
- </observers>
153
- </admin_system_config_changed_section_mobileassistant>
154
  <customer_register_success>
155
  <observers>
156
  <mobileassistant_customer_notification_checkout>
142
  </mobileassistant>
143
  </helpers>
144
  <events>
 
 
 
 
 
 
 
 
 
145
  <customer_register_success>
146
  <observers>
147
  <mobileassistant_customer_notification_checkout>
app/code/local/Biztech/Mobileassistant/etc/system.xml CHANGED
@@ -16,35 +16,6 @@
16
  <show_in_website>1</show_in_website>
17
  <show_in_store>1</show_in_store>
18
  <groups>
19
- <activation translate="label">
20
- <label>Magento Mobile Admin Activation</label>
21
- <frontend_type>text</frontend_type>
22
- <sort_order>1</sort_order>
23
- <show_in_default>1</show_in_default>
24
- <show_in_website>1</show_in_website>
25
- <show_in_store>1</show_in_store>
26
- <fields>
27
- <key>
28
- <label>Activation Key</label>
29
- <frontend_type>text</frontend_type>
30
- <sort_order>1</sort_order>
31
- <show_in_default>1</show_in_default>
32
- <show_in_website>1</show_in_website>
33
- <show_in_store>1</show_in_store>
34
- <validate>required-entry</validate>
35
- </key>
36
- <websites translate="label">
37
- <label>Select Websites</label>
38
- <frontend_type>checkbox</frontend_type>
39
- <source_model>adminhtml/system_config_source_website</source_model>
40
- <frontend_model>mobileassistant/adminhtml_config_form_renderer_website</frontend_model>
41
- <sort_order>2</sort_order>
42
- <show_in_default>1</show_in_default>
43
- <show_in_website>1</show_in_website>
44
- <show_in_store>1</show_in_store>
45
- </websites>
46
- </fields>
47
- </activation>
48
  <mobileassistant_general translate="label">
49
  <label>General</label>
50
  <frontend_type>text</frontend_type>
@@ -57,7 +28,6 @@
57
  <label>Enabled</label>
58
  <frontend_type>select</frontend_type>
59
  <source_model>adminhtml/system_config_source_yesno</source_model>
60
- <frontend_model>mobileassistant/adminhtml_enabledisable</frontend_model>
61
  <sort_order>1</sort_order>
62
  <show_in_default>1</show_in_default>
63
  <show_in_website>1</show_in_website>
16
  <show_in_website>1</show_in_website>
17
  <show_in_store>1</show_in_store>
18
  <groups>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  <mobileassistant_general translate="label">
20
  <label>General</label>
21
  <frontend_type>text</frontend_type>
28
  <label>Enabled</label>
29
  <frontend_type>select</frontend_type>
30
  <source_model>adminhtml/system_config_source_yesno</source_model>
 
31
  <sort_order>1</sort_order>
32
  <show_in_default>1</show_in_default>
33
  <show_in_website>1</show_in_website>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>magento_mobile_assistant_manager</name>
4
- <version>0.2.6</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
@@ -27,9 +27,9 @@ https://itunes.apple.com/us/app/magentomobilemanager/id695074519?mt=8&amp;ign-mp
27
  </description>
28
  <notes>- Enhancement</notes>
29
  <authors><author><name>Biztech</name><user>biztechcon</user><email>sales@biztechconsultancy.com</email></author></authors>
30
- <date>2016-07-22</date>
31
- <time>04:32:20</time>
32
- <contents><target name="mageetc"><dir name="modules"><file name="Biztech_Mobileassistant.xml" hash="18d9cf7b8e516db899336adfd8210621"/><file name="Biztech_Authentication.xml" hash="149998e1599f43939f13cbc059123c8f"/></dir></target><target name="mage"><dir name="lib"><dir name="mobileassistant"><file name="pushcert.pem" hash="ae01f2353e11081071f5fa7e06bef9c1"/></dir></dir><dir name="."><file name="MageMobAdmin.pdf" hash=""/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="mobileassistant"><dir name="system"><dir name="config"><file name="barcode.phtml" hash="94f6f78607e6d376b53b12f349d691b8"/><file name="barcode_21-7-2016.phtml" hash="4316de57ba76dc0f3d581fd149830920"/></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocal"><dir name="Biztech"><dir name="Authentication"><dir name="controllers"><file name="IndexController.php" hash="bfc01d24d03410e2d467139ff75ba9ce"/></dir><dir name="etc"><file name="config.xml" hash="d12ebc10e7781ff82323e54ff7713dae"/></dir></dir><dir name="Mobileassistant"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Form"><dir name="Renderer"><file name="Website.php" hash="0c1e8edeea8f34380803f2ee8caaf0e8"/></dir></dir></dir><file name="Enabledisable.php" hash="3b2fcf73b42be06f35b8661d14c11293"/></dir><dir name="Config"><file name="Barcodeurl.php" hash="6dc63c4a9f259cb5fb854d39c9057eaa"/><file name="Baseurl.php" hash="5ca3d2fc995b3da5e155fd55e87b1eed"/></dir></dir><dir name="Helper"><file name="Data.php" hash="951e2c003267660cf66a5110f7c1f0df"/></dir><dir name="Model"><dir name="Mobileassistant"><file name="Api.php" hash="4e8e1f556fc8f1d9e6c2f520a3a84e52"/></dir><file name="Mobileassistant.php" hash="68e160bf752ec8c1facc514389c00849"/><dir name="Mysql4"><dir name="Mobileassistant"><file name="Collection.php" hash="e9319365535ec2c42429ea1d9dbdc097"/></dir><file name="Mobileassistant.php" hash="62dc51f43aa6dff1dc762646b71cd600"/></dir><file name="Observer.php" hash="b40ccaabbc9d2fb2312097dba1f93389"/><dir name="System"><dir name="Config"><file name="Notification.php" hash="fdaacb629e9b200fc4d778ab4173f55a"/><file name="Notification_30-1-2016.php" hash="e534c166867436b3ab6c5d3a9c0e5d45"/></dir></dir></dir><dir name="controllers"><file name="CustomerController.php" hash="43619f8ab81eb651a34e7fab791af613"/><file name="DashboardController.php" hash="74ab167f27cb2a2fb1e5f7a636896668"/><file name="IndexController.php" hash="a3f18e83cd9fd2887ce82e3305c27b28"/><file name="OrderController.php" hash="14e4ef67dc8b5cd4aa0e4a4e4235a966"/><file name="ProductController.php" hash="cbeea2ed1c12baada5b2fb2ba593e78c"/></dir><dir name="etc"><file name="api.xml" hash="7860c9fe0f121148eb2a3a498d1879b1"/><file name="config.xml" hash="728d352e24878516ce118759978b7054"/><file name="system.xml" hash="359566ac64e3bb32e78b4ad247d21b31"/></dir><dir name="sql"><dir name="mobileassistant_setup"><file name="mysql4-install-0.1.0.php" hash="4f06ae1c3c5362b88fae1b1951a6b02a"/><file name="mysql4-upgrade-0.1.0-0.1.4.php" hash="172e9ecba3b5b385cef1c257b2af4bfa"/><file name="mysql4-upgrade-0.1.10-0.2.0.php" hash="dcb5288e356d3c36838446bbcadf6a2e"/><file name="mysql4-upgrade-0.1.4-0.1.5.php" hash="bd4adba7146d89fed6c548dd46a30a81"/><file name="mysql4-upgrade-0.1.5-0.1.6.php" hash="88ea6198ef876da921faebb1aa067485"/><file name="mysql4-upgrade-0.1.6-0.1.10.php" hash="88ea6198ef876da921faebb1aa067485"/></dir></dir></dir></dir></target></contents>
33
  <compatible/>
34
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
35
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>magento_mobile_assistant_manager</name>
4
+ <version>0.2.7</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
27
  </description>
28
  <notes>- Enhancement</notes>
29
  <authors><author><name>Biztech</name><user>biztechcon</user><email>sales@biztechconsultancy.com</email></author></authors>
30
+ <date>2016-07-26</date>
31
+ <time>10:31:34</time>
32
+ <contents><target name="mageetc"><dir name="modules"><file name="Biztech_Mobileassistant.xml" hash="18d9cf7b8e516db899336adfd8210621"/><file name="Biztech_Authentication.xml" hash="149998e1599f43939f13cbc059123c8f"/></dir></target><target name="mage"><dir name="lib"><dir name="mobileassistant"><file name="pushcert.pem" hash="ae01f2353e11081071f5fa7e06bef9c1"/></dir></dir><dir name="."><file name="MageMobAdmin.pdf" hash=""/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="mobileassistant"><dir name="system"><dir name="config"><file name="barcode.phtml" hash="94f6f78607e6d376b53b12f349d691b8"/><file name="barcode_21-7-2016.phtml" hash="4316de57ba76dc0f3d581fd149830920"/></dir></dir></dir></dir></dir></dir></dir></target><target name="magelocal"><dir name="Biztech"><dir name="Authentication"><dir name="controllers"><file name="IndexController.php" hash="bfc01d24d03410e2d467139ff75ba9ce"/></dir><dir name="etc"><file name="config.xml" hash="d12ebc10e7781ff82323e54ff7713dae"/></dir></dir><dir name="Mobileassistant"><dir name="Block"><dir name="Adminhtml"><file name="Enabledisable.php" hash="3b2fcf73b42be06f35b8661d14c11293"/></dir><dir name="Config"><file name="Barcodeurl.php" hash="6dc63c4a9f259cb5fb854d39c9057eaa"/><file name="Baseurl.php" hash="5ca3d2fc995b3da5e155fd55e87b1eed"/></dir></dir><dir name="Helper"><file name="Data.php" hash="34eda7a945f0988fc58901ebca52bced"/></dir><dir name="Model"><dir name="Mobileassistant"><file name="Api.php" hash="4e8e1f556fc8f1d9e6c2f520a3a84e52"/></dir><file name="Mobileassistant.php" hash="68e160bf752ec8c1facc514389c00849"/><dir name="Mysql4"><dir name="Mobileassistant"><file name="Collection.php" hash="e9319365535ec2c42429ea1d9dbdc097"/></dir><file name="Mobileassistant.php" hash="62dc51f43aa6dff1dc762646b71cd600"/></dir><file name="Observer.php" hash="b40ccaabbc9d2fb2312097dba1f93389"/><dir name="System"><dir name="Config"><file name="Notification.php" hash="fdaacb629e9b200fc4d778ab4173f55a"/><file name="Notification_30-1-2016.php" hash="e534c166867436b3ab6c5d3a9c0e5d45"/></dir></dir></dir><dir name="controllers"><file name="CustomerController.php" hash="43619f8ab81eb651a34e7fab791af613"/><file name="DashboardController.php" hash="74ab167f27cb2a2fb1e5f7a636896668"/><file name="IndexController.php" hash="a3f18e83cd9fd2887ce82e3305c27b28"/><file name="OrderController.php" hash="14e4ef67dc8b5cd4aa0e4a4e4235a966"/><file name="ProductController.php" hash="cbeea2ed1c12baada5b2fb2ba593e78c"/></dir><dir name="etc"><file name="api.xml" hash="7860c9fe0f121148eb2a3a498d1879b1"/><file name="config.xml" hash="393d2694bea27ab0817715ed5652d756"/><file name="system.xml" hash="355979d3740d80a64b536a6f9824d060"/></dir><dir name="sql"><dir name="mobileassistant_setup"><file name="mysql4-install-0.1.0.php" hash="4f06ae1c3c5362b88fae1b1951a6b02a"/><file name="mysql4-upgrade-0.1.0-0.1.4.php" hash="172e9ecba3b5b385cef1c257b2af4bfa"/><file name="mysql4-upgrade-0.1.10-0.2.0.php" hash="dcb5288e356d3c36838446bbcadf6a2e"/><file name="mysql4-upgrade-0.1.4-0.1.5.php" hash="bd4adba7146d89fed6c548dd46a30a81"/><file name="mysql4-upgrade-0.1.5-0.1.6.php" hash="88ea6198ef876da921faebb1aa067485"/><file name="mysql4-upgrade-0.1.6-0.1.10.php" hash="88ea6198ef876da921faebb1aa067485"/></dir></dir></dir></dir></target></contents>
33
  <compatible/>
34
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
35
  </package>