Auctane_ShipStation - Version 1.3.41

Version Notes

Official release.



Compatibility with php running as cgi, allows exporting base or store price.

Download this release

Release Info

Developer Classy Llama
Extension Auctane_ShipStation
Version 1.3.41
Comparing to
See all releases


Code changes from version 1.3.39 to 1.3.41

app/code/community/Auctane/Api/Model/Action/Export.php CHANGED
@@ -171,7 +171,7 @@ class Auctane_Api_Model_Action_Export
171
  }
172
 
173
  $intImportDiscount = Mage::getStoreConfig('auctaneapi/general/import_discounts');
174
- if ($intImportDiscount == 1) { // Import Discount is true
175
  $discounts = array();
176
  if ($order->getData('auctaneapi_discounts')) {
177
  $discounts = unserialize($order->getData('auctaneapi_discounts'));
@@ -265,22 +265,6 @@ class Auctane_Api_Model_Action_Export
265
 
266
  $xml->startElement('Options');
267
  $this->_productAttribute($product, $xml, $storeId);
268
- // items may have several custom options chosen by customer
269
- foreach ((array) $item->getProductOptionByCode('options') as $option) {
270
- $this->_writeOrderItemOption($option, $xml, $storeId);
271
- }
272
- $buyRequest = $item->getProductOptionByCode('info_buyRequest');
273
- if ($buyRequest && isset($buyRequest['super_attribute'])) {
274
- // super_attribute is non-null and non-empty, there must be a Configurable involved
275
- $parentItem = $this->_getOrderItemParent($item);
276
- /* export configurable custom options as they are stored in parent */
277
- foreach ((array) $parentItem->getProductOptionByCode('options') as $option) {
278
- $this->_writeOrderItemOption($option, $xml, $storeId);
279
- }
280
- foreach ((array) $parentItem->getProductOptionByCode('attributes_info') as $option) {
281
- $this->_writeOrderItemOption($option, $xml, $storeId);
282
- }
283
- }
284
  $xml->endElement(); // Options
285
  $xml->endElement(); // Item
286
  }
@@ -314,12 +298,14 @@ class Auctane_Api_Model_Action_Export
314
  } else {
315
  $value = $product->getDataUsingMethod($attr->getName());
316
  }
317
- // fake an item option
318
- $option = array(
319
- 'value' => $value,
320
- 'label' => $attr->getFrontendLabel()
321
- );
322
- $this->_writeOrderItemOption($option, $xml, $storeId);
 
 
323
  }
324
  }
325
  }
171
  }
172
 
173
  $intImportDiscount = Mage::getStoreConfig('auctaneapi/general/import_discounts');
174
+ if ($intImportDiscount != 2) { // Import Discount is true
175
  $discounts = array();
176
  if ($order->getData('auctaneapi_discounts')) {
177
  $discounts = unserialize($order->getData('auctaneapi_discounts'));
265
 
266
  $xml->startElement('Options');
267
  $this->_productAttribute($product, $xml, $storeId);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
268
  $xml->endElement(); // Options
269
  $xml->endElement(); // Item
270
  }
298
  } else {
299
  $value = $product->getDataUsingMethod($attr->getName());
300
  }
301
+ if ($value) {
302
+ //item option
303
+ $option = array(
304
+ 'value' => $value,
305
+ 'label' => $attr->getFrontendLabel()
306
+ );
307
+ $this->_writeOrderItemOption($option, $xml, $storeId);
308
+ }
309
  }
310
  }
311
  }
app/code/community/Auctane/Api/Model/Action/Shipnotify.php CHANGED
@@ -30,7 +30,6 @@ class Auctane_Api_Model_Action_Shipnotify
30
  {
31
  // Raw XML is POSTed to this stream
32
  $xml = simplexml_load_file('php://input');
33
-
34
  // load some objects
35
  $order = $this->_getOrder($xml->OrderNumber);
36
  $qtys = $this->_getOrderItemQtys($xml->Items, $order);
30
  {
31
  // Raw XML is POSTed to this stream
32
  $xml = simplexml_load_file('php://input');
 
33
  // load some objects
34
  $order = $this->_getOrder($xml->OrderNumber);
35
  $qtys = $this->_getOrderItemQtys($xml->Items, $order);
app/code/community/Auctane/Api/Model/Server/Adapter.php CHANGED
@@ -136,14 +136,20 @@ class Auctane_Api_Model_Server_Adapter
136
  if (is_numeric($code) && strlen((int) $code) === 3) {
137
  header(sprintf('%s %03d Fault', $_SERVER['SERVER_PROTOCOL'], $code));
138
  }
139
- $errMessage = 'Authorize.Net CIM Gateway: The original transaction was not issued
140
- for this shipping address. (E00051)';
141
 
142
- $faultString = "Integrity constraint violation";
143
- $position = strpos($message, $faultString);
 
 
 
 
 
 
144
 
145
  //return fault status when web exception genrated.
146
- if (($message == $errMessage) || ($position !== false)) {
147
  header('Web Exception', true, 400);
148
  }
149
 
136
  if (is_numeric($code) && strlen((int) $code) === 3) {
137
  header(sprintf('%s %03d Fault', $_SERVER['SERVER_PROTOCOL'], $code));
138
  }
139
+ $gatewayFault = "Authorize.Net CIM Gateway";
140
+ $authPos = strpos($message, $gatewayFault);
141
 
142
+ $faultString = "constraint violation";
143
+ $pos = strpos($message, $faultString);
144
+
145
+ $paymentFault = "capturing error";
146
+ $faultPos = strpos($message, $paymentFault);
147
+
148
+ $sqlFault = "SQLSTATE[40001]";
149
+ $sqlPos = strpos($message, $sqlFault);
150
 
151
  //return fault status when web exception genrated.
152
+ if (($authPos !== false) || ($pos !== false) || ($faultPos !== false) || ($sqlPos !== false)) {
153
  header('Web Exception', true, 400);
154
  }
155
 
app/code/community/Auctane/Api/etc/config.xml CHANGED
@@ -19,7 +19,7 @@
19
  <config>
20
  <modules>
21
  <Auctane_Api>
22
- <version>1.3.39</version>
23
  </Auctane_Api>
24
  </modules>
25
  <global>
19
  <config>
20
  <modules>
21
  <Auctane_Api>
22
+ <version>1.3.41</version>
23
  </Auctane_Api>
24
  </modules>
25
  <global>
app/code/community/Auctane/Api/etc/system.xml CHANGED
@@ -69,6 +69,7 @@
69
  <show_in_website>1</show_in_website>
70
  <sort_order>10</sort_order>
71
  <show_in_store>1</show_in_store>
 
72
  </customattributes>
73
  <import_child_products translate="label">
74
  <label>Import Child Products</label>
69
  <show_in_website>1</show_in_website>
70
  <sort_order>10</sort_order>
71
  <show_in_store>1</show_in_store>
72
+ <can_be_empty>1</can_be_empty>
73
  </customattributes>
74
  <import_child_products translate="label">
75
  <label>Import Child Products</label>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Auctane_ShipStation</name>
4
- <version>1.3.39</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
@@ -12,9 +12,9 @@
12
  &amp;amp;amp;amp;amp;amp;amp;#xD;&amp;amp;amp;amp;amp;amp;#xD;&amp;amp;amp;amp;amp;#xD;&amp;amp;amp;amp;#xD;&amp;amp;amp;#xD;&amp;amp;#xD;&amp;#xD;&#xD;
13
  Compatibility with php running as cgi, allows exporting base or store price.</notes>
14
  <authors><author><name>Classy Llama</name><user>classyllama</user><email>info@classyllama.com</email></author></authors>
15
- <date>2015-12-29</date>
16
- <time>09:52:43</time>
17
- <contents><target name="mageetc"><dir name="modules"><file name="Auctane_Api.xml" hash="a95e2ff4d2c0c0e9dbd33fa50d1fdff8"/></dir></target><target name="magecommunity"><dir name="Auctane"><dir name="Api"><file name="CHANGELOG.txt" hash="ac302cdb9f343e0ec036b7a846294235"/><dir name="Helper"><file name="Data.php" hash="cf9c04c83f3bacb3c2a78aad2a53a81c"/></dir><file name="LICENSE.html" hash="caf0a79ffb5e4719f9f4de286f253a61"/><file name="LICENSE.txt" hash="34410d4f566fdc33f094525a2d9865fa"/><file name="LICENSE_AFL.txt" hash="0e3cb8112c018920eee7a316a2a69103"/><dir name="Model"><dir name="Action"><file name="Export.php" hash="02aea787b4243c5d95bf3dfee54bba2e"/><file name="Shipnotify.php" hash="06fe0518595c3f9dc616ea4073a4587e"/></dir><file name="Observer.php" hash="60445facb51142a030ea9944872fa98a"/><dir name="Server"><file name="Adapter.php" hash="3394bbbfa77df8351bf42c9da9a3e704"/></dir><dir name="System"><dir name="Source"><dir name="Config"><file name="Customattributes.php" hash="b8b4ea3c5c349e872de93c1dbfcc4171"/><file name="Import.php" hash="bed3f5935efde27705589afc448d5dd4"/><file name="Prices.php" hash="203d324934d8cfe0776a0ce764dc118d"/></dir></dir></dir></dir><dir name="controllers"><file name="AuctaneController.php" hash="ae73284a10d84540591b4ff9ad0814dd"/></dir><dir name="etc"><file name="api.xml" hash="41c92fc762da05e68b19f0eaf3100260"/><file name="config.xml" hash="20440c9647e77c2ad167db2fe763ba71"/><file name="system.xml" hash="91b7c65f17f50a62029008e22dadc0ac"/></dir><dir name="sql"><dir name="auctaneapi_setup"><file name="mysql4-install-1.3.11.php" hash="17aa8f981f75f1e1d62e8dbdde2f950d"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="auctaneapi"><dir name="css"><file name="master.css" hash="0b35fa9797b3bd868b3725a85d4347af"/></dir><dir name="images"><file name="auctaneapi.png" hash="294d531f2f4f6dd85bdccd124a3057f6"/><file name="btn_bl.png" hash="093ac74aedfd1dd0addbfac3a19ced95"/><file name="header.png" hash="9228dfeb910aa6f3141d40966a6dba32"/><file name="tabs_span_bg.gif" hash="bcabd4fea0d67b181f21779564c2284b"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="auctaneapi.xml" hash="a6fe62d8258e423bee3a129165c0d313"/></dir></dir></dir></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
20
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Auctane_ShipStation</name>
4
+ <version>1.3.41</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
12
  &amp;amp;amp;amp;amp;amp;amp;#xD;&amp;amp;amp;amp;amp;amp;#xD;&amp;amp;amp;amp;amp;#xD;&amp;amp;amp;amp;#xD;&amp;amp;amp;#xD;&amp;amp;#xD;&amp;#xD;&#xD;
13
  Compatibility with php running as cgi, allows exporting base or store price.</notes>
14
  <authors><author><name>Classy Llama</name><user>classyllama</user><email>info@classyllama.com</email></author></authors>
15
+ <date>2016-01-21</date>
16
+ <time>09:53:12</time>
17
+ <contents><target name="mageetc"><dir name="modules"><file name="Auctane_Api.xml" hash="a95e2ff4d2c0c0e9dbd33fa50d1fdff8"/></dir></target><target name="magecommunity"><dir name="Auctane"><dir name="Api"><file name="CHANGELOG.txt" hash="ac302cdb9f343e0ec036b7a846294235"/><dir name="Helper"><file name="Data.php" hash="cf9c04c83f3bacb3c2a78aad2a53a81c"/></dir><file name="LICENSE.html" hash="caf0a79ffb5e4719f9f4de286f253a61"/><file name="LICENSE.txt" hash="34410d4f566fdc33f094525a2d9865fa"/><file name="LICENSE_AFL.txt" hash="0e3cb8112c018920eee7a316a2a69103"/><dir name="Model"><dir name="Action"><file name="Export.php" hash="fe53f5b2865c464107d423996f4400c2"/><file name="Shipnotify.php" hash="f512dfb8c5cde4e3fa15da7e29b4499e"/></dir><file name="Observer.php" hash="60445facb51142a030ea9944872fa98a"/><dir name="Server"><file name="Adapter.php" hash="cbdb6c050722cf96bb0e424a3e4dc327"/></dir><dir name="System"><dir name="Source"><dir name="Config"><file name="Customattributes.php" hash="b8b4ea3c5c349e872de93c1dbfcc4171"/><file name="Import.php" hash="bed3f5935efde27705589afc448d5dd4"/><file name="Prices.php" hash="203d324934d8cfe0776a0ce764dc118d"/></dir></dir></dir></dir><dir name="controllers"><file name="AuctaneController.php" hash="ae73284a10d84540591b4ff9ad0814dd"/></dir><dir name="etc"><file name="api.xml" hash="41c92fc762da05e68b19f0eaf3100260"/><file name="config.xml" hash="929d7c82c819ba4da3f14d49cdf25e91"/><file name="system.xml" hash="098b6f441ea56ca687fc1bf9f90d2d56"/></dir><dir name="sql"><dir name="auctaneapi_setup"><file name="mysql4-install-1.3.11.php" hash="17aa8f981f75f1e1d62e8dbdde2f950d"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="auctaneapi"><dir name="css"><file name="master.css" hash="0b35fa9797b3bd868b3725a85d4347af"/></dir><dir name="images"><file name="auctaneapi.png" hash="294d531f2f4f6dd85bdccd124a3057f6"/><file name="btn_bl.png" hash="093ac74aedfd1dd0addbfac3a19ced95"/><file name="header.png" hash="9228dfeb910aa6f3141d40966a6dba32"/><file name="tabs_span_bg.gif" hash="bcabd4fea0d67b181f21779564c2284b"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="auctaneapi.xml" hash="a6fe62d8258e423bee3a129165c0d313"/></dir></dir></dir></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
20
  </package>