magento_mobile_assistant_manager - Version 0.1.0

Version Notes

-New Realse

Download this release

Release Info

Developer Biztech
Extension magento_mobile_assistant_manager
Version 0.1.0
Comparing to
See all releases


Version 0.1.0

app/code/local/Biztech/Mobileassistant/Helper/Data.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Biztech_Mobileassistant_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+
6
+ public function getPriceFormat($price)
7
+ {
8
+ $price = sprintf("%01.2f", $price);
9
+ return $price;
10
+ }
11
+
12
+ public function isEnable()
13
+ {
14
+ return Mage::getStoreConfig('mobileassistant/mobileassistant_general/enabled');
15
+ }
16
+ }
app/code/local/Biztech/Mobileassistant/Model/Mobileassistant.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Biztech_Mobileassistant_Model_Mobileassistant extends Mage_Core_Model_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('mobileassistant/mobileassistant');
9
+ }
10
+ }
app/code/local/Biztech/Mobileassistant/Model/Mobileassistant/Api.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Biztech_Mobileassistant_Model_Mobileassistant_Api extends Mage_Api_Model_Resource_Abstract
3
+ {
4
+ public function create($data)
5
+ {
6
+ $collections = Mage::getModel("mobileassistant/mobileassistant")->getCollection()->addFieldToFilter('username',Array('eq'=>$data['user']))->addFieldToFilter('apikey',Array('eq'=>$data['key']))->addFieldToFilter('device_token',Array('eq'=>$data['devicetoken']));
7
+ $count = count($collections);
8
+ if($count == 0){
9
+ Mage::getModel("mobileassistant/mobileassistant")
10
+ ->setUsername($data['user'])
11
+ ->setApikey($data['key'])
12
+ ->setDeviceToken($data['devicetoken'])
13
+ ->setNotificationFlag($data['notification_flag'])
14
+ ->save();
15
+ }
16
+ if($count == 1){
17
+ foreach($collections as $user)
18
+ {
19
+ $user_id = $user->getUserId();
20
+ $flag = $user->getNotificationFlag();
21
+ }
22
+ if($flag != $data['notification_flag']){
23
+ try {
24
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
25
+ $connection->beginTransaction();
26
+ $fields = array();
27
+ $fields['notification_flag'] = $data['notification_flag'];
28
+ $where = $connection->quoteInto('user_id =?', $user_id);
29
+ $connection->update('mobileassistant', $fields, $where);
30
+ $connection->commit();
31
+ } catch (Exception $e){
32
+ return $e->getMessage();
33
+ }
34
+ }
35
+ }
36
+
37
+ $successArr[] = array('success_msg' => 'Login sucessfully','session_id' => $data['session_id']) ;
38
+
39
+ foreach (Mage::app()->getWebsites() as $website) {
40
+ foreach ($website->getGroups() as $group) {
41
+ $stores = $group->getStores();
42
+ foreach ($stores as $store) {
43
+ $storeArr[] = array('id' =>$store->getId(),
44
+ 'name' => $store->getName()
45
+ );
46
+ }
47
+ }
48
+ }
49
+ $result = array('success' => $successArr,'stores' => $storeArr);
50
+ return $result;
51
+ }
52
+ }
53
+
app/code/local/Biztech/Mobileassistant/Model/Mysql4/Mobileassistant.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Biztech_Mobileassistant_Model_Mysql4_Mobileassistant extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ // Note that the mobileassistant_id refers to the key field in your database table.
8
+ $this->_init('mobileassistant/mobileassistant', 'mobileassistant_id');
9
+ }
10
+ }
app/code/local/Biztech/Mobileassistant/Model/Mysql4/Mobileassistant/Collection.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Biztech_Mobileassistant_Model_Mysql4_Mobileassistant_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('mobileassistant/mobileassistant');
9
+ }
10
+ }
app/code/local/Biztech/Mobileassistant/Model/Observer.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Biztech_Mobileassistant_Model_Observer
3
+ {
4
+ private static $_handleCustomerFirstOrderCounter = 1;
5
+ public function sales_order_save_after(Varien_Event_Observer $observer)
6
+ {
7
+ if (Mage::app()->getRequest()->getControllerName()=='onepage'){
8
+ if(Mage::getStoreConfig('mobileassistant/mobileassistant_general/enabled')){
9
+ if (self::$_handleCustomerFirstOrderCounter > 1) {
10
+ return $this;
11
+ }
12
+ self::$_handleCustomerFirstOrderCounter++;
13
+ $collections = Mage::getModel("mobileassistant/mobileassistant")->getCollection()->addFieldToFilter('notification_flag',Array('eq'=>1));
14
+ $passphrase = 'push2magento';
15
+ $message = Mage::getStoreConfig('mobileassistant/mobileassistant_general/notification_msg');
16
+ if($message == null){
17
+ $message = Mage::helper('mobileassistant')->__('Placed new order in your store..!');
18
+ }
19
+ $apnsCert = Mage::getBaseDir('lib'). DS. "mobileassistant/magentoKeys.pem";
20
+ $ctx = stream_context_create();
21
+ stream_context_set_option($ctx, 'ssl', 'local_cert', $apnsCert);
22
+ stream_context_set_option($ctx, 'ssl', 'passphrase', $passphrase);
23
+ $flags = STREAM_CLIENT_CONNECT | STREAM_CLIENT_PERSISTENT;
24
+
25
+ $fp = stream_socket_client('ssl://gateway.push.apple.com:2195', $err,$errstr, 60, $flags, $ctx);
26
+
27
+
28
+
29
+ if ($fp){
30
+ foreach($collections as $collection){
31
+ $deviceToken = $collection->getDeviceToken();
32
+ $body['aps'] = array(
33
+ 'alert' => $message,
34
+ 'sound' => 'default'
35
+ );
36
+ $payload = json_encode($body);
37
+ $msg = chr(0) . pack('n', 32) . pack('H*', $deviceToken) . pack('n', strlen($payload)) . $payload;
38
+ $result = fwrite($fp, $msg, strlen($msg));
39
+ }
40
+ fclose($fp);
41
+ }
42
+ return true;
43
+ }
44
+ }
45
+ }
46
+ }
app/code/local/Biztech/Mobileassistant/controllers/CustomerController.php ADDED
@@ -0,0 +1,180 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Biztech_Mobileassistant_CustomerController extends Mage_Core_Controller_Front_Action
3
+ {
4
+ public function getCustomerListAction()
5
+ {
6
+ if(Mage::helper('mobileassistant')->isEnable()){
7
+ $post_data = Mage::app()->getRequest()->getParams();
8
+ $sessionId = $post_data['session'];
9
+ if (!Mage::getSingleton('api/session')->isLoggedIn($sessionId)) {
10
+ echo $this->__("Session expired....Please Login again");
11
+ return false;
12
+ }
13
+ $limit = $post_data['limit'];
14
+ $offset = $post_data['offset'];
15
+ $new_customers = $post_data['last_fetch_customer'];
16
+ $customers = Mage::getModel('customer/customer')->getCollection()->addAttributeToSelect('*')->setOrder('entity_id', 'desc');
17
+
18
+ if($offset != null){
19
+ $customers->addAttributeToFilter('entity_id', array('lt' => $offset));
20
+ }
21
+ if($new_customers != null){
22
+ $customers->addAttributeToFilter('entity_id', array('gt' => $new_customers));
23
+ }
24
+ $customers->getSelect()->limit($limit);
25
+ foreach($customers as $customer){
26
+ $website_name = Mage::app()->getWebsite($customer->getWebsiteId())->getName();
27
+ $customer_list[] = array(
28
+ 'entity_id' => $customer->getEntityId(),
29
+ 'customer_name' => $customer->getFirstname()." ".$customer->getLastname(),
30
+ 'email_id' => $customer->getEmail(),
31
+ 'website_name' => $website_name
32
+ );
33
+ }
34
+ $customerListResultArr = array('customerlistdata' => $customer_list);
35
+ $customerListResult = Mage::helper('core')->jsonEncode($customerListResultArr);
36
+ return Mage::app()->getResponse()->setBody($customerListResult);
37
+ }else{
38
+ $isEnable = Mage::helper('core')->jsonEncode(array('enable' => false));
39
+ return Mage::app()->getResponse()->setBody($isEnable);
40
+ }
41
+ }
42
+
43
+ public function getCustomerDetailAction()
44
+ {
45
+ if(Mage::helper('mobileassistant')->isEnable()){
46
+ $post_data = Mage::app()->getRequest()->getParams();
47
+ $sessionId = $post_data['session'];
48
+ if (!Mage::getSingleton('api/session')->isLoggedIn($sessionId)) {
49
+ echo $this->__("Session expired....Please Login again");
50
+ return false;
51
+ }
52
+ $customer_id = $post_data['customer_id'];
53
+ $customerData = Mage::getModel('customer/customer')->load($customer_id);
54
+
55
+
56
+ $basic_detail = array(
57
+ 'entity_id' => $customerData->getEntityId(),
58
+ 'name' => $customerData->getFirstname()." ".$customerData->getLastname(),
59
+ 'email' => $customerData->getEmail(),
60
+ );
61
+
62
+ $billing_address = Mage::getModel('customer/address')->load($customerData->getDefaultBilling());
63
+ $shipping_address = Mage::getModel('customer/address')->load($customerData->getDefaultShipping());
64
+
65
+ $billing_country_name = null;
66
+ $shipping_country_name = null;
67
+
68
+ if($billing_address->getCountryId()){
69
+ $billing_country_name = Mage::getModel('directory/country')->loadByCode($billing_address->getCountryId())->getName();
70
+ }
71
+ if($shipping_address->getCountryId()){
72
+ $shipping_country_name = Mage::getModel('directory/country')->loadByCode($shipping_address->getCountryId())->getName();
73
+ }
74
+
75
+ $billing_address_detail = array(
76
+ 'name' => $billing_address->getFirstname()." ".$billing_address->getLastname(),
77
+ 'street' => $billing_address->getData('street'),
78
+ 'city' => $billing_address->getCity(),
79
+ 'region' => $billing_address->getRegion(),
80
+ 'postcode' => $billing_address->getPostcode(),
81
+ 'country' => $billing_country_name,
82
+ 'telephone' => $billing_address->getTelephone()
83
+ );
84
+
85
+ $shipping_address_detail = array(
86
+ 'name' => $shipping_address->getFirstname()." ".$shipping_address->getLastname(),
87
+ 'street' => $shipping_address->getData('street'),
88
+ 'city' => $shipping_address->getCity(),
89
+ 'region' => $shipping_address->getRegion(),
90
+ 'postcode' => $shipping_address->getPostcode(),
91
+ 'country' => $shipping_country_name,
92
+ 'telephone' => $shipping_address->getTelephone()
93
+ );
94
+
95
+ $customer_detail = array(
96
+ 'basic_details' => $basic_detail,
97
+ 'billing_address' => $billing_address_detail,
98
+ 'shipping_address' => $shipping_address_detail
99
+ );
100
+ $order_detail = $this->_getCustomerOrderList($customer_id);
101
+
102
+ $customerDetailResultArr = array('customerDetails' => $customer_detail,'customerOrderDetail' =>$order_detail);
103
+ $customerDetailResult = Mage::helper('core')->jsonEncode($customerDetailResultArr);
104
+ return Mage::app()->getResponse()->setBody($customerDetailResult);
105
+ }else{
106
+ $isEnable = Mage::helper('core')->jsonEncode(array('enable' => false));
107
+ return Mage::app()->getResponse()->setBody($isEnable);
108
+ }
109
+ }
110
+
111
+ protected function _getCustomerOrderList($customer_id)
112
+ {
113
+ $orderCollection = Mage::getResourceModel('sales/order_grid_collection')->addFieldToFilter('customer_id',Array('eq'=>$customer_id))->setOrder('entity_id', 'desc');
114
+ $limit = 5;
115
+ $orderCollection->getSelect()->limit($limit);
116
+
117
+ foreach($orderCollection as $order){
118
+
119
+ $orderListData[] = array(
120
+ 'entity_id' => $order->getEntityId(),
121
+ 'increment_id' => $order->getIncrementId(),
122
+ 'store_id' => $order->getStoreId(),
123
+ 'customer_name' => $order->getBillingName(),
124
+ 'status' => $order->getStatus(),
125
+ 'order_date' => date('Y-m-d H:i:s', strtotime($order->getCreatedAt())),
126
+ 'grand_total' => strip_tags(Mage::helper('core')->currency(Mage::helper('mobileassistant')->getPriceFormat($order->getGrandTotal()))),
127
+ 'toal_qty' => Mage::getModel('sales/order')->load($order->getEntityId())->getTotalQtyOrdered()
128
+ );
129
+ }
130
+ return $orderListData;
131
+ }
132
+
133
+
134
+ public function getFilterCustomerListAction()
135
+ {
136
+ if(Mage::helper('mobileassistant')->isEnable()){
137
+ $post_data = Mage::app()->getRequest()->getParams();
138
+ $sessionId = $post_data['session'];
139
+ if (!Mage::getSingleton('api/session')->isLoggedIn($sessionId)) {
140
+ echo $this->__("Session expired....Please Login again");
141
+ return false;
142
+ }
143
+ $search = $post_data['search_content'];
144
+ $customers = Mage::getModel('customer/customer')->getCollection()->addAttributeToSelect('*')->setOrder('entity_id', 'desc');
145
+
146
+ if($search != null)
147
+ {
148
+ $customers->addAttributeToFilter(array(
149
+ array(
150
+ 'attribute' => 'firstname',
151
+ 'like' => '%'.$search.'%'
152
+ ),
153
+ array(
154
+ 'attribute' => 'lastname',
155
+ 'like' => '%'.$search.'%'
156
+ ),
157
+ array(
158
+ 'attribute' => 'email',
159
+ 'like' => '%'.$search.'%'
160
+ )
161
+ ));
162
+ }
163
+
164
+
165
+ foreach($customers as $customer){
166
+ $customer_list[] = array(
167
+ 'entity_id' => $customer->getEntityId(),
168
+ 'customer_name' => $customer->getFirstname()." ".$customer->getLastname(),
169
+ 'email_id' => $customer->getEmail()
170
+ );
171
+ }
172
+ $customerListResultArr = array('customerlistdata' => $customer_list);
173
+ $customerListResult = Mage::helper('core')->jsonEncode($customerListResultArr);
174
+ return Mage::app()->getResponse()->setBody($customerListResult);
175
+ }else{
176
+ $isEnable = Mage::helper('core')->jsonEncode(array('enable' => false));
177
+ return Mage::app()->getResponse()->setBody($isEnable);
178
+ }
179
+ }
180
+ }
app/code/local/Biztech/Mobileassistant/controllers/DashboardController.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Biztech_Mobileassistant_DashboardController extends Mage_Core_Controller_Front_Action
3
+ {
4
+ public function dashboardAction()
5
+ {
6
+ if(Mage::helper('mobileassistant')->isEnable()){
7
+ $post_data = Mage::app()->getRequest()->getParams();
8
+ $sessionId = $post_data['session'];
9
+ if (!Mage::getSingleton('api/session')->isLoggedIn($sessionId)) {
10
+ echo $this->__("Session expired....Please Login again");
11
+ return false;
12
+ }
13
+
14
+ $storeId = $post_data['storeid'];
15
+ $type_id = $post_data['days_for_dashboard'];
16
+ $now = Mage::getModel('core/date')->timestamp(time());
17
+ $end_date = date('Y-m-d 23:59:59', $now);
18
+ $orderCollection = Mage::getModel('sales/order')->getCollection()->addFieldToFilter('store_id',Array('eq'=>$storeId))->addFieldToFilter('status',Array('eq'=>'complete'))->setOrder('entity_id', 'desc');
19
+ if($type_id == 7){
20
+ $start_date = date('Y-m-d 00:00:00', strtotime('-6 days'));
21
+ }elseif($type_id == 30){
22
+ $start_date = date('Y-m-d 00:00:00', strtotime('-29 days'));
23
+ }elseif($type_id == 90){
24
+ $start_date = date('Y-m-d 00:00:00', strtotime('-89 days'));
25
+ }
26
+ $orderCollection->addAttributeToFilter('created_at', array('from'=>$start_date, 'to'=>$end_date));
27
+ $total_count = count($orderCollection);
28
+ $dates = $this->getDatesFromRange($start_date, $end_date);
29
+ foreach($dates as $date)
30
+ {
31
+ $orderCollectionByDate = Mage::getModel('sales/order')->getCollection()->addFieldToFilter('store_id',Array('eq'=>$storeId))->addFieldToFilter('status',Array('eq'=>'complete'))->setOrder('entity_id', 'desc');
32
+ $dateStart = date('Y-m-d 00:00:00',strtotime($date));
33
+ $dateEnd = date('Y-m-d 23:59:59',strtotime($date));
34
+ $orderByDate = $orderCollectionByDate->addAttributeToFilter('created_at', array('from'=>$dateStart, 'to'=>$dateEnd));
35
+ if(count($orderByDate) == 0)
36
+ {
37
+ $orderTotalByDate[$date] = 0;
38
+ }
39
+ else{
40
+ foreach($orderByDate as $order){
41
+ $ordersByDate[$date][] = $order->getGrandTotal();
42
+ $orderTotalByDate[$date] = array_sum($ordersByDate[$date]);
43
+ }
44
+ }
45
+ }
46
+
47
+ $orderGrandTotal = strip_tags(Mage::helper('core')->currency(array_sum($orderTotalByDate)));
48
+ $lifeTimeSales = strip_tags(Mage::helper('core')->currency(round(Mage::getResourceModel('reports/order_collection')->addFieldToFilter('store_id', $storeId)->calculateSales()->load()->getFirstItem()->getLifetime(),2)));
49
+ $averageOrder = strip_tags(Mage::helper('core')->currency(round(Mage::getResourceModel('reports/order_collection')->addFieldToFilter('store_id', $storeId)->calculateSales()->load()->getFirstItem()->getAverage(),2)));
50
+ $orderTotalResultArr = array('dashboard_result' =>array('ordertotalbydate' => $orderTotalByDate,'ordergrandtotal' => $orderGrandTotal,'totalordercount' => $total_count,'lifetimesales' => $lifeTimeSales,'averageorder' => $averageOrder));
51
+ $orderDashboardResult = Mage::helper('core')->jsonEncode($orderTotalResultArr);
52
+ return Mage::app()->getResponse()->setBody($orderDashboardResult);
53
+ }else{
54
+ $isEnable = Mage::helper('core')->jsonEncode(array('enable' => false));
55
+ return Mage::app()->getResponse()->setBody($isEnable);
56
+ }
57
+ }
58
+
59
+ public function getDatesFromRange($start_date, $end_date)
60
+ {
61
+ $date_from = strtotime(date('Y-m-d', strtotime($start_date)));
62
+ $date_to = strtotime(date('Y-m-d', strtotime($end_date)));
63
+
64
+ for ($i=$date_from; $i<=$date_to; $i+=86400) {
65
+ $dates[] = date("Y-m-d", $i);
66
+ }
67
+ return $dates;
68
+ }
69
+ }
app/code/local/Biztech/Mobileassistant/controllers/IndexController.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Biztech_Mobileassistant_IndexController extends Mage_Core_Controller_Front_Action
3
+ {
4
+ public function indexAction()
5
+ {
6
+ if(Mage::getStoreConfig('mobileassistant/mobileassistant_general/enabled')){
7
+ $details = Mage::app()->getRequest()->getParams();
8
+ $user = $details['userapi'];
9
+ $api_key = $details['keyapi'];
10
+ $deviceToken = $details['token'];
11
+ $flag = $details['notification_flag'];
12
+ $url = $details['magento_url'].'/api/soap?wsdl';
13
+
14
+ try{
15
+ $soap = new SoapClient($url);
16
+ $session_id = $soap->login($user, $api_key);
17
+ }
18
+ catch(Exception $e){
19
+ echo $e->getMessage();
20
+ return false;
21
+ }
22
+ if($session_id){
23
+ $data[] = array('user' => $user,'key' => $api_key,'devicetoken'=>$deviceToken,'session_id' => $session_id,'notification_flag'=> $flag);
24
+ $result = $soap->call($session_id,'mobileassistant.create',$data);
25
+ $jsonData = Mage::helper('core')->jsonEncode($result);
26
+ return Mage::app()->getResponse()->setBody($jsonData);
27
+ }
28
+ }else{
29
+ return Mage::app()->getResponse()->setBody("Please enable this feature");
30
+ }
31
+ }
32
+
33
+ public function testModuleAction()
34
+ {
35
+ if(Mage::getConfig()->getModuleConfig('Biztech_Mobileassistant')->is('active', 'true') && Mage::getStoreConfig('mobileassistant/mobileassistant_general/enabled'))
36
+ {
37
+ $result['success'] = $this->__('Module is activated on this url');
38
+ }else{
39
+ $result['error'] = $this->__('Please activate this module on this url.');
40
+ }
41
+ $jsonData = Mage::helper('core')->jsonEncode($result);
42
+ return Mage::app()->getResponse()->setBody($jsonData);
43
+ }
44
+
45
+ public function changeSettingsAction()
46
+ {
47
+ $post_data = Mage::app()->getRequest()->getParams();
48
+ $user = $post_data['userapi'];
49
+ $deviceToken = $post_data['token'];
50
+ $flag = $post_data['notification_flag'];
51
+ $collections = Mage::getModel("mobileassistant/mobileassistant")->getCollection()->addFieldToFilter('username',Array('eq'=>$user))->addFieldToFilter('device_token',Array('eq'=>$deviceToken));
52
+ $count = count($collections);
53
+
54
+ foreach($collections as $user)
55
+ {
56
+ $user_id = $user->getUserId();
57
+ }
58
+ if($count == 1)
59
+ {
60
+ try {
61
+ $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
62
+ $connection->beginTransaction();
63
+ $fields = array();
64
+ $fields['notification_flag'] = $flag;
65
+ $where = $connection->quoteInto('user_id =?', $user_id);
66
+ $connection->update('mobileassistant', $fields, $where);
67
+ $connection->commit();
68
+ } catch (Exception $e){
69
+ return $e->getMessage();
70
+ }
71
+ $successArr[] = array('success_msg' => 'Settings update sucessfully') ;
72
+ $result = Mage::helper('core')->jsonEncode($successArr);
73
+ return Mage::app()->getResponse()->setBody($result);
74
+ }
75
+ }
76
+ }
app/code/local/Biztech/Mobileassistant/controllers/OrderController.php ADDED
@@ -0,0 +1,237 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Biztech_Mobileassistant_OrderController extends Mage_Core_Controller_Front_Action
3
+ {
4
+ public function getOrderListAction()
5
+ {
6
+ if(Mage::helper('mobileassistant')->isEnable()){
7
+ $post_data = Mage::app()->getRequest()->getParams();
8
+ $sessionId = $post_data['session'];
9
+ if (!Mage::getSingleton('api/session')->isLoggedIn($sessionId)) {
10
+ echo $this->__("Session expired....Please Login again");
11
+ return false;
12
+ }
13
+
14
+ $limit = $post_data['limit'];
15
+ $storeId = $post_data['storeid'];
16
+ $offset = $post_data['offset'];
17
+ $is_refresh = $post_data['is_refresh'];
18
+
19
+ $orderCollection = Mage::getResourceModel('sales/order_grid_collection')->addFieldToFilter('store_id',Array('eq'=>$storeId))->setOrder('entity_id', 'desc');
20
+ if($offset != null){
21
+ $orderCollection->addAttributeToFilter('entity_id', array('lt' => $offset));
22
+ }
23
+ if($is_refresh == 1){
24
+ $last_fetch_order = $post_data['last_fetch_order'];
25
+ $min_fetch_order = $post_data['min_fetch_order'];
26
+ $last_updated = $post_data['last_updated'];
27
+
28
+ $orderCollection->getSelect()->where("(entity_id BETWEEN '".$min_fetch_order."'AND '".$last_fetch_order ."' AND updated_at > '".$last_updated."') OR entity_id >'".$last_fetch_order."'");
29
+ }
30
+ $orderCollection->getSelect()->limit($limit);
31
+
32
+ foreach($orderCollection as $order){
33
+
34
+ $orderListData[] = array(
35
+ 'entity_id' => $order->getEntityId(),
36
+ 'increment_id' => $order->getIncrementId(),
37
+ 'store_id' => $order->getStoreId(),
38
+ 'customer_name' => $order->getBillingName(),
39
+ 'status' => $order->getStatus(),
40
+ 'order_date' => date('Y-m-d H:i:s', strtotime($order->getCreatedAt())),
41
+ 'grand_total' => strip_tags(Mage::helper('core')->currency($order->getGrandTotal())),
42
+ 'toal_qty' => Mage::getModel('sales/order')->load($order->getEntityId())->getTotalQtyOrdered()
43
+ );
44
+ }
45
+
46
+ $updated_time = date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time()));
47
+ $orderListResultArr = array('orderlistdata' => $orderListData,'updated_time' =>$updated_time);
48
+ $orderListResult = Mage::helper('core')->jsonEncode($orderListResultArr);
49
+ return Mage::app()->getResponse()->setBody($orderListResult);
50
+ }else{
51
+ $isEnable = Mage::helper('core')->jsonEncode(array('enable' => false));
52
+ return Mage::app()->getResponse()->setBody($isEnable);
53
+ }
54
+ }
55
+
56
+ public function getFilterOrderListAction()
57
+ {
58
+ if(Mage::helper('mobileassistant')->isEnable()){
59
+ $post_data = Mage::app()->getRequest()->getParams();
60
+ $storeId = $post_data['storeid'];
61
+ $sessionId = $post_data['session'];
62
+
63
+ if (!Mage::getSingleton('api/session')->isLoggedIn($sessionId)) {
64
+ echo $this->__("Session expired....Please Login again");
65
+ return false;
66
+ }
67
+ $filter_by_date = $post_data['filter_by_date'];
68
+ $filter_by_status = $post_data['filter_by_status'];
69
+ $search_by_id = $post_data['search_by_id'];
70
+ $now = Mage::getModel('core/date')->timestamp(time());
71
+ $orderCollection = Mage::getResourceModel('sales/order_grid_collection')->addFieldToFilter('store_id',Array('eq'=>$storeId))->setOrder('entity_id', 'desc');
72
+
73
+ if($filter_by_date != null){
74
+ $dateEnd = date('Y-m-d 23:59:59', $now);
75
+ if($filter_by_date == 1){
76
+ $dateStart = date('Y-m-d 00:00:00', $now);
77
+ $orderCollection->addAttributeToFilter('created_at', array('from'=>$dateStart, 'to'=>$dateEnd));
78
+ }elseif($filter_by_date == 2){
79
+ $dateStart = date('Y-m-d 00:00:00', strtotime('-6 days'));
80
+ $orderCollection->addAttributeToFilter('created_at', array('from'=>$dateStart, 'to'=>$dateEnd));
81
+ }elseif($filter_by_date == 3){
82
+ $dateStart = date('Y-m-01 00:00:00');
83
+ $orderCollection->addAttributeToFilter('created_at', array('from'=>$dateStart, 'to'=>$dateEnd));
84
+ }elseif($filter_by_date == 4){
85
+ $orderCollection->addAttributeToFilter('created_at', array("lt"=>$post_data['before_date']." 00:00:00"));
86
+ }elseif($filter_by_date == 5){
87
+ $dateStart = $post_data['start_date']." 00:00:00";
88
+ $dateEnd = $post_data['end_date']." 23:59:59";
89
+ $orderCollection->addAttributeToFilter('created_at', array('from'=>$dateStart, 'to'=>$dateEnd));
90
+ }elseif($filter_by_date == 6){
91
+ $orderCollection->addAttributeToFilter('created_at', array("gt"=>$post_data['after_date']." 23:59:59"));
92
+ }
93
+ }
94
+ if($filter_by_status != null){
95
+ $orderCollection->addFieldToFilter('status',Array('eq'=>$filter_by_status));
96
+ }
97
+
98
+ if($search_by_id != null){
99
+ $orderCollection->addFieldToFilter('increment_id',Array('like'=>'%'.$search_by_id.'%'));
100
+ }
101
+ foreach($orderCollection as $order){
102
+
103
+ $orderListData[] = array(
104
+ 'entity_id' => $order->getEntityId(),
105
+ 'increment_id' => $order->getIncrementId(),
106
+ 'store_id' => $order->getStoreId(),
107
+ 'customer_name' => $order->getBillingName(),
108
+ 'status' => $order->getStatus(),
109
+ 'order_date' => date('Y-m-d H:i:s', strtotime($order->getCreatedAt())),
110
+ 'grand_total' => strip_tags(Mage::helper('core')->currency(Mage::helper('mobileassistant')->getPriceFormat($order->getGrandTotal()))),
111
+ 'toal_qty' => Mage::getModel('sales/order')->load($order->getEntityId())->getTotalQtyOrdered()
112
+ );
113
+ }
114
+ $orderListResultArr = array('orderlistdata' => $orderListData);
115
+ $orderListResult = Mage::helper('core')->jsonEncode($orderListResultArr);
116
+ return Mage::app()->getResponse()->setBody($orderListResult);
117
+ }else{
118
+ $isEnable = Mage::helper('core')->jsonEncode(array('enable' => false));
119
+ return Mage::app()->getResponse()->setBody($isEnable);
120
+ }
121
+ }
122
+
123
+ public function getOrderDetailAction()
124
+ {
125
+ if(Mage::helper('mobileassistant')->isEnable()){
126
+ $post_data = Mage::app()->getRequest()->getParams();
127
+ $sessionId = $post_data['session'];
128
+ if (!Mage::getSingleton('api/session')->isLoggedIn($sessionId)) {
129
+ echo $this->__("Session expired....Please Login again");
130
+ return false;
131
+ }
132
+
133
+ $order_id = $post_data['entity_id'];
134
+ $order = Mage::getModel('sales/order')->load($order_id);
135
+
136
+ $order_detail = array(
137
+ 'entity_id' => $order->getEntityId(),
138
+ 'increment_id' => $order->getIncrementId(),
139
+ 'status' => $order->getStatus(),
140
+ 'order_date' => date('Y-m-d H:i:s', strtotime($order->getCreatedAt())),
141
+ 'total_qty' => $order->getTotalQtyOrdered(),
142
+ 'grand_total' => strip_tags(Mage::helper('core')->currency(Mage::helper('mobileassistant')->getPriceFormat($order->getGrandTotal())))
143
+ );
144
+
145
+ $customer_id = $order->getCustomerId();
146
+ $customer_name = $order->getCustomerFirstname()." ".$order->getCustomerLastname();
147
+ if($customer_id == null){$customer_name = $order->getCustomerName();}
148
+ $customer_detail = array(
149
+ 'customer_id' => $customer_id,
150
+ 'customer_name' => $customer_name,
151
+ 'customer_email' => $order->getCustomerEmail()
152
+ );
153
+
154
+ $billing_address = $order->getBillingAddress();
155
+ $billing_address_data = array(
156
+ 'name' => $billing_address->getFirstname().' '.$billing_address->getLastname(),
157
+ 'street' => $billing_address->getData('street'),
158
+ 'city' => $billing_address->getCity(),
159
+ 'region' => $billing_address->getRegion(),
160
+ 'postcode' => $billing_address->getPostcode(),
161
+ 'country' => Mage::getModel('directory/country')->loadByCode($billing_address->getCountryId())->getName(),
162
+ 'telephone' => $billing_address->getTelephone()
163
+ );
164
+ $shipping_address = $order->getShippingAddress();
165
+ $shipping_address_data = array(
166
+ 'name' => $shipping_address->getFirstname().' '.$shipping_address->getLastname(),
167
+ 'street' => $shipping_address->getData('street'),
168
+ 'city' => $shipping_address->getCity(),
169
+ 'region' => $shipping_address->getRegion(),
170
+ 'postcode' => $shipping_address->getPostcode(),
171
+ 'country' => Mage::getModel('directory/country')->loadByCode($shipping_address->getCountryId())->getName(),
172
+ 'telephone' => $shipping_address->getTelephone()
173
+ );
174
+
175
+ $payment_info = array(
176
+ 'payment_method' => $order->getPayment()->getMethodInstance()->getTitle()
177
+ );
178
+
179
+ $shipping_info = array(
180
+ 'shipping_method' => $order->getShippingDescription(),
181
+ 'shipping_charge' => strip_tags(Mage::helper('core')->currency(Mage::helper('mobileassistant')->getPriceFormat($order->getShippingAmount())))
182
+ );
183
+
184
+ $products_detail = $this->_orderedProductDetails($order_id);
185
+
186
+ $full_order_detail = array(
187
+ 'basic_order_detail' => $order_detail,
188
+ 'customer_detail' => $customer_detail,
189
+ 'billing_address' => $billing_address_data,
190
+ 'shipping_address' => $shipping_address_data,
191
+ 'payment_info' => $payment_info,
192
+ 'shipping_info' => $shipping_info,
193
+ 'product_detail' => $products_detail
194
+ );
195
+ $orderDetailResultArr = array('orderlistdata' => $full_order_detail);
196
+ $orderDetailResult = Mage::helper('core')->jsonEncode($orderDetailResultArr);
197
+ return Mage::app()->getResponse()->setBody($orderDetailResult);
198
+ }else{
199
+ $isEnable = Mage::helper('core')->jsonEncode(array('enable' => false));
200
+ return Mage::app()->getResponse()->setBody($isEnable);
201
+ }
202
+ }
203
+
204
+ protected function _orderedProductDetails($order_id)
205
+ {
206
+ $order = Mage::getModel('sales/order')->load($order_id);
207
+ foreach ($order->getItemsCollection() as $item) {
208
+ $product = null;
209
+ if ($item->getParentItem()) continue;
210
+ if ($_options = $this->_getItemOptions($item)) {
211
+ $skus = $_options;
212
+ }
213
+ $products_detail[] = array(
214
+ 'product_id' => $item->getProductId(),
215
+ 'name' => $item->getName(),
216
+ 'sku' => $item->getSku(),
217
+ 'unit_price' => strip_tags(Mage::helper('core')->currency(Mage::helper('mobileassistant')->getPriceFormat($item->getOriginalPrice()))),
218
+ 'ordered_qty' => round($item->getQtyOrdered(), 2),
219
+ 'row_total' => strip_tags(Mage::helper('core')->currency(Mage::helper('mobileassistant')->getPriceFormat($item->getRowTotal()))),
220
+ 'options' => $skus
221
+ );
222
+ }
223
+ return $products_detail;
224
+ }
225
+
226
+ private function _getItemOptions($item)
227
+ {
228
+ $id = array('id' => $item->getItemId());
229
+ $order_items = Mage::getModel('sales/order_item')->getCollection()->addFieldToFilter('parent_item_id',Array('eq'=>$id));
230
+ foreach($order_items as $order_item)
231
+ {
232
+ $product_data = Mage::getModel('catalog/product')->load($order_item->getProductId());
233
+ $skus[] = $product_data->getSku();
234
+ }
235
+ return $skus;
236
+ }
237
+ }
app/code/local/Biztech/Mobileassistant/controllers/ProductController.php ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Biztech_Mobileassistant_ProductController extends Mage_Core_Controller_Front_Action
3
+ {
4
+ public function getProductListAction()
5
+ {
6
+ if(Mage::helper('mobileassistant')->isEnable()){
7
+ $post_data = Mage::app()->getRequest()->getParams();
8
+ $sessionId = $post_data['session'];
9
+ if (!Mage::getSingleton('api/session')->isLoggedIn($sessionId)) {
10
+ echo $this->__("Session expired....Please Login again");
11
+ return false;
12
+ }
13
+
14
+ $storeId = $post_data['storeid'];
15
+ $limit = $post_data['limit'];
16
+ $offset = $post_data['offset'];
17
+ $new_products = $post_data['last_fetch_product'];
18
+ $products = Mage::getModel('catalog/product')->getCollection()->addStoreFilter($storeId)->setOrder('entity_id', 'desc');
19
+ if($offset != null){
20
+ $products->addAttributeToFilter('entity_id', array('lt' => $offset));
21
+ }
22
+ if($new_products != null){
23
+ $products->addAttributeToFilter('entity_id', array('gt' => $new_products));
24
+ }
25
+ $products->getSelect()->limit($limit);
26
+
27
+ foreach($products as $product)
28
+ {
29
+ $product_data = Mage::getModel('catalog/product')->load($product->getId());
30
+ $status = $product_data->getStatus();
31
+ $qty = Mage::getModel('cataloginventory/stock_item')->load($product->getId())->getQty();
32
+ if($status == 1){$status = 'Enabled';}else{$status = 'Disabled';}
33
+ if($qty == 0 || $product_data->getIsInStock() == 0){$qty = 'Out of Stock';}
34
+ $product_list[] = array(
35
+ 'id' => $product->getId(),
36
+ 'sku' => $product_data->getSku(),
37
+ 'name' => $product_data->getName(),
38
+ 'status' => $status,
39
+ 'qty' => $qty,
40
+ 'price' => strip_tags(Mage::helper('core')->currency(Mage::helper('mobileassistant')->getPriceFormat($product_data->getPrice()))),
41
+ 'type' => $product->getTypeId()
42
+ );
43
+ }
44
+
45
+ $productResultArr = array('productlistdata' => $product_list);
46
+ $productListResult = Mage::helper('core')->jsonEncode($productResultArr);
47
+ return Mage::app()->getResponse()->setBody($productListResult);
48
+ }else{
49
+ $isEnable = Mage::helper('core')->jsonEncode(array('enable' => false));
50
+ return Mage::app()->getResponse()->setBody($isEnable);
51
+ }
52
+ }
53
+
54
+ public function getProductDetailAction()
55
+ {
56
+ if(Mage::helper('mobileassistant')->isEnable()){
57
+ $post_data = Mage::app()->getRequest()->getParams();
58
+ $sessionId = $post_data['session'];
59
+ if (!Mage::getSingleton('api/session')->isLoggedIn($sessionId)) {
60
+ echo $this->__("Session expired....Please Login again");
61
+ return false;
62
+ }
63
+ $storeId = $post_data['storeid'];
64
+ $productId = $post_data['productid'];
65
+ $product_data = Mage::getModel('catalog/product')->load($productId);
66
+ $status = $product_data->getStatus();
67
+ $qty = Mage::getModel('cataloginventory/stock_item')->load($product_data->getId())->getQty();
68
+
69
+ if($status == 1){$status = 'Enabled';}else{$status = 'Disabled';}
70
+
71
+ if(!$product_data->isSaleable()){$qty = 'Out of Stock';}
72
+
73
+
74
+ if($product_data->getTypeId() == 'grouped'){
75
+ $associated_products = $product_data->getTypeInstance(true)->getAssociatedProducts($product_data);
76
+ }elseif($product_data->getTypeId() == 'configurable'){
77
+ $associated_products = $product_data->getTypeInstance()->getUsedProducts();
78
+ } elseif($product_data->getTypeId() == 'bundle'){
79
+ $associated_products = $product_data->getTypeInstance(true)->getSelectionsCollection($product_data->getTypeInstance(true)->getOptionsIds($product_data), $product_data);
80
+ }
81
+ foreach($associated_products as $associated_product)
82
+ {
83
+ $status = $associated_product->getStatus();
84
+ $qty = Mage::getModel('cataloginventory/stock_item')->load($associated_product->getId())->getQty();
85
+ if($status == 1){$status = 'Enabled';}else{$status = 'Disabled';}
86
+ if($qty == 0 || $associated_product->getIsInStock() == 0){$qty = 'Out of Stock';}
87
+ $associated_products_details[] = array(
88
+ 'id' => $associated_product->getId(),
89
+ 'sku' => $associated_product->getSku()
90
+ );
91
+
92
+ $associated_products_list[] = array(
93
+ 'id' => $associated_product->getId(),
94
+ 'sku' => $associated_product->getSku(),
95
+ 'name' => $associated_product->getName(),
96
+ 'status' => $status,
97
+ 'qty' => $qty,
98
+ 'price' => strip_tags(Mage::helper('core')->currency(Mage::helper('mobileassistant')->getPriceFormat($associated_product->getPrice())))
99
+ );
100
+ }
101
+ $product_details[] = array(
102
+ 'id' => $product_data->getId(),
103
+ 'sku' => $product_data->getSku(),
104
+ 'name' => $product_data->getName(),
105
+ 'status' => $status,
106
+ 'qty' => $qty,
107
+ 'price' => strip_tags(Mage::helper('core')->currency(Mage::helper('mobileassistant')->getPriceFormat($product_data->getPrice()))),
108
+ 'desc' => $product_data->getDescription(),
109
+ 'type' => $product_data->getTypeId(),
110
+ 'image' => Mage::getModel('catalog/product_media_config')->getMediaUrl($product_data->getImage()),
111
+ 'special_price' => strip_tags(Mage::helper('core')->currency(Mage::helper('mobileassistant')->getPriceFormat($product_data->getSpecialPrice()))),
112
+ 'associated_skus' => $associated_products_details
113
+ );
114
+
115
+ $productResultArr = array('productdata' => $product_details , 'associated_products_list' =>$associated_products_list);
116
+ $productDetailResult = Mage::helper('core')->jsonEncode($productResultArr);
117
+ return Mage::app()->getResponse()->setBody($productDetailResult);
118
+ }else{
119
+ $isEnable = Mage::helper('core')->jsonEncode(array('enable' => false));
120
+ return Mage::app()->getResponse()->setBody($isEnable);
121
+ }
122
+ }
123
+
124
+ public function filterProductAction()
125
+ {
126
+ if(Mage::helper('mobileassistant')->isEnable()){
127
+ $post_data = Mage::app()->getRequest()->getParams();
128
+ $sessionId = $post_data['session'];
129
+ if (!Mage::getSingleton('api/session')->isLoggedIn($sessionId)) {
130
+ echo $this->__("Session expired....Please Login again");
131
+ return false;
132
+ }
133
+ $storeId = $post_data['storeid'];
134
+ $filter_by_name = $post_data['filter_by_name'];
135
+ $filter_by_type = $post_data['product_type'];
136
+ $filter_by_qty = $post_data['filter_by_qty'];
137
+
138
+ $products = Mage::getModel('catalog/product')->getCollection()->addStoreFilter($storeId)->setOrder('entity_id', 'desc');
139
+
140
+ if($filter_by_name != null){
141
+ $products->addAttributeToFilter(array(
142
+ array(
143
+ 'attribute' => 'name',
144
+ 'like' => '%'.$filter_by_name.'%'
145
+ ),
146
+ array(
147
+ 'attribute' => 'sku',
148
+ 'like' => '%'.$filter_by_name.'%'
149
+ )
150
+ ));
151
+ }
152
+
153
+ if($filter_by_type != null){
154
+ $products->addFieldToFilter('type_id',Array('eq'=>$filter_by_type));
155
+ }
156
+
157
+ if($filter_by_qty != null){
158
+ $products->joinField('qty','cataloginventory/stock_item','qty','product_id=entity_id','{{table}}.stock_id=1','left');
159
+ if($filter_by_qty == 'gteq'){
160
+ $qty = $post_data['qty'];
161
+ $products->addFieldToFilter('qty',Array('gteq'=>$qty));
162
+ }elseif($filter_by_qty == 'lteq'){
163
+ $qty = $post_data['qty'];
164
+ $products->addFieldToFilter('qty',Array('lteq'=>$qty));
165
+ }elseif($filter_by_qty == 'btwn'){
166
+ $from_qty = $post_data['from_qty'];
167
+ $to_qty = $post_data['to_qty'];
168
+ $products->addFieldToFilter('qty',array('from'=>$from_qty, 'to'=>$to_qty));
169
+ }
170
+ }
171
+
172
+ foreach($products as $product)
173
+ {
174
+ $product_data = Mage::getModel('catalog/product')->load($product->getId());
175
+ $status = $product_data->getStatus();
176
+ $qty = Mage::getModel('cataloginventory/stock_item')->load($product->getId())->getQty();
177
+ if($status == 1){$status = 'Enabled';}else{$status = 'Disabled';}
178
+ if($qty == 0 || $product_data->getIsInStock() == 0){$qty = 'Out of Stock';}
179
+ $product_list[] = array(
180
+ 'id' => $product->getId(),
181
+ 'sku' => $product_data->getSku(),
182
+ 'name' => $product_data->getName(),
183
+ 'status' => $status,
184
+ 'qty' => $qty,
185
+ 'price' => strip_tags(Mage::helper('core')->currency(Mage::helper('mobileassistant')->getPriceFormat($product_data->getPrice()))),
186
+ 'type' => $product->getTypeId()
187
+ );
188
+ }
189
+
190
+ $productListResultArr = array('productlistdata' => $product_list);
191
+ $productListResult = Mage::helper('core')->jsonEncode($productListResultArr);
192
+ return Mage::app()->getResponse()->setBody($productListResult);
193
+ }else{
194
+ $isEnable = Mage::helper('core')->jsonEncode(array('enable' => false));
195
+ return Mage::app()->getResponse()->setBody($isEnable);
196
+ }
197
+ }
198
+
199
+ }
app/code/local/Biztech/Mobileassistant/etc/api.xml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <api>
4
+ <resources>
5
+ <mobileassistant translate="title" module="biztech_mobileassistant">
6
+ <title>Mobileassistant Api</title>
7
+ <model>mobileassistant/mobileassistant_api</model>
8
+ <methods>
9
+ <create translate="title" module="biztech_mobileassistant">
10
+ <title>Create</title>
11
+ </create>
12
+ </methods>
13
+ </mobileassistant>
14
+ </resources>
15
+ </api>
16
+ </config>
app/code/local/Biztech/Mobileassistant/etc/config.xml ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @category Biztech
5
+ * @package Biztech_Mobileassistant
6
+ * @author ModuleCreator
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ -->
10
+ <config>
11
+ <modules>
12
+ <Biztech_Mobileassistant>
13
+ <version>0.1.0</version>
14
+ </Biztech_Mobileassistant>
15
+ </modules>
16
+ <frontend>
17
+ <routers>
18
+ <mobileassistant>
19
+ <use>standard</use>
20
+ <args>
21
+ <module>Biztech_Mobileassistant</module>
22
+ <frontName>mobileassistant</frontName>
23
+ </args>
24
+ </mobileassistant>
25
+ </routers>
26
+ <layout>
27
+ <updates>
28
+ <mobileassistant>
29
+ <file>mobileassistant.xml</file>
30
+ </mobileassistant>
31
+ </updates>
32
+ </layout>
33
+ </frontend>
34
+ <admin>
35
+ <routers>
36
+ <mobileassistant>
37
+ <use>admin</use>
38
+ <args>
39
+ <module>Biztech_Mobileassistant</module>
40
+ <frontName>mobileassistant</frontName>
41
+ </args>
42
+ </mobileassistant>
43
+ </routers>
44
+ </admin>
45
+ <adminhtml>
46
+ <acl>
47
+ <resources>
48
+ <all>
49
+ <title>Allow Everything</title>
50
+ </all>
51
+ <admin>
52
+ <children>
53
+ <Biztech_Mobileassistant>
54
+ <title>Mobileassistant Module</title>
55
+ <sort_order>10</sort_order>
56
+ </Biztech_Mobileassistant>
57
+ <system>
58
+ <children>
59
+ <config>
60
+ <children>
61
+ <mobileassistant>
62
+ <title>Mobileassistant</title>
63
+ </mobileassistant>
64
+ </children>
65
+ </config>
66
+ </children>
67
+ </system>
68
+ </children>
69
+ </admin>
70
+ </resources>
71
+ </acl>
72
+ <layout>
73
+ <updates>
74
+ <mobileassistant>
75
+ <file>mobileassistant.xml</file>
76
+ </mobileassistant>
77
+ </updates>
78
+ </layout>
79
+ </adminhtml>
80
+ <global>
81
+ <models>
82
+ <mobileassistant>
83
+ <class>Biztech_Mobileassistant_Model</class>
84
+ <resourceModel>mobileassistant_mysql4</resourceModel>
85
+ </mobileassistant>
86
+ <mobileassistant_mysql4>
87
+ <class>Biztech_Mobileassistant_Model_Mysql4</class>
88
+ <entities>
89
+ <mobileassistant>
90
+ <table>mobileassistant</table>
91
+ </mobileassistant>
92
+ </entities>
93
+ </mobileassistant_mysql4>
94
+ </models>
95
+ <resources>
96
+ <mobileassistant_setup>
97
+ <setup>
98
+ <module>Biztech_Mobileassistant</module>
99
+ </setup>
100
+ <connection>
101
+ <use>core_setup</use>
102
+ </connection>
103
+ </mobileassistant_setup>
104
+ <mobileassistant_write>
105
+ <connection>
106
+ <use>core_write</use>
107
+ </connection>
108
+ </mobileassistant_write>
109
+ <mobileassistant_read>
110
+ <connection>
111
+ <use>core_read</use>
112
+ </connection>
113
+ </mobileassistant_read>
114
+ </resources>
115
+ <blocks>
116
+ <mobileassistant>
117
+ <class>Biztech_Mobileassistant_Block</class>
118
+ </mobileassistant>
119
+ </blocks>
120
+ <helpers>
121
+ <mobileassistant>
122
+ <class>Biztech_Mobileassistant_Helper</class>
123
+ </mobileassistant>
124
+ </helpers>
125
+ <events>
126
+ <sales_order_save_after>
127
+ <observers>
128
+ <mobileassistant>
129
+ <class>mobileassistant/observer</class>
130
+ <method>sales_order_save_after</method>
131
+ </mobileassistant>
132
+ </observers>
133
+ </sales_order_save_after>
134
+ </events>
135
+ </global>
136
+ </config>
app/code/local/Biztech/Mobileassistant/etc/system.xml ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <config>
3
+ <tabs>
4
+ <biztech translate="label" module="mobileassistant">
5
+ <label>Biztech Extensions</label>
6
+ <sort_order>400</sort_order>
7
+ </biztech>
8
+ </tabs>
9
+ <sections>
10
+ <mobileassistant translate="label" module="mobileassistant">
11
+ <label>Mobile Assistant</label>
12
+ <tab>biztech</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>10</sort_order>
15
+ <show_in_default>1</show_in_default>
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>
22
+ <sort_order>10</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
+ <enabled translate="label">
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>
34
+ <show_in_store>1</show_in_store>
35
+ <comment>Select Yes to enable this feature.</comment>
36
+ </enabled>
37
+ <notification_msg translate="label">
38
+ <label>Notification Message</label>
39
+ <frontend_type>text</frontend_type>
40
+ <sort_order>2</sort_order>
41
+ <show_in_default>1</show_in_default>
42
+ <show_in_website>1</show_in_website>
43
+ <show_in_store>1</show_in_store>
44
+ <comment>Enter your message for notification.</comment>
45
+ </notification_msg>
46
+
47
+ </fields>
48
+ </mobileassistant_general>
49
+ </groups>
50
+ </mobileassistant>
51
+ </sections>
52
+ </config>
app/code/local/Biztech/Mobileassistant/sql/mobileassistant_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+
7
+ $installer->run("
8
+
9
+ -- DROP TABLE IF EXISTS {$this->getTable('mobileassistant')};
10
+ CREATE TABLE {$this->getTable('mobileassistant')} (
11
+ `user_id` int(11) unsigned NOT NULL auto_increment,
12
+ `username` varchar(255) NOT NULL default '',
13
+ `apikey` varchar(40) NOT NULL default '',
14
+ `device_token` varchar(255) NOT NULL default '',
15
+ `notification_flag` smallint(11) NOT NULL default '1',
16
+ PRIMARY KEY (`user_id`)
17
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
18
+
19
+ ");
20
+
21
+ $installer->endSetup();
app/etc/modules/Biztech_Mobileassistant.xml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @category Biztech
5
+ * @package Biztech_Mobileassistant
6
+ * @author ModuleCreator
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ -->
10
+ <config>
11
+ <modules>
12
+ <Biztech_Mobileassistant>
13
+ <active>true</active>
14
+ <codePool>local</codePool>
15
+ </Biztech_Mobileassistant>
16
+ </modules>
17
+ </config>
lib/mobileassistant/magentoKeys.pem ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIFpTCCBI2gAwIBAgIIcot/DjZne/kwDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV
3
+ BAYTAlVTMRMwEQYDVQQKDApBcHBsZSBJbmMuMSwwKgYDVQQLDCNBcHBsZSBXb3Js
4
+ ZHdpZGUgRGV2ZWxvcGVyIFJlbGF0aW9uczFEMEIGA1UEAww7QXBwbGUgV29ybGR3
5
+ aWRlIERldmVsb3BlciBSZWxhdGlvbnMgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkw
6
+ HhcNMTMwODEyMDcxMjUwWhcNMTQwODEyMDcxMjUwWjCBpDEwMC4GCgmSJomT8ixk
7
+ AQEMIGNvbS5iaXp0ZWNoLm1hZ2VudG9Nb2JpbGVNYW5hZ2VyMU4wTAYDVQQDDEVB
8
+ cHBsZSBEZXZlbG9wbWVudCBJT1MgUHVzaCBTZXJ2aWNlczogY29tLmJpenRlY2gu
9
+ bWFnZW50b01vYmlsZU1hbmFnZXIxEzARBgNVBAsMCjk0QjlFMlc5MlQxCzAJBgNV
10
+ BAYTAklOMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx8l/wZApVxc7
11
+ Dh31gqEwGKmbzMHkUy7IO1wbjVGnNOq6iF6+uz622Hz2dEYJPcAJgdAEwU0/a2mj
12
+ zW87PqaDBa6DGk1FjITpowFM4tfkJ02yaO+82Q3sIVN1JJSWI5hyNLvqTD6uZHhm
13
+ EsxgloYoUu7u3wL2uptIEIx8keBnje0gIqCYFJpgTZPPeqxLTpxHIKCI5OLeFAkR
14
+ AjmkzfVF5lizn9WG074Q2/5rMTz4POq3mlawS5geiyav3mYrf2zKDZ3CzrBj8k2e
15
+ yvRLIKa/SN6wqczsRPXf5TeRohb39nd3YcPbHabFSOSgfMo9TeJAqgbT4ulRz2CC
16
+ W8ogBggybQIDAQABo4IB5TCCAeEwHQYDVR0OBBYEFIQWj4PQtL11shy8zCEssvru
17
+ z12yMAkGA1UdEwQCMAAwHwYDVR0jBBgwFoAUiCcXCam2GGCL7Ou69kdZxVJUo7cw
18
+ ggEPBgNVHSAEggEGMIIBAjCB/wYJKoZIhvdjZAUBMIHxMIHDBggrBgEFBQcCAjCB
19
+ tgyBs1JlbGlhbmNlIG9uIHRoaXMgY2VydGlmaWNhdGUgYnkgYW55IHBhcnR5IGFz
20
+ c3VtZXMgYWNjZXB0YW5jZSBvZiB0aGUgdGhlbiBhcHBsaWNhYmxlIHN0YW5kYXJk
21
+ IHRlcm1zIGFuZCBjb25kaXRpb25zIG9mIHVzZSwgY2VydGlmaWNhdGUgcG9saWN5
22
+ IGFuZCBjZXJ0aWZpY2F0aW9uIHByYWN0aWNlIHN0YXRlbWVudHMuMCkGCCsGAQUF
23
+ BwIBFh1odHRwOi8vd3d3LmFwcGxlLmNvbS9hcHBsZWNhLzBNBgNVHR8ERjBEMEKg
24
+ QKA+hjxodHRwOi8vZGV2ZWxvcGVyLmFwcGxlLmNvbS9jZXJ0aWZpY2F0aW9uYXV0
25
+ aG9yaXR5L3d3ZHJjYS5jcmwwCwYDVR0PBAQDAgeAMBMGA1UdJQQMMAoGCCsGAQUF
26
+ BwMCMBAGCiqGSIb3Y2QGAwEEAgUAMA0GCSqGSIb3DQEBBQUAA4IBAQCntq33mBrS
27
+ 1SrbTATFllMlDUHCdazf4ZaDV66RUqVBFZ4pUbdVx5LsPIvT+JuSXo8D0KOkoa9x
28
+ zPjVpRHiIEo6MK7dx/eIy+OQRXjuaVnKBZJ0JZj03baj61N4Y6N3XHqBaeusJ9uy
29
+ t6l2spi6pdC94vu+xfqqAX6qPQDpM6nSIE3ZG5Khcq662zdtDIxLKWebmbsdppzl
30
+ 8+MWuuuOyyxHaTEa0/BNeMltHR5EpkRj4mCSSJL9Hm2UIDnUtYITjp7JS9dTtzP7
31
+ lL7jRHKju0EtLYhf7JZhjSl4E//9IV/P93cLznysWU/Q6zx4e3lm2E9qVAGAoZlZ
32
+ GwAS9W4O2J4N
33
+ -----END CERTIFICATE-----
34
+ Bag Attributes
35
+ friendlyName: biztech
36
+ localKeyID: 84 16 8F 83 D0 B4 BD 75 B2 1C BC CC 21 2C B2 FA EE CF 5D B2
37
+ Key Attributes: <No Attributes>
38
+ -----BEGIN RSA PRIVATE KEY-----
39
+ Proc-Type: 4,ENCRYPTED
40
+ DEK-Info: DES-EDE3-CBC,C91423218E91C392
41
+
42
+ fZ/07RMT7DSNA1TFXxMm8R+ZPRgO/HfKiKRlowIOS81hQrDCWIDZhhcQqxrrb5UT
43
+ MwdArGqEB7WKI4Pn2PfLOKsFtC0ZtSGSDHfJdsQrG2XRd0/DiTMkajLPZK4WVM5G
44
+ vIxqwTP8mdR0cvqxXAmhlAiqLoNajHnkfTHSMfwrhLsxhNWejxx0Z33qnSeKjSOb
45
+ zybBf4/733LVjdzeBVp+DsruzK2tuxspHxLla0mhaI43zyP/f/syLiiUt8EMGBBh
46
+ 7QKziNiTfYbrO6LXTQ9pwMDEUwcHIuxWhroZr7oMVEtVSRNaNW8mQCu6LVBFHWhD
47
+ 33E6og8i1DQ7H/eo+N1wXIONpFwQ5T/4X0Mj24GIbsfPml4N0tABLd5Z9PrJ3sqT
48
+ aS7j0+G6zIXdH5jFHhllXXPSqW0UmDJYNonQnDARSKvYo2lOSSQJeBJQ2lFfHWhB
49
+ z8sTNEvVhXm0W0Vu0mf3SFp7V9iIVNHfNh7Fhj532LvKClbOc+P7ahuMzns7SvzD
50
+ kGeN+BEIVyJ3IrlYkeqCvASyV2ErXkXyt7fVa8FOJfA31qldnFwoQD1GF6z8txai
51
+ ArxeQ9IgcfCA/PX8qTud/XSviWVjOhmJzjForbE1XxqrSpE0AtvkWyK27UBPkYuN
52
+ NbtP9x3t6w8bjXksjDBcOBXmWNeYL4ECmzy+IpKgjYBDURs2Jc/n0mp7G9UJX+gX
53
+ NurQLNhrdPSHuZzg1VJvwFU2ho3UXH4JBg8rLtd94sOwHmqUscnL6pd23psKNAIt
54
+ ydCNzjtkaPDaW7AQp0y7qqjmG7cgS/aDWgPvF/nvOPWpnpHIP08T4U6leLb1mGGC
55
+ 9DvBGcIyLXGmKKb/KKPX97Rfd6y5/V8Mk6eBPHu7h6qZx+sKt0kiQkPTsQ9B3fRd
56
+ EweczAY+ajlfSmQFwVrEDm9XFVxucXstNIrb5P4HuY8MLotqL+Fe8kgD3WKmvPKG
57
+ abAWSvyEOTeRoYZIfvsTQoXVMmWpIBgzs0vbv1sViPdQPAQ+YrAnVKKB483NpW/Z
58
+ xa3X0fvZs039oLAXjly009M8q8MXmHoaniaCx0/GK4gCN5Yl83fuseSyuLQLmdcg
59
+ MVv7kvAYmk8dXjshn5dcgeoySG0Dv2dq8fbr0obtGn8tH1xJNtiZ+iB73/Tcf/di
60
+ 8R0ag5kw/G7Exch0aCO9rclOUHjNAVS3l30JKJAKn5fBnctERb5Emgg00vRF/NDn
61
+ cOYjBG3tyeU+8eHRqA452hOZOHJH5Za0RABIc/V0ZVAlzO6GNmQdgk1UBuiONSJP
62
+ GAduzLJNUWZPkO3LhtiVXSodp1zUNhz6IxnztNV7kKr2cINc11XiLgTk+22VsEsh
63
+ mv6ynNqTIENugV02LzoCermUhBPpw8QgFqxxqHda74UNZKAolqbq3eKCAdkd3n+f
64
+ jS1i3SKWkfWZHxe46fTOsGm8xvmOTOTe62CqvvpFUPIheOeBqwNv8x8xlX6BSkG+
65
+ EKeWBn0wQG9KGocNEhG79vMIPq5CNDbXu0MT4MCks7AkC8faEJL6nLk0Gfop0L0X
66
+ stTs4CB2W2c6ECyarkLcrwYppz4ysnFT19YsKYlzc3VkcQ1Le0hdWryu1TPakLvu
67
+ -----END RSA PRIVATE KEY-----
68
+ Bag Attributes
69
+ friendlyName: biztech
70
+ localKeyID: 84 16 8F 83 D0 B4 BD 75 B2 1C BC CC 21 2C B2 FA EE CF 5D B2
71
+ Key Attributes: <No Attributes>
72
+ -----BEGIN RSA PRIVATE KEY-----
73
+ Proc-Type: 4,ENCRYPTED
74
+ DEK-Info: DES-EDE3-CBC,984768C95AC1FFFB
75
+
76
+ KpW/AdnnedsqGGwaB4A2YMiHxgdcXe5pQk5UoELPi1KNsoOINrE/ER/lSOoa5kAq
77
+ bhfDVY/yrpuOA0/oiT/AaW7NAMveb8CXZH680dOVRIBboHcG0cfnJZausFVYsrlg
78
+ tHXEodflcy1dOZGU2Rphhn0PVw6RMxgFuvTSKGtjtK9MEczqSkbRS5PErGeeY8MO
79
+ B9HFC0ivDhetYsMMZ0fTJcg2CUqWMELIxz4uOQ+zQe1b23GBLflLI+yUkZcHiLYw
80
+ ubY/CoOqa3XZ/ZoUVXSEFtq95n3uKezDRvRqhPiTXYpM9MficaAg9hyHHgpXwznU
81
+ OOZHMldgjzFmBK3uXGUI+SD5NeGocNpJW2PoHrkW4SmiTOZXNCoX/qqckzzRGFg0
82
+ huxTntAD9UHLkstcO8HDZHWMoCF1hHYNTiR72nNntVtjlBgmZOmyVYSFzI+Za5+o
83
+ rlrrxriXzugF3aCuEL5cENQuuLNR4/ZJ1sScbv+GVxIxGKGpPjb0pBz+tFUYMmds
84
+ v6d7dB5EzNfr6CYUAyqi7RHrcUVYNRmOPwwmCNYX1VYZ7UFP+Aempvb5yedd0+ZZ
85
+ hGhnQ0D39Hyp3SIP+Zaeo3vX0D5mrrRta22f7YQem7FhWvgcI1BHtKUjkWCYtj/9
86
+ 8afhuLREzKY1SODN/hjq66EXinCb7jHJYXZXhmN6yVlzjGwI1UPsGLAIlO0n2WKj
87
+ LS0nBmRkdi32Sbjj3ojp/041q6HujVRgCtdTuJteRHHf4TDGr+M/8/HJK1QvVevl
88
+ k+9SnrUAUqevmBGVyCP7PfPdJVNDgW24O0taw0Iw93PfSfNiaNY+7mZ246Fkz6NC
89
+ E9ewKnoDg9xob6Mc9EwkE50szdh+awEusypyN6TIdyrWqwI4mLvXpDIfokuwaJbk
90
+ X9kcGI2eBY9ses8xAoIowsSZPpZFqjBDy5ihTjYZFh9qjTWduTmUQFpTmjJgzXOa
91
+ FPWgDhK9mlTs62QWZLVBOlcNx1nI8ULDx9xI92wy5J9w0p2oIAuVGgb4TwY015rL
92
+ TauYIvyPaniwCx3krvbM24i/MnTImQ/DsW8NBiSgb0qkFl6I4/xFz30+BzEeyn4/
93
+ QpPaDMZTcQ4kBKpphzz8sx6VZh3cH+dT7STei+VX/G5RhUmxGmP0d6jm6UZzq6Sr
94
+ cnQ71jaCFbgBTXt6u+ysyHcEsKu/f4bAZzK/xleGborji9mMNWFQTQIHrGYDAkzL
95
+ KPAlXh9JQ7DTROm3lM3Kq7htMhU7q9JkSOPxg9SxLr5CXYNJdwKFM6QO/ArTuDwo
96
+ iW0sPLs0cEc3kcF6BkQsMl1+AF5rV50lfrs9u5Jz47gB1zeVThKYk8YweJM00j29
97
+ CRyPXlNrfgHbsscHFWsuNTJoAt/5fAZ+t4nGIcyg6Ku+WaUx8dC6zzSi0PdhFkCA
98
+ 4Rr6/xuJyQ43ukqqeg4T9tqgg9GmhG8sePGYLaGEm1E8qoHfCnxmYXTt3x6nS7m4
99
+ g3uCgHdkH5sSdjHsKVnQgrmXWmZ48AR+tRefmJzv4fjw8xNrGUbHkp34HBMh/4mw
100
+ 3V2QRYVOOkrFrrUlcLAQ475l0UKnxD56TZHPumQWo8AYr/+wPmFqFNJIwe7Wu0oM
101
+ -----END RSA PRIVATE KEY-----
package.xml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>magento_mobile_assistant_manager</name>
4
+ <version>0.1.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Magento Mobile Assistant Extension allows online merchants to view all the details of their online store on their iOS devices (iPhone, iPad or iPod). </summary>
10
+ <description>Magento Mobile Assistant Extension allows online merchants to view all the details of their online store on their iOS devices (iPhone, iPad or iPod). The extension helps store owners to view stores order details, product details, customers details anywhere and anytime with help of their iOS devices. This extension eliminates the need to login from PC to get detailed information of the happenings in online stores.&#xD;
11
+ Mobile Assistant Extension integrates with your online store and delivers the key details to your iOS device. You can easily navigate through the orders, products, customers and sales report from your handheld device and monitor the performance of your store wherever you go. &#xD;
12
+ Features of Magento Assistant Extension:&#xD;
13
+ &#x2022; Easy to use and quick to install&#xD;
14
+ &#x2022; Supported by Multiple store websites&#xD;
15
+ &#x2022; Filters order, product, and sales with respect to a particular store&#xD;
16
+ &#x2022; Displays order details with status &#x2013; Successfully delivered, pending, back order etc.&#xD;
17
+ &#x2022; Displays product list and products details&#xD;
18
+ &#x2022; Displays customer list, details, address and shipping address&#xD;
19
+ &#x2022; Sends notification to the store merchant as soon as a new order is placed with its details&#xD;
20
+ &#x2022; Customized dashboard that displays store wise sales graphs that can be filtered day&#x2019;s wise &#x2013; 7 days, 30 days or 90 days&#xD;
21
+ Note: Apple notification working on PHP 5.3.0 or later.&#xD;
22
+ &#xD;
23
+ To ensure smooth working of this extension you need to download this extension in your website and also download Magento Mobile Manager Version 2.0 on your iOS device.&#xD;
24
+ &#xD;
25
+ Application Download Link:&#xD;
26
+ https://itunes.apple.com/us/app/magentomobilemanager/id695074519?mt=8&amp;ign-mpt=uo%3D4&#xD;
27
+ </description>
28
+ <notes>-New Realse</notes>
29
+ <authors><author><name>Biztech</name><user>biztechcon</user><email>sales@biztechconsultancy.com</email></author></authors>
30
+ <date>2013-10-12</date>
31
+ <time>07:06:53</time>
32
+ <contents><target name="mageetc"><dir name="modules"><file name="Biztech_Mobileassistant.xml" hash="14d6d04686f97fab6371920fdf3baf7e"/></dir></target><target name="magelocal"><dir name="Biztech"><dir name="Mobileassistant"><dir name="Helper"><file name="Data.php" hash="0d39e75ee4898ac28bb62a35f71066a2"/></dir><dir name="Model"><dir name="Mobileassistant"><file name="Api.php" hash="ef403d19cf7ca3245192539de4b21632"/></dir><file name="Mobileassistant.php" hash="3f221d0fa184e94ec3004bb0256abbf3"/><dir name="Mysql4"><dir name="Mobileassistant"><file name="Collection.php" hash="373ce57310145f3d007952e8c7beffbf"/></dir><file name="Mobileassistant.php" hash="3ef12554d281a2fa7ef47943763be76d"/></dir><file name="Observer.php" hash="253379643a1069e8e9c8dfc35742a125"/></dir><dir name="controllers"><file name="CustomerController.php" hash="e64dea09069dc4a69c2981c5aad4c64c"/><file name="DashboardController.php" hash="d5c9f6c0686ae25966af73e51fcb4c04"/><file name="IndexController.php" hash="3cd73cb5c50dde854b2f6c18986df455"/><file name="OrderController.php" hash="60ee4ece453aa5cd57a15bd000c7478b"/><file name="ProductController.php" hash="8bc40724a410d1e2911ccde5b61f8e8f"/></dir><dir name="etc"><file name="api.xml" hash="f7d93508ce53982484f0d1f9ab3a17cd"/><file name="config.xml" hash="699bdaa626c8438e536d65fbf952f0cf"/><file name="system.xml" hash="5aeda6044c3ae5e44c51db392f5e0ddc"/></dir><dir name="sql"><dir name="mobileassistant_setup"><file name="mysql4-install-0.1.0.php" hash="c25eff9c480cc82b6edfaef1e87e27a7"/></dir></dir></dir></dir></target><target name="mage"><dir name="lib"><dir name="mobileassistant"><file name="magentoKeys.pem" hash="ccd8fbed4603b261afd52c68b29a18d9"/></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>