Version Notes
This module pull a list of orders that match with the search criteria. The return type is an Array of salesOrderEntity.
Download this release
Release Info
Developer | Ezequiel Reyno |
Extension | GSS_Orders_Integrator |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/local/GSS/OrdersIntegration/Helper/Data.php +30 -0
- app/code/local/GSS/OrdersIntegration/Model/Order/Api.php +112 -0
- app/code/local/GSS/OrdersIntegration/Model/Order/Api/V2.php +30 -0
- app/code/local/GSS/OrdersIntegration/composer.json +22 -0
- app/code/local/GSS/OrdersIntegration/controllers/IndexController.php +8 -0
- app/code/local/GSS/OrdersIntegration/etc/api.xml +46 -0
- app/code/local/GSS/OrdersIntegration/etc/config.xml +20 -0
- app/code/local/GSS/OrdersIntegration/etc/module.xml +9 -0
- app/code/local/GSS/OrdersIntegration/etc/wsdl.xml +60 -0
- app/code/local/GSS/OrdersIntegration/etc/wsi.xml +54 -0
- app/code/local/GSS/OrdersIntegration/registration.php +32 -0
- package.xml +18 -0
app/code/local/GSS/OrdersIntegration/Helper/Data.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* GSS
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This file is part of Order Integration.
|
8 |
+
*
|
9 |
+
* Foobar is free software: you can redistribute it and/or modify
|
10 |
+
* it under the terms of the GNU General Public License as published by
|
11 |
+
* the Free Software Foundation, either version 3 of the License, or
|
12 |
+
* (at your option) any later version.
|
13 |
+
*
|
14 |
+
* Order Integration is distributed in the hope that it will be useful,
|
15 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17 |
+
* GNU General Public License for more details.
|
18 |
+
*
|
19 |
+
* You should have received a copy of the GNU General Public License
|
20 |
+
* along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* @category GSS
|
24 |
+
* @package GSS_OrdersIntegration
|
25 |
+
* @copyright Copyright (c) 2016 SweetSpot Group Ltd (http://www.gosweetspot.com)
|
26 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
27 |
+
*/
|
28 |
+
class GSS_OrdersIntegration_Helper_Data extends Mage_Core_Helper_Abstract
|
29 |
+
{
|
30 |
+
}
|
app/code/local/GSS/OrdersIntegration/Model/Order/Api.php
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* GSS
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This file is part of Order Integration.
|
8 |
+
*
|
9 |
+
* Foobar is free software: you can redistribute it and/or modify
|
10 |
+
* it under the terms of the GNU General Public License as published by
|
11 |
+
* the Free Software Foundation, either version 3 of the License, or
|
12 |
+
* (at your option) any later version.
|
13 |
+
*
|
14 |
+
* Order Integration is distributed in the hope that it will be useful,
|
15 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17 |
+
* GNU General Public License for more details.
|
18 |
+
*
|
19 |
+
* You should have received a copy of the GNU General Public License
|
20 |
+
* along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* @category GSS
|
24 |
+
* @package GSS_OrdersIntegration
|
25 |
+
* @copyright Copyright (c) 2016 SweetSpot Group Ltd (http://www.gosweetspot.com)
|
26 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
27 |
+
*/
|
28 |
+
class GSS_OrdersIntegration_Model_Order_Api extends Mage_Sales_Model_Api_Resource
|
29 |
+
{
|
30 |
+
/**
|
31 |
+
* Initialize attributes map
|
32 |
+
*/
|
33 |
+
public function __construct()
|
34 |
+
{
|
35 |
+
$this->_attributesMap = array(
|
36 |
+
'order' => array('order_id' => 'entity_id'),
|
37 |
+
'order_address' => array('address_id' => 'entity_id'),
|
38 |
+
'order_payment' => array('payment_id' => 'entity_id')
|
39 |
+
);
|
40 |
+
}
|
41 |
+
|
42 |
+
public function getOrders($statuses, $fromDate, $toDate, $pageLimit, $page)
|
43 |
+
{
|
44 |
+
/* Format our dates */
|
45 |
+
$magefromDate = date('Y-m-d H:i:s', strtotime($fromDate));
|
46 |
+
$magetoDate = date('Y-m-d H:i:s', strtotime($toDate));
|
47 |
+
|
48 |
+
$arr_status = array();
|
49 |
+
if($statuses == ""){
|
50 |
+
$orderStatusCollection = Mage::getModel('sales/order_status')->getResourceCollection()->getData();
|
51 |
+
foreach($orderStatusCollection as $orderStatus) {
|
52 |
+
$arr_status[] = array ('status' => $orderStatus['status']);
|
53 |
+
}
|
54 |
+
}
|
55 |
+
else {
|
56 |
+
$arr_status = explode(",", $statuses);
|
57 |
+
}
|
58 |
+
//Get country list
|
59 |
+
$countryList = Mage::getModel('directory/country')->getResourceCollection();
|
60 |
+
|
61 |
+
$arr_orders=array();
|
62 |
+
$orders=Mage::getModel('sales/order')
|
63 |
+
->getCollection()
|
64 |
+
->addAttributeToFilter('status', array('in' => $arr_status))
|
65 |
+
->addAttributeToFilter('created_at', array('from'=>$magefromDate, 'to'=>$magetoDate))
|
66 |
+
->addAttributeToSort('entity_id', 'DESC')
|
67 |
+
->setPageSize($pageLimit)
|
68 |
+
->setCurPage($page);
|
69 |
+
|
70 |
+
foreach ($orders as $order) {
|
71 |
+
if ($order->getGiftMessageId() > 0) {
|
72 |
+
$order->setGiftMessage(
|
73 |
+
Mage::getSingleton('giftmessage/message')->load($order->getGiftMessageId())->getMessage()
|
74 |
+
);
|
75 |
+
}
|
76 |
+
|
77 |
+
$result = $this->_getAttributes($order, 'order');
|
78 |
+
$shipping_address = $this->_getAttributes($order->getShippingAddress(), 'order_address');
|
79 |
+
foreach($countryList as $country) {
|
80 |
+
if ($shipping_address['country_id'] == $country->getCountryId()) {
|
81 |
+
$shipping_address['country_id'] = $country->getData('country_code');
|
82 |
+
break;
|
83 |
+
}
|
84 |
+
}
|
85 |
+
$result['shipping_address'] = $shipping_address;
|
86 |
+
$result['billing_address'] = $this->_getAttributes($order->getBillingAddress(), 'order_address');
|
87 |
+
$result['items'] = array();
|
88 |
+
|
89 |
+
foreach ($order->getAllItems() as $item) {
|
90 |
+
if ($item->getGiftMessageId() > 0) {
|
91 |
+
$item->setGiftMessage(
|
92 |
+
Mage::getSingleton('giftmessage/message')->load($item->getGiftMessageId())->getMessage()
|
93 |
+
);
|
94 |
+
}
|
95 |
+
|
96 |
+
$result['items'][] = $this->_getAttributes($item, 'order_item');
|
97 |
+
}
|
98 |
+
|
99 |
+
$result['payment'] = $this->_getAttributes($order->getPayment(), 'order_payment');
|
100 |
+
|
101 |
+
$result['status_history'] = array();
|
102 |
+
|
103 |
+
foreach ($order->getAllStatusHistory() as $history) {
|
104 |
+
$result['status_history'][] = $this->_getAttributes($history, 'order_status_history');
|
105 |
+
}
|
106 |
+
|
107 |
+
$arr_orders[] = $result;
|
108 |
+
}
|
109 |
+
|
110 |
+
return $arr_orders;
|
111 |
+
}
|
112 |
+
}
|
app/code/local/GSS/OrdersIntegration/Model/Order/Api/V2.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* GSS
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This file is part of Order Integration.
|
8 |
+
*
|
9 |
+
* Foobar is free software: you can redistribute it and/or modify
|
10 |
+
* it under the terms of the GNU General Public License as published by
|
11 |
+
* the Free Software Foundation, either version 3 of the License, or
|
12 |
+
* (at your option) any later version.
|
13 |
+
*
|
14 |
+
* Order Integration is distributed in the hope that it will be useful,
|
15 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17 |
+
* GNU General Public License for more details.
|
18 |
+
*
|
19 |
+
* You should have received a copy of the GNU General Public License
|
20 |
+
* along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* @category GSS
|
24 |
+
* @package GSS_OrdersIntegration
|
25 |
+
* @copyright Copyright (c) 2016 SweetSpot Group Ltd (http://www.gosweetspot.com)
|
26 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
27 |
+
*/
|
28 |
+
class GSS_OrdersIntegration_Model_Order_Api_V2 extends GSS_OrdersIntegration_Model_Order_Api
|
29 |
+
{
|
30 |
+
}
|
app/code/local/GSS/OrdersIntegration/composer.json
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "GSS/OrdersIntegration",
|
3 |
+
"description": "Integrate orders into GSS system.",
|
4 |
+
"type": "magento2-module",
|
5 |
+
"version": "1.0.0",
|
6 |
+
"license": [
|
7 |
+
"OSL-3.0",
|
8 |
+
"AFL-3.0"
|
9 |
+
],
|
10 |
+
"require": {
|
11 |
+
"php": "~5.5.0|~5.6.0",
|
12 |
+
"magento/magento-composer-installer": "*"
|
13 |
+
},
|
14 |
+
"extra": {
|
15 |
+
"map": [
|
16 |
+
[
|
17 |
+
"*",
|
18 |
+
"GSS/OrdersIntegration"
|
19 |
+
]
|
20 |
+
]
|
21 |
+
}
|
22 |
+
}
|
app/code/local/GSS/OrdersIntegration/controllers/IndexController.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class GSS_OrdersIntegration_IndexController extends Mage_Core_Controller_Front_Action
|
3 |
+
{
|
4 |
+
public function indexAction()
|
5 |
+
{
|
6 |
+
echo "Hello tuts+ World";
|
7 |
+
}
|
8 |
+
}
|
app/code/local/GSS/OrdersIntegration/etc/api.xml
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<config>
|
3 |
+
<api>
|
4 |
+
<resources>
|
5 |
+
<order translate="title" module="ordersIntegration">
|
6 |
+
<title>List of Orders</title>
|
7 |
+
<model>ordersIntegration/order_api</model>
|
8 |
+
<acl>order</acl>
|
9 |
+
<methods>
|
10 |
+
<getOrders translate="title" module="ordersIntegration">
|
11 |
+
<title>Retrieve List of Orders</title>
|
12 |
+
<method>getOrders</method>
|
13 |
+
<acl>order/getOrders</acl>
|
14 |
+
</getOrders>
|
15 |
+
</methods>
|
16 |
+
</order>
|
17 |
+
</resources>
|
18 |
+
<resources_alias>
|
19 |
+
<ordersIntegration_order>order</ordersIntegration_order>
|
20 |
+
</resources_alias>
|
21 |
+
<rest>
|
22 |
+
<mapping>
|
23 |
+
<ordersIntegration_order>
|
24 |
+
<post>
|
25 |
+
<method>getOrders</method>
|
26 |
+
</post>
|
27 |
+
</ordersIntegration_order>
|
28 |
+
</mapping>
|
29 |
+
</rest>
|
30 |
+
<acl><!-- Access Control List to our resources, this tree structure is displayed in "Resource Roles" panel when you open role to edit -->
|
31 |
+
<resources>
|
32 |
+
<order translate="title" module="ordersIntegration">
|
33 |
+
<title>GSS API</title>
|
34 |
+
<getOrders translate="title" module="ordersIntegration">
|
35 |
+
<title>Retrieve List of Orders</title>
|
36 |
+
</getOrders>
|
37 |
+
</order>
|
38 |
+
</resources>
|
39 |
+
</acl>
|
40 |
+
<v2>
|
41 |
+
<resources_function_prefix>
|
42 |
+
<ordersIntegration_order>ordersIntegrationOrder</ordersIntegration_order>
|
43 |
+
</resources_function_prefix>
|
44 |
+
</v2>
|
45 |
+
</api>
|
46 |
+
</config>
|
app/code/local/GSS/OrdersIntegration/etc/config.xml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<GSS_OrdersIntegration>
|
5 |
+
<version>1.0.0</version>
|
6 |
+
</GSS_OrdersIntegration>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<models>
|
10 |
+
<ordersIntegration>
|
11 |
+
<class>GSS_OrdersIntegration_Model</class>
|
12 |
+
</ordersIntegration>
|
13 |
+
</models>
|
14 |
+
<helpers>
|
15 |
+
<ordersIntegration>
|
16 |
+
<class>GSS_OrdersIntegration_Helper</class>
|
17 |
+
</ordersIntegration>
|
18 |
+
</helpers>
|
19 |
+
</global>
|
20 |
+
</config>
|
app/code/local/GSS/OrdersIntegration/etc/module.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
3 |
+
xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
|
4 |
+
<module name="GSS_OrdersIntegration" setup_version="1.0.0">
|
5 |
+
<sequence>
|
6 |
+
<module name="Magento_Store"/>
|
7 |
+
</sequence>
|
8 |
+
</module>
|
9 |
+
</config>
|
app/code/local/GSS/OrdersIntegration/etc/wsdl.xml
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<definitions xmlns:typens="urn:{{var wsdl.name}}" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
3 |
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
4 |
+
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
5 |
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
6 |
+
name="{{var wsdl.name}}" targetNamespace="urn:{{var wsdl.name}}">
|
7 |
+
<types>
|
8 |
+
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Magento">
|
9 |
+
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="http://schemas.xmlsoap.org/soap/encoding/" />
|
10 |
+
<complexType name="fieldInfo">
|
11 |
+
<sequence>
|
12 |
+
<element name="entity_id" type="xsd:string"/>
|
13 |
+
<element name="name" type="xsd:string"/>
|
14 |
+
</sequence>
|
15 |
+
</complexType>
|
16 |
+
<complexType name="ordersArray">
|
17 |
+
<complexContent>
|
18 |
+
<restriction base="soapenc:Array">
|
19 |
+
<attribute ref="soapenc:arrayType" wsdl:arrayType="typens:salesOrderEntity[]" />
|
20 |
+
</restriction>
|
21 |
+
</complexContent>
|
22 |
+
</complexType>
|
23 |
+
</schema>
|
24 |
+
</types>
|
25 |
+
<message name="ordersIntegrationOrdergetOrdersRequest">
|
26 |
+
<part name="sessionId" type="xsd:string" />
|
27 |
+
<part name="statuses" type="xsd:string" />
|
28 |
+
<part name="fromDate" type="xsd:string" />
|
29 |
+
<part name="toDate" type="xsd:string" />
|
30 |
+
<part name="pageLimit" type="xsd:int" />
|
31 |
+
<part name="page" type="xsd:int" />
|
32 |
+
</message>
|
33 |
+
<message name="ordersIntegrationOrdergetOrdersResponse">
|
34 |
+
<part name="orders" type="typens:ordersArray" />
|
35 |
+
</message>
|
36 |
+
<portType name="{{var wsdl.handler}}PortType">
|
37 |
+
<operation name="ordersIntegrationOrdergetOrders">
|
38 |
+
<documentation>List of orders</documentation>
|
39 |
+
<input message="typens:ordersIntegrationOrdergetOrdersRequest" />
|
40 |
+
<output message="typens:ordersIntegrationOrdergetOrdersResponse" />
|
41 |
+
</operation>
|
42 |
+
</portType>
|
43 |
+
<binding name="{{var wsdl.handler}}Binding" type="typens:{{var wsdl.handler}}PortType">
|
44 |
+
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
|
45 |
+
<operation name="ordersIntegrationOrdergetOrders">
|
46 |
+
<soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
|
47 |
+
<input>
|
48 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
49 |
+
</input>
|
50 |
+
<output>
|
51 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
52 |
+
</output>
|
53 |
+
</operation>
|
54 |
+
</binding>
|
55 |
+
<service name="{{var wsdl.name}}Service">
|
56 |
+
<port name="{{var wsdl.handler}}Port" binding="typens:{{var wsdl.handler}}Binding">
|
57 |
+
<soap:address location="{{var wsdl.url}}" />
|
58 |
+
</port>
|
59 |
+
</service>
|
60 |
+
</definitions>
|
app/code/local/GSS/OrdersIntegration/etc/wsi.xml
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<wsdl:definitions xmlns:typens="urn:{{var wsdl.name}}"
|
3 |
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
4 |
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
5 |
+
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
|
6 |
+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
7 |
+
name="{{var wsdl.name}}"
|
8 |
+
targetNamespace="urn:{{var wsdl.name}}">
|
9 |
+
<wsdl:types>
|
10 |
+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:{{var wsdl.name}}">
|
11 |
+
<xsd:complexType name="fieldInfo">
|
12 |
+
<xsd:sequence>
|
13 |
+
<xsd:element name="entity_id" type="xsd:string"/>
|
14 |
+
<xsd:element name="name" type="xsd:string"/>
|
15 |
+
</xsd:sequence>
|
16 |
+
</xsd:complexType>
|
17 |
+
<xsd:complexType name="ordersArray">
|
18 |
+
<xsd:sequence>
|
19 |
+
<xsd:element minOccurs="0" maxOccurs="unbounded" name="complexObjectArray" type="typens:salesOrderEntity" />
|
20 |
+
</xsd:sequence>
|
21 |
+
</xsd:complexType>
|
22 |
+
</xsd:schema>
|
23 |
+
</wsdl:types>
|
24 |
+
<wsdl:message name="ordersIntegrationOrdergetOrdersRequest">
|
25 |
+
<wsdl:part name="sessionId" type="xsd:string" />
|
26 |
+
<wsdl:part name="statuses" type="xsd:string" />
|
27 |
+
<wsdl:part name="fromDate" type="xsd:string" />
|
28 |
+
<wsdl:part name="toDate" type="xsd:string" />
|
29 |
+
<wsdl:part name="pageLimit" type="xsd:int" />
|
30 |
+
<wsdl:part name="page" type="xsd:int" />
|
31 |
+
</wsdl:message>
|
32 |
+
<wsdl:message name="ordersIntegrationOrdergetOrdersResponse">
|
33 |
+
<wsdl:part name="orders" type="typens:ordersArray" />
|
34 |
+
</wsdl:message>
|
35 |
+
<wsdl:portType name="{{var wsdl.handler}}PortType">
|
36 |
+
<wsdl:operation name="ordersIntegrationOrdergetOrders">
|
37 |
+
<wsdl:documentation>List of orders</documentation>
|
38 |
+
<wsdl:input message="typens:ordersIntegrationOrdergetOrdersRequest" />
|
39 |
+
<wsdl:output message="typens:ordersIntegrationOrdergetOrdersResponse" />
|
40 |
+
</wsdl:operation>
|
41 |
+
</wsdl:portType>
|
42 |
+
<wsdl:binding name="{{var wsdl.handler}}Binding" type="typens:{{var wsdl.handler}}PortType">
|
43 |
+
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
|
44 |
+
<wsdl:operation name="ordersIntegrationOrdergetOrders">
|
45 |
+
<soap:operation soapAction="" />
|
46 |
+
<wsdl:input>
|
47 |
+
<soap:body use="literal"/>
|
48 |
+
</wsdl:input>
|
49 |
+
<wsdl:output>
|
50 |
+
<soap:body use="literal"/>
|
51 |
+
</wsdl:output>
|
52 |
+
</wsdl:operation>
|
53 |
+
</wsdl:binding>
|
54 |
+
</wsdl:definitions>
|
app/code/local/GSS/OrdersIntegration/registration.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* GSS
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This file is part of Order Integration.
|
8 |
+
*
|
9 |
+
* Foobar is free software: you can redistribute it and/or modify
|
10 |
+
* it under the terms of the GNU General Public License as published by
|
11 |
+
* the Free Software Foundation, either version 3 of the License, or
|
12 |
+
* (at your option) any later version.
|
13 |
+
*
|
14 |
+
* Order Integration is distributed in the hope that it will be useful,
|
15 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17 |
+
* GNU General Public License for more details.
|
18 |
+
*
|
19 |
+
* You should have received a copy of the GNU General Public License
|
20 |
+
* along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
21 |
+
*
|
22 |
+
*
|
23 |
+
* @category GSS
|
24 |
+
* @package GSS_OrdersIntegration
|
25 |
+
* @copyright Copyright (c) 2016 SweetSpot Group Ltd (http://www.gosweetspot.com)
|
26 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
27 |
+
*/
|
28 |
+
\Magento\Framework\Component\ComponentRegistrar::register(
|
29 |
+
\Magento\Framework\Component\ComponentRegistrar::MODULE,
|
30 |
+
'GSS_OrdersIntegration',
|
31 |
+
__DIR__
|
32 |
+
);
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>GSS_Orders_Integrator</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="https://opensource.org/licenses/osl-3.0.php">GNU General Public License</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>The app will sync across orders of the selected status. The supported Magento version is 1.5.0.0 and later.</summary>
|
10 |
+
<description>At the defined intervals, the app will sync across orders of the selected status. Only orders matching the criteria will be sync'd. We put this information into our system to allow our customers get the shipping information. Once they process the order it will be marked as completed on our end. GoSweetSpot is a freight management solution. As courier and freight agents, we provide you with attractive rates for services from our carefully selected domestic & international supplier partners.</description>
|
11 |
+
<notes>This module pull a list of orders that match with the search criteria. The return type is an Array of salesOrderEntity.</notes>
|
12 |
+
<authors><author><name>Ezequiel Reyno</name><user>ereyno</user><email>ezequiel@gosweetspot.com</email></author></authors>
|
13 |
+
<date>2016-03-16</date>
|
14 |
+
<time>22:28:43</time>
|
15 |
+
<contents><target name="magelocal"><dir name="GSS"><dir name="OrdersIntegration"><dir name="Helper"><file name="Data.php" hash="e103cdbfbe61eff4cae21474edd96a6a"/><file name="Data.php" hash="e103cdbfbe61eff4cae21474edd96a6a"/><file name="Data.php" hash="e103cdbfbe61eff4cae21474edd96a6a"/><file name="Data.php" hash="e103cdbfbe61eff4cae21474edd96a6a"/></dir><dir name="Model"><dir name="Order"><dir name="Api"><file name="V2.php" hash="c10908fc20bece05e4bfa2ed97011e8d"/><file name="V2.php" hash="c10908fc20bece05e4bfa2ed97011e8d"/><file name="V2.php" hash="c10908fc20bece05e4bfa2ed97011e8d"/><file name="V2.php" hash="c10908fc20bece05e4bfa2ed97011e8d"/><file name="V2.php" hash="c10908fc20bece05e4bfa2ed97011e8d"/><file name="V2.php" hash="c10908fc20bece05e4bfa2ed97011e8d"/></dir><file name="Api.php" hash="532d25097bbb155a2bad2a28942cec00"/><file name="Api.php" hash="532d25097bbb155a2bad2a28942cec00"/><file name="Api.php" hash="532d25097bbb155a2bad2a28942cec00"/><file name="Api.php" hash="532d25097bbb155a2bad2a28942cec00"/><file name="Api.php" hash="532d25097bbb155a2bad2a28942cec00"/></dir></dir><file name="composer.json" hash="5a7ffed5eeaed7ab6621b0a4f95e5d85"/><dir name="controllers"><file name="IndexController.php" hash="035ac8d7e430907cb1f506f6f7ab9ff9"/><file name="IndexController.php" hash="035ac8d7e430907cb1f506f6f7ab9ff9"/><file name="IndexController.php" hash="035ac8d7e430907cb1f506f6f7ab9ff9"/></dir><dir name="etc"><file name="api.xml" hash="027db078fb583173258c4c235526673e"/><file name="config.xml" hash="c841b9c33a3bf7a8e5cab79766996c82"/><file name="module.xml" hash="b2296e5f3b4f67d236318c17e4fb7642"/><file name="wsdl.xml" hash="8a91c863a3d2c25a1e87a22e123e1e52"/><file name="wsi.xml" hash="84ba4f5d672cf5984ae7f6749b64aea0"/><file name="api.xml" hash="027db078fb583173258c4c235526673e"/><file name="config.xml" hash="c841b9c33a3bf7a8e5cab79766996c82"/><file name="wsdl.xml" hash="8a91c863a3d2c25a1e87a22e123e1e52"/><file name="wsi.xml" hash="84ba4f5d672cf5984ae7f6749b64aea0"/><file name="api.xml" hash="027db078fb583173258c4c235526673e"/><file name="config.xml" hash="c841b9c33a3bf7a8e5cab79766996c82"/><file name="module.xml" hash="b2296e5f3b4f67d236318c17e4fb7642"/><file name="wsdl.xml" hash="8a91c863a3d2c25a1e87a22e123e1e52"/><file name="wsi.xml" hash="84ba4f5d672cf5984ae7f6749b64aea0"/><file name="api.xml" hash="027db078fb583173258c4c235526673e"/><file name="config.xml" hash="c841b9c33a3bf7a8e5cab79766996c82"/><file name="module.xml" hash="b2296e5f3b4f67d236318c17e4fb7642"/><file name="wsdl.xml" hash="8a91c863a3d2c25a1e87a22e123e1e52"/><file name="wsi.xml" hash="84ba4f5d672cf5984ae7f6749b64aea0"/></dir><file name="registration.php" hash="6167209f2399ee6e2261cad5fefb8f38"/><file name="composer.json" hash="5a7ffed5eeaed7ab6621b0a4f95e5d85"/><file name="registration.php" hash="6167209f2399ee6e2261cad5fefb8f38"/></dir></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.1.0</min><max>7.0.0</max></php></required></dependencies>
|
18 |
+
</package>
|