StitchLabs_ChannelIntegration - Version 1.0.3

Version Notes

1.0.3
* Add pagination functionality to order endpoint

1.0.2
* Added missing stock_data to product info WSDL

1.0.1
* Add pagination functionality to product endpoints

1.0.0
* Initial working release

Download this release

Release Info

Developer Robert Navarro
Extension StitchLabs_ChannelIntegration
Version 1.0.3
Comparing to
See all releases


Code changes from version 1.0.2 to 1.0.3

app/code/community/StitchLabs/ChannelIntegration/Model/Order/Api.php CHANGED
@@ -58,9 +58,20 @@ class StitchLabs_ChannelIntegration_Model_Order_Api
58
  $apiHelper = Mage::helper('api');
59
  $filters = $apiHelper->parseFilters($filters, $this->_attributesMap['order']);
60
  try {
 
 
 
61
  foreach ($filters as $field => $value) {
62
- $orderCollection->addFieldToFilter($field, $value);
 
 
 
 
 
 
63
  }
 
 
64
  } catch (Mage_Core_Exception $e) {
65
  $this->_fault('filters_invalid', $e->getMessage());
66
  }
@@ -74,7 +85,7 @@ class StitchLabs_ChannelIntegration_Model_Order_Api
74
  $result = $this->_getAttributes($order, 'order');
75
 
76
  $result['shipping_address'] = $this->_getAttributes($order->getShippingAddress(), 'order_address');
77
- $result['billing_address'] = $this->_getAttributes($order->getBillingAddress(), 'order_address');
78
  $result['items'] = array();
79
 
80
  foreach ($order->getAllItems() as $item) {
58
  $apiHelper = Mage::helper('api');
59
  $filters = $apiHelper->parseFilters($filters, $this->_attributesMap['order']);
60
  try {
61
+ $page = 1;
62
+ $page_size = 50;
63
+
64
  foreach ($filters as $field => $value) {
65
+ if ($field == 'page') {
66
+ $page = $value;
67
+ } elseif ($field == 'size') {
68
+ $page_size = $value;
69
+ } else {
70
+ $orderCollection->addFieldToFilter($field, $value);
71
+ }
72
  }
73
+
74
+ $orderCollection->setPage($page, $page_size);
75
  } catch (Mage_Core_Exception $e) {
76
  $this->_fault('filters_invalid', $e->getMessage());
77
  }
85
  $result = $this->_getAttributes($order, 'order');
86
 
87
  $result['shipping_address'] = $this->_getAttributes($order->getShippingAddress(), 'order_address');
88
+ $result['billing_address'] = $this->_getAttributes($order->getBillingAddress(), 'order_address');
89
  $result['items'] = array();
90
 
91
  foreach ($order->getAllItems() as $item) {
package.xml CHANGED
@@ -1,25 +1,28 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>StitchLabs_ChannelIntegration</name>
4
- <version>1.0.2</version>
5
  <stability>stable</stability>
6
  <license>MIT</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>This extension provides integration with StitchLabs</summary>
10
  <description>This extension provides integration with StitchLabs</description>
11
- <notes>1.0.2&#xD;
 
 
 
12
  * Added missing stock_data to product info WSDL&#xD;
13
  &#xD;
14
  1.0.1&#xD;
15
- * Add pagination functionality&#xD;
16
  &#xD;
17
  1.0.0&#xD;
18
  * Initial working release</notes>
19
  <authors><author><name>Stitch Labs</name><user>rnavarro</user><email>dev@stitchlabs.com</email></author></authors>
20
  <date>2014-09-22</date>
21
- <time>17:33:59</time>
22
- <contents><target name="magecommunity"><dir name="StitchLabs"><dir name="ChannelIntegration"><dir name="Helper"><file name="Data.php" hash="99816c036bf2e85ee80532eea931d364"/></dir><dir name="Model"><dir name="Order"><dir name="Api"><file name="V2.php" hash="069f37eed8455d193c69dcb10ee761c4"/></dir><file name="Api.php" hash="e3e771c8ec9ec0344a99f29dd446ad8f"/></dir><dir name="Product"><dir name="Api"><file name="V2.php" hash="58a2ceef48359730fc22d53896ea0086"/></dir><file name="Api.php" hash="d0eba04915b75905a477ec624b77f4b3"/></dir><file name="Product.php" hash="98fee14cbed0a95ad2426612226d526c"/><dir name="Resource"><dir name="Order"><file name="Collection.php" hash="a7d05e49a418f467c887752f3ea25ee7"/></dir><file name="Order.php" hash="accdce477026b896d190027987229d55"/><dir name="Product"><file name="Collection.php" hash="2e05486fcb4474fcad3c2681c628b74e"/></dir><file name="Product.php" hash="2e38d111342b23c574101e0344adbc6b"/><file name="Setup.php" hash="dbaff42087358b9a6451a4971dce3817"/></dir></dir><dir name="etc"><file name="api.xml" hash="13ae978dea5c8eedabb7333f808b7545"/><file name="config.xml" hash="c7cc22b4f87c4bd8a9e17e6b9bcaa59d"/><file name="wsdl.xml" hash="30fabcb814767d6a79ec59e54d652d6f"/><file name="wsi.xml" hash="9dd060c265efa9b4302f66306b808374"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="StitchLabs_ChannelIntegration.xml" hash="3b9a13293b9d8dc3bb795450c4fe271a"/></dir></target></contents>
23
  <compatible/>
24
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
25
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>StitchLabs_ChannelIntegration</name>
4
+ <version>1.0.3</version>
5
  <stability>stable</stability>
6
  <license>MIT</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>This extension provides integration with StitchLabs</summary>
10
  <description>This extension provides integration with StitchLabs</description>
11
+ <notes>1.0.3&#xD;
12
+ * Add pagination functionality to order endpoint&#xD;
13
+ &#xD;
14
+ 1.0.2&#xD;
15
  * Added missing stock_data to product info WSDL&#xD;
16
  &#xD;
17
  1.0.1&#xD;
18
+ * Add pagination functionality to product endpoints&#xD;
19
  &#xD;
20
  1.0.0&#xD;
21
  * Initial working release</notes>
22
  <authors><author><name>Stitch Labs</name><user>rnavarro</user><email>dev@stitchlabs.com</email></author></authors>
23
  <date>2014-09-22</date>
24
+ <time>19:13:00</time>
25
+ <contents><target name="magecommunity"><dir name="StitchLabs"><dir name="ChannelIntegration"><dir name="Helper"><file name="Data.php" hash="99816c036bf2e85ee80532eea931d364"/></dir><dir name="Model"><dir name="Order"><dir name="Api"><file name="V2.php" hash="069f37eed8455d193c69dcb10ee761c4"/></dir><file name="Api.php" hash="9576884f96ade453131b71ef0b581690"/></dir><dir name="Product"><dir name="Api"><file name="V2.php" hash="58a2ceef48359730fc22d53896ea0086"/></dir><file name="Api.php" hash="d0eba04915b75905a477ec624b77f4b3"/></dir><file name="Product.php" hash="98fee14cbed0a95ad2426612226d526c"/><dir name="Resource"><dir name="Order"><file name="Collection.php" hash="a7d05e49a418f467c887752f3ea25ee7"/></dir><file name="Order.php" hash="accdce477026b896d190027987229d55"/><dir name="Product"><file name="Collection.php" hash="2e05486fcb4474fcad3c2681c628b74e"/></dir><file name="Product.php" hash="2e38d111342b23c574101e0344adbc6b"/><file name="Setup.php" hash="dbaff42087358b9a6451a4971dce3817"/></dir></dir><dir name="etc"><file name="api.xml" hash="13ae978dea5c8eedabb7333f808b7545"/><file name="config.xml" hash="c7cc22b4f87c4bd8a9e17e6b9bcaa59d"/><file name="wsdl.xml" hash="30fabcb814767d6a79ec59e54d652d6f"/><file name="wsi.xml" hash="9dd060c265efa9b4302f66306b808374"/></dir></dir><dir name=".git"><file name="COMMIT_EDITMSG" hash="8076432b20405fd787505e90aece3bcb"/><file name="HEAD" hash="4cf2d64e44205fe628ddd534e1151b58"/><file name="config" hash="5006f126859e126656c5e13b7403947b"/><file name="description" hash="a0a7c3fff21f2aea3cfa1d0316dd816c"/><dir name="hooks"><file name="applypatch-msg.sample" hash="9cc72dc973e24f9623bd3fe708f60ef5"/><file name="commit-msg.sample" hash="579a3c1e12a1e74a98169175fb913012"/><file name="post-update.sample" hash="2b7ea5cee3c49ff53d41e00785eb974c"/><file name="pre-applypatch.sample" hash="a4a7e457b55b5ac2877f7973dbba37e9"/><file name="pre-commit.sample" hash="01b1688f97f94776baae85d77b06048b"/><file name="pre-push.sample" hash="9b64ca5761c6de555d7d1b3c948ecfeb"/><file name="pre-rebase.sample" hash="3ff6ba9cf6d8e5332978e057559b5562"/><file name="prepare-commit-msg.sample" hash="7dfe15854212a30f346da5255c1d794b"/><file name="update.sample" hash="f51b02427757e79621b5235d7efdf117"/></dir><file name="index" hash="5c84e80f8f7180ad24b89e8d766030a9"/><dir name="info"><file name="exclude" hash="036208b4a1ab4a235d75c181e685e5a3"/></dir><dir name="logs"><file name="HEAD" hash="ee82604d4e5c146d5435561fc90a269e"/><dir name="refs"><dir name="heads"><file name="master" hash="ee82604d4e5c146d5435561fc90a269e"/></dir><dir name="remotes"><dir name="origin"><file name="HEAD" hash="069761101bd42d946317c54370fc4fe1"/><file name="master" hash="cadcfef966a3477d39cbdf2f43ca175e"/></dir></dir></dir></dir><dir name="objects"><dir name="01"><file name="b28c813feecf82e1f21c32bfa57c17652eab21" hash="c8cdd6ec194c63237fddda0cacd84089"/></dir><dir name="07"><file name="5ae42ae48cddefb1f7e78e0e5af25837e68898" hash="ec7e1069961aec96c4bd6a1da72d84e4"/></dir><dir name="27"><file name="6e7b0f177c71457ccfd2a07a7f5ec44b235206" hash="a4e590b44ffff71a02e85662cc114fa7"/></dir><dir name="2a"><file name="bc7aedf2fd8e7868d8d1249f19b81acda97b3b" hash="c2e97cc35ee93fb985c3c0763117a173"/></dir><dir name="39"><file name="1b337958447dc5e16b8b75969cd2b243f6ce2d" hash="defc51950f46f9c24b94baf5f101f31c"/></dir><dir name="46"><file name="4e4d72fb77e90baf7a014b5dfd01c67e5017a3" hash="d74c299f25194e83577f7efa3a8cde78"/></dir><dir name="4b"><file name="82aa94f39a91d46699ccbf3a805a71697eaa1f" hash="5306775a438e43ef1624315b9df96dbb"/></dir><dir name="56"><file name="11bd2e81662aa571b9d9625bbc0f8c07120f95" hash="71efd457a63c603a952f7e9d599d8e04"/></dir><dir name="5e"><file name="8edf822cbaf72f5a0dd5fdb07b6c4f86ccd218" hash="af9c299e16a935f037902b182d526850"/></dir><dir name="63"><file name="d337d5c036c371a89ac8af4fdec5798b9a98f9" hash="64d6fd2417d0546ec2a8fe838d988f77"/></dir><dir name="73"><file name="4863301963a3080d04e4bc39cf182b37b8c6e7" hash="f9a54ea83d10cf49a9f9dff0b4caa5a5"/></dir><dir name="79"><file name="e377d2f7f550f580006e9c266efbf0eb5d161d" hash="9f959a7e50356cc43f7127119b3e8dff"/></dir><dir name="83"><file name="b74f5929aef322401c288065730fcb5109e21b" hash="88b4ca6a20b3377c0606cbd408718ff9"/></dir><dir name="8e"><file name="09aa0504ffd08e847c821104c93a9478f67cce" hash="a5a1fbe63d73d58954b61711f7d481f2"/></dir><dir name="94"><file name="2583c001e064f5b00a8694618c24d0234a049a" hash="dae4128dbef3ecd65aff545da342442a"/></dir><dir name="98"><file name="91a20fab310de0ebe0ede12a572576c9f2d1f0" hash="d64d6ee0f32e8a30882a52075f81e150"/></dir><dir name="a9"><file name="c170fc567c8e9d029ea658584608a76b14337c" hash="77322eabf0b1ddd674914ddcbe1d51fa"/></dir><dir name="b4"><file name="36ffcefd16dbf236b3f1ca96c7b2a3ed0f82bb" hash="f98f000fb2c321fcf1b005e1bc871b07"/></dir><dir name="b6"><file name="6c5cef0a12394ea0b24227d2c1dd2a48aca7af" hash="aa65a76152d5e04008aee56b4210a3ca"/></dir><dir name="b8"><file name="c3a53b647d748a04bc54969c6e33bf2c55ddbd" hash="2838717c73068883e2b01ca1dfe0e576"/></dir><dir name="cc"><file name="95f87ad1d41347f722ccdc2b7d608d4bd533d9" hash="1b25cf76051c0c5ff052c7507d520698"/></dir><dir name="ed"><file name="16c68b8e29366e83cf8d1a5520ae97e94bc292" hash="8d3ee5fb83f629e6eb3f2785f4a46fe5"/></dir><dir name="fa"><file name="a3d71c71c5a5ad70a15044868deab51860e403" hash="104f0872d8b2bbd4a165675697dd3d92"/></dir><dir name="fd"><file name="e2de185cd5f10a3c4864f499684df2d64b0677" hash="b0b477eacaa246d024647753ff503294"/></dir><dir name="pack"><file name="pack-dc0330ebce870e8b7088bdeacf67e21f1b6728ec.idx" hash="5c7fcda676dd64ffcba1bf19695c979b"/><file name="pack-dc0330ebce870e8b7088bdeacf67e21f1b6728ec.pack" hash="f71d08cae68a0a9347899c4ae4b5510e"/></dir></dir><file name="packed-refs" hash="208b5c76fca5096b333659d44c678b27"/><dir name="refs"><dir name="heads"><file name="master" hash="56619804ae8af17b05e161164625cbfe"/></dir><dir name="remotes"><dir name="origin"><file name="HEAD" hash="73a00957034783b7b5c8294c54cd3e12"/><file name="master" hash="56619804ae8af17b05e161164625cbfe"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="StitchLabs_ChannelIntegration.xml" hash="3b9a13293b9d8dc3bb795450c4fe271a"/></dir></target></contents>
26
  <compatible/>
27
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
28
  </package>