Auctane_ShipStation - Version 1.3.33

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.33
Comparing to
See all releases


Code changes from version 1.3.27 to 1.3.33

app/code/community/Auctane/Api/Helper/Data.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  /**
4
  * ShipStation
5
  *
@@ -17,30 +16,34 @@
17
  * @package Auctane_Api
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
  */
20
- class Auctane_Api_Helper_Data extends Mage_Core_Helper_Data {
21
-
22
- private $_strBundleSku = '';
23
 
 
 
24
  /**
25
  * Write a source object to an XML stream, mapping fields via a fieldset.
26
  * Fieldsets are nodes in config.xml
27
  *
28
- * @param string $fieldset
29
  * @param array|Varien_Object $source
30
  * @param XMLWriter $xml
31
  */
32
- public function fieldsetToXml($fieldset, $source, XMLWriter $xml, $isBundle = 0) {
33
- $fields = (array) Mage::getConfig()->getFieldset($fieldset);
 
34
  //Check for the importing the child product settings
35
- $intImportChildProducts = Mage::getStoreConfig('auctaneapi/general/import_child_products');
36
  foreach ($fields as $field => $dest) {
37
  if (!$dest->auctaneapi)
38
  continue;
39
 
40
  $name = $dest->auctaneapi == '*' ? $field : $dest->auctaneapi;
41
- $value = $source instanceof Varien_Object ? $source->getDataUsingMethod($field) : @$source[$field];
 
 
 
 
42
  //Set the child item price of bundle products to 0
43
- if ($isBundle == 1 && $name == 'UnitPrice' && $intImportChildProducts == 1) {
44
  $value = 0;
45
  }
46
  $xml->startElement((string) $name);
@@ -55,24 +58,26 @@ class Auctane_Api_Helper_Data extends Mage_Core_Helper_Data {
55
 
56
  /**
57
  * Write discounts info to order
 
58
  * @param array $discount
59
  * @param XMLWriter $xml
60
  */
61
- public function writeDiscountsInfo(array $discounts, XMLWriter $xml) {
62
- foreach ($discounts as $rule => $total) {
63
- $salesRule = Mage::getModel('salesrule/rule')->load($rule);
64
-
65
- if (!$salesRule->getId()) {
66
- continue;
67
- }
68
-
 
 
69
  $xml->startElement('Item');
70
-
71
  $xml->startElement('SKU');
72
- $xml->writeCdata($salesRule->getCouponCode() ? $salesRule->getCouponCode() : 'AUTOMATIC_DISCOUNT');
73
  $xml->endElement();
74
  $xml->startElement('Name');
75
- $xml->writeCdata($salesRule->getName());
76
  $xml->endElement();
77
  $xml->startElement('Adjustment');
78
  $xml->writeCdata('true');
@@ -81,19 +86,20 @@ class Auctane_Api_Helper_Data extends Mage_Core_Helper_Data {
81
  $xml->text(1);
82
  $xml->endElement();
83
  $xml->startElement('UnitPrice');
84
- $xml->text(-$total);
85
  $xml->endElement();
86
-
87
  $xml->endElement();
88
  }
89
  }
90
 
91
  /**
92
  * Write purchase order info to order
 
93
  * @param Mage_Sales_Model_Order $order
94
  * @param XMLWriter $xml
95
  */
96
- public function writePoNumber($order, $xml) {
 
97
  $payment = $order->getPayment();
98
  $xml->startElement('PO');
99
  if ($payment) {
@@ -106,11 +112,13 @@ class Auctane_Api_Helper_Data extends Mage_Core_Helper_Data {
106
  * @return array of string names
107
  * @see "auctane_exclude" nodes in config.xml
108
  */
109
- public function getIncludedProductTypes() {
 
110
  static $types;
111
  if (!isset($types)) {
112
  $types = Mage::getModel('catalog/product_type')->getTypes();
113
- $types = array_filter($types, create_function('$type', 'return !@$type["auctane_exclude"];'));
 
114
  }
115
  return array_keys($types);
116
  }
@@ -121,11 +129,13 @@ class Auctane_Api_Helper_Data extends Mage_Core_Helper_Data {
121
  * @param string $type
122
  * @return bool
123
  */
124
- public function isExcludedProductType($type) {
 
125
  static $types;
126
  if (!isset($types)) {
127
  $types = Mage::getModel('catalog/product_type')->getTypes();
128
- $types = array_filter($types, create_function('$type', 'return (bool) @$type["auctane_exclude"];'));
 
129
  }
130
  return isset($types[$type]);
131
  }
@@ -135,7 +145,8 @@ class Auctane_Api_Helper_Data extends Mage_Core_Helper_Data {
135
  *
136
  * @return string
137
  */
138
- public function getModuleList() {
 
139
  $modules = array_keys((array) Mage::getConfig()->getNode('modules')->children());
140
  return implode(',', $modules);
141
  }
@@ -146,35 +157,9 @@ class Auctane_Api_Helper_Data extends Mage_Core_Helper_Data {
146
  * @param int $store
147
  * @return int
148
  */
149
- public function getExportPriceType($store) {
 
150
  return Mage::getStoreConfig('auctaneapi/general/export_price', $store);
151
  }
152
 
153
- /**
154
- * Get bundle items for specific bundle product
155
- *
156
- * @param int $bundleProductId
157
- * @return array()
158
- */
159
- public function getBundleItems($bundleProductId) {
160
- try {
161
-
162
- $bundledProduct = new Mage_Catalog_Model_Product();
163
- $bundledProduct->load($bundleProductId);
164
- $selectionCollection = $bundledProduct->getTypeInstance(true)->getSelectionsCollection(
165
- $bundledProduct->getTypeInstance(true)->getOptionsIds($bundledProduct), $bundledProduct
166
- );
167
- $bundleItems = array();
168
- foreach ($selectionCollection as $option) {
169
- // Assign bundle product items to global array.
170
- $bundleItems[] = $option->product_id;
171
- }
172
-
173
- return $bundleItems;
174
- } catch (Exception $e) {
175
- Mage::log($e->getMessage());
176
- return array();
177
- }
178
- }
179
-
180
  }
1
  <?php
 
2
  /**
3
  * ShipStation
4
  *
16
  * @package Auctane_Api
17
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
  */
 
 
 
19
 
20
+ class Auctane_Api_Helper_Data extends Mage_Core_Helper_Data
21
+ {
22
  /**
23
  * Write a source object to an XML stream, mapping fields via a fieldset.
24
  * Fieldsets are nodes in config.xml
25
  *
26
+ * @param string $fieldSet
27
  * @param array|Varien_Object $source
28
  * @param XMLWriter $xml
29
  */
30
+ public function fieldsetToXml($fieldSet, $source, XMLWriter $xml, $isBundle = 0)
31
+ {
32
+ $fields = (array) Mage::getConfig()->getFieldset($fieldSet);
33
  //Check for the importing the child product settings
34
+ $isChildProducts = Mage::getStoreConfig('auctaneapi/general/import_child_products');
35
  foreach ($fields as $field => $dest) {
36
  if (!$dest->auctaneapi)
37
  continue;
38
 
39
  $name = $dest->auctaneapi == '*' ? $field : $dest->auctaneapi;
40
+ $sourceField = '';
41
+ if (isset($source[$field]))
42
+ $sourceField = $source[$field];
43
+
44
+ $value = $source instanceof Varien_Object ? $source->getDataUsingMethod($field) : $sourceField;
45
  //Set the child item price of bundle products to 0
46
+ if ($isBundle == 1 && $isChildProducts == 1 && ($name == 'UnitPrice' || $name == 'Weight')) {
47
  $value = 0;
48
  }
49
  $xml->startElement((string) $name);
58
 
59
  /**
60
  * Write discounts info to order
61
+ *
62
  * @param array $discount
63
  * @param XMLWriter $xml
64
  */
65
+ public function writeDiscountsInfo(array $discounts, XMLWriter $xml)
66
+ {
67
+ //Get the rule ids
68
+ $keys = array_keys($discounts);
69
+ //Get the rule details from rule id's
70
+ $collection = Mage::getModel('salesrule/rule')->getCollection();
71
+ $collection->addFieldToSelect(array('name'))
72
+ ->addFieldToFilter('rule_id', array('in' => $keys));
73
+
74
+ foreach ($collection as $rule) {
75
  $xml->startElement('Item');
 
76
  $xml->startElement('SKU');
77
+ $xml->writeCdata($rule->getCode() ? $rule->getCode() : 'AUTOMATIC_DISCOUNT');
78
  $xml->endElement();
79
  $xml->startElement('Name');
80
+ $xml->writeCdata($rule->getName());
81
  $xml->endElement();
82
  $xml->startElement('Adjustment');
83
  $xml->writeCdata('true');
86
  $xml->text(1);
87
  $xml->endElement();
88
  $xml->startElement('UnitPrice');
89
+ $xml->text(-$discounts[$rule->getId()]);
90
  $xml->endElement();
 
91
  $xml->endElement();
92
  }
93
  }
94
 
95
  /**
96
  * Write purchase order info to order
97
+ *
98
  * @param Mage_Sales_Model_Order $order
99
  * @param XMLWriter $xml
100
  */
101
+ public function writePoNumber($order, $xml)
102
+ {
103
  $payment = $order->getPayment();
104
  $xml->startElement('PO');
105
  if ($payment) {
112
  * @return array of string names
113
  * @see "auctane_exclude" nodes in config.xml
114
  */
115
+ public function getIncludedProductTypes()
116
+ {
117
  static $types;
118
  if (!isset($types)) {
119
  $types = Mage::getModel('catalog/product_type')->getTypes();
120
+ if (isset($type["auctane_exclude"]))
121
+ $types = array_filter($types, create_function('$type', 'return !$type["auctane_exclude"];'));
122
  }
123
  return array_keys($types);
124
  }
129
  * @param string $type
130
  * @return bool
131
  */
132
+ public function isExcludedProductType($type)
133
+ {
134
  static $types;
135
  if (!isset($types)) {
136
  $types = Mage::getModel('catalog/product_type')->getTypes();
137
+ if (isset($type["auctane_exclude"]))
138
+ $types = array_filter($types, create_function('$type', 'return (bool) $type["auctane_exclude"];'));
139
  }
140
  return isset($types[$type]);
141
  }
145
  *
146
  * @return string
147
  */
148
+ public function getModuleList()
149
+ {
150
  $modules = array_keys((array) Mage::getConfig()->getNode('modules')->children());
151
  return implode(',', $modules);
152
  }
157
  * @param int $store
158
  * @return int
159
  */
160
+ public function getExportPriceType($store)
161
+ {
162
  return Mage::getStoreConfig('auctaneapi/general/export_price', $store);
163
  }
164
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
165
  }
app/code/community/Auctane/Api/Model/Action/Export.php CHANGED
@@ -1,7 +1,24 @@
1
  <?php
2
-
3
- class Auctane_Api_Model_Action_Export {
4
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  /**
6
  * Perform an export according to the given request.
7
  *
@@ -9,7 +26,8 @@ class Auctane_Api_Model_Action_Export {
9
  * @param Mage_Core_Controller_Response_Http $response
10
  * @throws Exception
11
  */
12
- public function process(Mage_Core_Controller_Request_Http $request, Mage_Core_Controller_Response_Http $response) {
 
13
  // In case store is part of URL path use it to choose config.
14
  $store = $request->get('store');
15
  if ($store)
@@ -17,9 +35,9 @@ class Auctane_Api_Model_Action_Export {
17
 
18
  $apiConfigCharset = Mage::getStoreConfig("api/config/charset", $store);
19
 
20
- $start_date = strtotime(urldecode($request->getParam('start_date')));
21
- $end_date = strtotime(urldecode($request->getParam('end_date')));
22
- if (!$start_date || !$end_date)
23
  throw new Exception('Start and end dates are required', 400);
24
 
25
  $page = (int) $request->getParam('page');
@@ -27,10 +45,9 @@ class Auctane_Api_Model_Action_Export {
27
  /* @var $orders Mage_Sales_Model_Mysql4_Order_Collection */
28
  $orders = Mage::getResourceModel('sales/order_collection');
29
  // might use 'created_at' attribute instead
30
- $orders->addAttributeToFilter('updated_at', array(
31
- 'from' => date('Y-m-d H:i:s', $start_date),
32
- 'to' => date('Y-m-d H:i:s', $end_date)
33
- ));
34
  if ($store)
35
  $orders->addAttributeToFilter('store_id', $store->getId());
36
  if ($page > 0)
@@ -46,11 +63,23 @@ class Auctane_Api_Model_Action_Export {
46
  ->setBody($xml->outputMemory(true));
47
  }
48
 
49
- protected function _getExportPageSize() {
 
 
 
 
50
  return (int) Mage::getStoreConfig('auctaneapi/config/exportPageSize');
51
  }
52
 
53
- protected function _writeOrders(Varien_Data_Collection $orders, XMLWriter $xml, $storeId = null) {
 
 
 
 
 
 
 
 
54
  $xml->startElement('Orders');
55
  $xml->writeAttribute('pages', $orders->getLastPageNumber());
56
  foreach ($orders as $order) {
@@ -59,19 +88,24 @@ class Auctane_Api_Model_Action_Export {
59
  $xml->startElement('Query');
60
  $xml->writeCdata($orders->getSelectSql());
61
  $xml->endElement(); // Query
62
-
63
  $xml->startElement('Version');
64
  $xml->writeCdata('Magento ' . Mage::getVersion());
65
  $xml->endElement(); // Version
66
-
67
  $xml->startElement('Extensions');
68
  $xml->writeCdata(Mage::helper('auctaneapi')->getModuleList());
69
  $xml->endElement(); // Extensions
70
-
71
  $xml->endElement(); // Orders
72
  }
73
 
74
- protected function _writeOrder(Mage_Sales_Model_Order $order, XMLWriter $xml, $storeId = null) {
 
 
 
 
 
 
 
 
75
  $history = '';
76
  /* @var $status Mage_Sales_Model_Order_Status */
77
  foreach ($order->getStatusHistoryCollection() as $status) {
@@ -84,97 +118,63 @@ class Auctane_Api_Model_Action_Export {
84
  if ($history) {
85
  $order->setStatusHistoryText($history);
86
  }
87
-
88
  /* @var $gift Mage_GiftMessage_Model_Message */
89
  $gift = Mage::helper('giftmessage/message')->getGiftMessage($order->getGiftMessageId());
90
  $order->setGift($gift->isObjectNew() ? 'false' : 'true');
 
 
 
 
91
  if (!$gift->isObjectNew()) {
92
- $order->setGiftMessage(sprintf("From: %s\nTo: %s\nMessage: %s", $gift->getSender(), $gift->getRecipient(), $gift->getMessage()));
 
93
  }
94
-
95
  $helper = Mage::helper('auctaneapi');
96
-
97
  $xml->startElement('Order');
98
-
99
- if ($helper->getExportPriceType($order->getStoreId()) == Auctane_Api_Model_System_Source_Config_Prices::BASE_PRICE) {
100
  $helper->fieldsetToXml('base_sales_order', $order, $xml);
101
  } else {
102
  $helper->fieldsetToXml('sales_order', $order, $xml);
103
  }
104
-
105
  $xml->startElement('Customer');
106
  $xml->startElement('CustomerCode');
107
  $xml->writeCdata($order->getCustomerEmail());
108
  $xml->endElement(); // CustomerCode
109
-
110
  $xml->startElement('BillTo');
111
  $helper->fieldsetToXml('sales_order_billing_address', $order->getBillingAddress(), $xml);
112
  $xml->endElement(); // BillTo
113
-
114
  $xml->startElement('ShipTo');
115
  $helper->fieldsetToXml('sales_order_shipping_address', $order->getShippingAddress(), $xml);
116
  $xml->endElement(); // ShipTo
117
-
118
  $xml->endElement(); // Customer
119
-
120
  /** add purchase order nubmer */
121
  Mage::helper('auctaneapi')->writePoNumber($order, $xml);
122
 
123
  $xml->startElement('Items');
124
- /* @var $item Mage_Sales_Model_Order_Item */
125
- $bundleItems = array();
126
- $orderItems = array();
127
- $intCnt = 0;
128
  //Check for the bundle child product to import
129
  $intImportChildProducts = Mage::getStoreConfig('auctaneapi/general/import_child_products');
 
 
130
  foreach ($order->getItemsCollection($helper->getIncludedProductTypes()) as $item) {
131
- /* @var $product Mage_Catalog_Model_Product */
132
- $product = Mage::getModel('catalog/product')
133
- ->setStoreId($storeId)
134
- ->load($item->getProductId());
135
- $productId = $product->getId();
136
-
137
- $boolIsBundleProduct = false;
138
- if ($product->getTypeId() === 'bundle') {
139
- //Get all bundle items of this bundle product
140
- $bundleItems = array_flip(Mage::helper('auctaneapi')->getBundleItems($productId));
141
- $boolIsBundleProduct = true;
142
- }
143
  //Check for the parent bundle item type
144
  $parentItem = $this->_getOrderItemParent($item);
145
- if ($parentItem) {
146
- if ($intImportChildProducts == 2 && $parentItem->getProductType() === 'bundle') {
147
  continue;
 
 
148
  }
149
  }
150
-
151
- if (isset($bundleItems[$productId])) {
152
- //Remove item from bundle product items
153
- unset($bundleItems[$productId]);
154
- $orderItems[$intCnt]['item'] = $item;
155
- $orderItems[$intCnt]['bundle'] = 1;
156
- } else {
157
- //These are items for next processing
158
- $orderItems[$intCnt]['item'] = $item;
159
- $orderItems[$intCnt]['bundle'] = 0;
160
-
161
- if ($boolIsBundleProduct == true) {
162
- $orderItems[$intCnt]['bundle'] = 2;
163
- }
164
- }
165
- $intCnt++;
166
- }
167
-
168
- foreach ($orderItems as $key => $item) {
169
- $this->_writeOrderItem($item['item'], $xml, $storeId, $item['bundle']);
170
  }
171
-
172
  $intImportDiscount = Mage::getStoreConfig('auctaneapi/general/import_discounts');
173
-
174
  if ($intImportDiscount == 1) { // Import Discount is true
175
  $discounts = array();
176
  if ($order->getData('auctaneapi_discounts')) {
177
- $discounts = @unserialize($order->getData('auctaneapi_discounts'));
178
  if (is_array($discounts)) {
179
  $aggregated = array();
180
  foreach ($discounts as $key => $discount) {
@@ -189,37 +189,54 @@ class Auctane_Api_Model_Action_Export {
189
  }
190
  }
191
  }
192
-
193
  $xml->endElement(); // Items
194
-
195
  $xml->endElement(); // Order
196
  }
197
 
198
- protected function _writeOrderItem(Mage_Sales_Model_Order_Item $item, XMLWriter $xml, $storeId = null, $isBundle = 0) {
 
 
 
 
 
 
 
 
 
199
  // inherit some attributes from parent order item
200
  if ($item->getParentItemId() && !$item->getParentItem()) {
201
  $item->setParentItem(Mage::getModel('sales/order_item')->load($item->getParentItemId()));
202
  }
 
 
203
  // only inherit if parent has been hidden
204
- if ($item->getParentItem() && ($item->getPrice() == 0.000) && (Mage::helper('auctaneapi')->isExcludedProductType($item->getParentItem()->getProductType()))) {
205
  //set the store price of item from parent item
206
  $item->setPrice($item->getParentItem()->getPrice());
207
  //set the base price of item from parent item
208
  $item->setBasePrice($item->getParentItem()->getBasePrice());
209
  }
210
 
 
 
 
 
 
211
  /* @var $gift Mage_GiftMessage_Model_Message */
212
- $gift = Mage::helper('giftmessage/message')->getGiftMessage(
213
- !$item->getGiftMessageId() && $item->getParentItem() ? $item->getParentItem()->getGiftMessageId() : $item->getGiftMessageId());
214
  $item->setGift($gift->isObjectNew() ? 'false' : 'true');
 
 
215
  if (!$gift->isObjectNew()) {
216
- $item->setGiftMessage(sprintf("From: %s\nTo: %s\nMessage: %s", $gift->getSender(), $gift->getRecipient(), $gift->getMessage()));
 
217
  }
218
 
219
- /* @var $product Mage_Catalog_Model_Product */
220
  $product = Mage::getModel('catalog/product')
221
  ->setStoreId($storeId)
222
  ->load($item->getProductId());
 
223
  // inherit some attributes from parent product item
224
  if (($parentProduct = $this->_getOrderItemParentProduct($item, $storeId))) {
225
  if (!$product->getImage() || ($product->getImage() == 'no_selection'))
@@ -230,12 +247,11 @@ class Auctane_Api_Model_Action_Export {
230
  $product->setThumbnail($parentProduct->getThumbnail());
231
  }
232
 
233
-
234
  $xml->startElement('Item');
235
 
236
  $helper = Mage::helper('auctaneapi');
237
- if (Mage::helper('auctaneapi')->getExportPriceType($item->getOrder()->getStoreId()) ==
238
- Auctane_Api_Model_System_Source_Config_Prices::BASE_PRICE) {
239
  $helper->fieldsetToXml('base_sales_order_item', $item, $xml, $isBundle);
240
  } else {
241
  $helper->fieldsetToXml('sales_order_item', $item, $xml, $isBundle);
@@ -248,13 +264,13 @@ class Auctane_Api_Model_Action_Export {
248
  $appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
249
 
250
  $xml->startElement('Options');
251
- $this->_writeOrderProductAttribute($product, $xml, $storeId);
252
  // items may have several custom options chosen by customer
253
  foreach ((array) $item->getProductOptionByCode('options') as $option) {
254
  $this->_writeOrderItemOption($option, $xml, $storeId);
255
  }
256
  $buyRequest = $item->getProductOptionByCode('info_buyRequest');
257
- if ($buyRequest && @$buyRequest['super_attribute']) {
258
  // super_attribute is non-null and non-empty, there must be a Configurable involved
259
  $parentItem = $this->_getOrderItemParent($item);
260
  /* export configurable custom options as they are stored in parent */
@@ -266,11 +282,18 @@ class Auctane_Api_Model_Action_Export {
266
  }
267
  }
268
  $xml->endElement(); // Options
269
-
270
  $xml->endElement(); // Item
271
  }
272
 
273
- protected function _writeOrderProductAttribute(Mage_Catalog_Model_Product $product, XMLWriter $xml, $storeId = null) {
 
 
 
 
 
 
 
 
274
  // custom attributes are specified in Admin > Configuration > Sales > Auctane Shipstation API
275
  // static because attributes can be cached, they do not change during a request
276
  static $attrs = null;
@@ -288,9 +311,7 @@ class Auctane_Api_Model_Action_Export {
288
  $value = $product->getAttributeText($attr->getName());
289
  if (is_array($value))
290
  $value = implode(',', $value);
291
- }
292
- // else is a static value
293
- else {
294
  $value = $product->getDataUsingMethod($attr->getName());
295
  }
296
  // fake an item option
@@ -303,7 +324,14 @@ class Auctane_Api_Model_Action_Export {
303
  }
304
  }
305
 
306
- protected function _writeOrderItemOption($option, XMLWriter $xml) {
 
 
 
 
 
 
 
307
  $xml->startElement('Option');
308
  Mage::helper('auctaneapi')->fieldsetToXml('sales_order_item_option', $option, $xml);
309
  $xml->endElement(); // Option
@@ -315,7 +343,8 @@ class Auctane_Api_Model_Action_Export {
315
  * @param Mage_Sales_Model_Order_Item $item
316
  * @return Mage_Sales_Model_Order_Item
317
  */
318
- protected function _getOrderItemParent(Mage_Sales_Model_Order_Item $item) {
 
319
  if ($item->getParentItem()) {
320
  return $item->getParentItem();
321
  }
@@ -327,11 +356,14 @@ class Auctane_Api_Model_Action_Export {
327
  }
328
 
329
  /**
 
 
330
  * @param Mage_Sales_Model_Order_Item $item
331
  * @param mixed $storeId
332
  * @return Mage_Catalog_Model_Product
333
  */
334
- protected function _getOrderItemParentProduct(Mage_Sales_Model_Order_Item $item, $storeId = null) {
 
335
  if ($item->getParentItemId()) {
336
  // cannot use getParentItem() because we stripped parents from the order
337
  $parentItem = $this->_getOrderItemParent($item);
1
  <?php
2
+ /**
3
+ * ShipStation
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@auctane.com so we can send you a copy immediately.
14
+ *
15
+ * @category Shipping
16
+ * @package Auctane_Api
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Auctane_Api_Model_Action_Export
21
+ {
22
  /**
23
  * Perform an export according to the given request.
24
  *
26
  * @param Mage_Core_Controller_Response_Http $response
27
  * @throws Exception
28
  */
29
+ public function process(Mage_Core_Controller_Request_Http $request, Mage_Core_Controller_Response_Http $response)
30
+ {
31
  // In case store is part of URL path use it to choose config.
32
  $store = $request->get('store');
33
  if ($store)
35
 
36
  $apiConfigCharset = Mage::getStoreConfig("api/config/charset", $store);
37
 
38
+ $startDate = strtotime(urldecode($request->getParam('start_date')));
39
+ $endDate = strtotime(urldecode($request->getParam('end_date')));
40
+ if (!$startDate || !$endDate)
41
  throw new Exception('Start and end dates are required', 400);
42
 
43
  $page = (int) $request->getParam('page');
45
  /* @var $orders Mage_Sales_Model_Mysql4_Order_Collection */
46
  $orders = Mage::getResourceModel('sales/order_collection');
47
  // might use 'created_at' attribute instead
48
+ $from = date('Y-m-d H:i:s', $startDate);
49
+ $end = date('Y-m-d H:i:s', $endDate);
50
+ $orders->addAttributeToFilter('updated_at', array('from' => $from,'to' => $end));
 
51
  if ($store)
52
  $orders->addAttributeToFilter('store_id', $store->getId());
53
  if ($page > 0)
63
  ->setBody($xml->outputMemory(true));
64
  }
65
 
66
+ /**
67
+ * get the size of page
68
+ */
69
+ protected function _getExportPageSize()
70
+ {
71
  return (int) Mage::getStoreConfig('auctaneapi/config/exportPageSize');
72
  }
73
 
74
+ /**
75
+ * Write the ordes in xml file
76
+ *
77
+ * @param Varien_Data_Collection $orders
78
+ * @param XMLWriter $xml
79
+ * @param integer $storeId
80
+ */
81
+ protected function _writeOrders(Varien_Data_Collection $orders, XMLWriter $xml, $storeId = null)
82
+ {
83
  $xml->startElement('Orders');
84
  $xml->writeAttribute('pages', $orders->getLastPageNumber());
85
  foreach ($orders as $order) {
88
  $xml->startElement('Query');
89
  $xml->writeCdata($orders->getSelectSql());
90
  $xml->endElement(); // Query
 
91
  $xml->startElement('Version');
92
  $xml->writeCdata('Magento ' . Mage::getVersion());
93
  $xml->endElement(); // Version
 
94
  $xml->startElement('Extensions');
95
  $xml->writeCdata(Mage::helper('auctaneapi')->getModuleList());
96
  $xml->endElement(); // Extensions
 
97
  $xml->endElement(); // Orders
98
  }
99
 
100
+ /**
101
+ * Write the order in xml file
102
+ *
103
+ * @param Mage_Sales_Model_Order $order
104
+ * @param XMLWriter $xml
105
+ * @param integer $storeId
106
+ */
107
+ protected function _writeOrder(Mage_Sales_Model_Order $order, XMLWriter $xml, $storeId = null)
108
+ {
109
  $history = '';
110
  /* @var $status Mage_Sales_Model_Order_Status */
111
  foreach ($order->getStatusHistoryCollection() as $status) {
118
  if ($history) {
119
  $order->setStatusHistoryText($history);
120
  }
 
121
  /* @var $gift Mage_GiftMessage_Model_Message */
122
  $gift = Mage::helper('giftmessage/message')->getGiftMessage($order->getGiftMessageId());
123
  $order->setGift($gift->isObjectNew() ? 'false' : 'true');
124
+
125
+ $sender = $gift->getSender();
126
+ $recipient = $gift->getRecipient();
127
+
128
  if (!$gift->isObjectNew()) {
129
+ $message = sprintf("From: %s\nTo: %s\nMessage: %s", $sender, $recipient, $gift->getMessage());
130
+ $order->setGiftMessage($message);
131
  }
 
132
  $helper = Mage::helper('auctaneapi');
 
133
  $xml->startElement('Order');
134
+ $price = Auctane_Api_Model_System_Source_Config_Prices::BASE_PRICE;
135
+ if ($helper->getExportPriceType($order->getStoreId()) == $price) {
136
  $helper->fieldsetToXml('base_sales_order', $order, $xml);
137
  } else {
138
  $helper->fieldsetToXml('sales_order', $order, $xml);
139
  }
 
140
  $xml->startElement('Customer');
141
  $xml->startElement('CustomerCode');
142
  $xml->writeCdata($order->getCustomerEmail());
143
  $xml->endElement(); // CustomerCode
 
144
  $xml->startElement('BillTo');
145
  $helper->fieldsetToXml('sales_order_billing_address', $order->getBillingAddress(), $xml);
146
  $xml->endElement(); // BillTo
 
147
  $xml->startElement('ShipTo');
148
  $helper->fieldsetToXml('sales_order_shipping_address', $order->getShippingAddress(), $xml);
149
  $xml->endElement(); // ShipTo
 
150
  $xml->endElement(); // Customer
 
151
  /** add purchase order nubmer */
152
  Mage::helper('auctaneapi')->writePoNumber($order, $xml);
153
 
154
  $xml->startElement('Items');
 
 
 
 
155
  //Check for the bundle child product to import
156
  $intImportChildProducts = Mage::getStoreConfig('auctaneapi/general/import_child_products');
157
+
158
+ /* @var $item Mage_Sales_Model_Order_Item */
159
  foreach ($order->getItemsCollection($helper->getIncludedProductTypes()) as $item) {
160
+ $isBundle = 0;
 
 
 
 
 
 
 
 
 
 
 
161
  //Check for the parent bundle item type
162
  $parentItem = $this->_getOrderItemParent($item);
163
+ if ($parentItem->getProductType() === 'bundle') {
164
+ if ($intImportChildProducts == 2) {
165
  continue;
166
+ } else {
167
+ $isBundle = 1;
168
  }
169
  }
170
+ $this->_orderItem($item, $xml, $storeId, $isBundle);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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'));
178
  if (is_array($discounts)) {
179
  $aggregated = array();
180
  foreach ($discounts as $key => $discount) {
189
  }
190
  }
191
  }
 
192
  $xml->endElement(); // Items
 
193
  $xml->endElement(); // Order
194
  }
195
 
196
+ /**
197
+ * Write the order item in xml file
198
+ *
199
+ * @param Mage_Sales_Model_Order_Item $item
200
+ * @param XMLWriter $xml
201
+ * @param integer $storeId
202
+ * @param boolean $isBundle
203
+ */
204
+ protected function _orderItem(Mage_Sales_Model_Order_Item $item, XMLWriter $xml, $storeId = null, $isBundle = 0)
205
+ {
206
  // inherit some attributes from parent order item
207
  if ($item->getParentItemId() && !$item->getParentItem()) {
208
  $item->setParentItem(Mage::getModel('sales/order_item')->load($item->getParentItemId()));
209
  }
210
+
211
+ $exclude = Mage::helper('auctaneapi')->isExcludedProductType($item->getParentItem()->getProductType());
212
  // only inherit if parent has been hidden
213
+ if ($item->getParentItem() && ($item->getPrice() == 0.000) && $exclude) {
214
  //set the store price of item from parent item
215
  $item->setPrice($item->getParentItem()->getPrice());
216
  //set the base price of item from parent item
217
  $item->setBasePrice($item->getParentItem()->getBasePrice());
218
  }
219
 
220
+ if (!$item->getGiftMessageId() && $item->getParentItem()) {
221
+ $giftId = $item->getParentItem()->getGiftMessageId();
222
+ } else {
223
+ $giftId = $item->getGiftMessageId();
224
+ }
225
  /* @var $gift Mage_GiftMessage_Model_Message */
226
+ $gift = Mage::helper('giftmessage/message')->getGiftMessage($giftId);
 
227
  $item->setGift($gift->isObjectNew() ? 'false' : 'true');
228
+ $sender = $gift->getSender();
229
+ $recipient = $gift->getRecipient();
230
  if (!$gift->isObjectNew()) {
231
+ $message = sprintf("From: %s\nTo: %s\nMessage: %s", $sender, $recipient, $gift->getMessage());
232
+ $item->setGiftMessage($message);
233
  }
234
 
235
+ /* @var $product Mage_Catalog_Model_Product */
236
  $product = Mage::getModel('catalog/product')
237
  ->setStoreId($storeId)
238
  ->load($item->getProductId());
239
+
240
  // inherit some attributes from parent product item
241
  if (($parentProduct = $this->_getOrderItemParentProduct($item, $storeId))) {
242
  if (!$product->getImage() || ($product->getImage() == 'no_selection'))
247
  $product->setThumbnail($parentProduct->getThumbnail());
248
  }
249
 
 
250
  $xml->startElement('Item');
251
 
252
  $helper = Mage::helper('auctaneapi');
253
+ $storeId = Mage::helper('auctaneapi')->getExportPriceType($item->getOrder()->getStoreId());
254
+ if ($storeId == Auctane_Api_Model_System_Source_Config_Prices::BASE_PRICE) {
255
  $helper->fieldsetToXml('base_sales_order_item', $item, $xml, $isBundle);
256
  } else {
257
  $helper->fieldsetToXml('sales_order_item', $item, $xml, $isBundle);
264
  $appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
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 */
282
  }
283
  }
284
  $xml->endElement(); // Options
 
285
  $xml->endElement(); // Item
286
  }
287
 
288
+ /**
289
+ * Write the product attribute used in order
290
+ *
291
+ * @param Mage_Catalog_Model_Product $product
292
+ * @param XMLWriter $xml
293
+ * @param integer $storeId
294
+ */
295
+ protected function _productAttribute(Mage_Catalog_Model_Product $product, XMLWriter $xml, $storeId = null)
296
+ {
297
  // custom attributes are specified in Admin > Configuration > Sales > Auctane Shipstation API
298
  // static because attributes can be cached, they do not change during a request
299
  static $attrs = null;
311
  $value = $product->getAttributeText($attr->getName());
312
  if (is_array($value))
313
  $value = implode(',', $value);
314
+ } else {
 
 
315
  $value = $product->getDataUsingMethod($attr->getName());
316
  }
317
  // fake an item option
324
  }
325
  }
326
 
327
+ /**
328
+ * Write the options used in order
329
+ *
330
+ * @param string $option
331
+ * @param XMLWriter $xml
332
+ */
333
+ protected function _writeOrderItemOption($option, XMLWriter $xml)
334
+ {
335
  $xml->startElement('Option');
336
  Mage::helper('auctaneapi')->fieldsetToXml('sales_order_item_option', $option, $xml);
337
  $xml->endElement(); // Option
343
  * @param Mage_Sales_Model_Order_Item $item
344
  * @return Mage_Sales_Model_Order_Item
345
  */
346
+ protected function _getOrderItemParent(Mage_Sales_Model_Order_Item $item)
347
+ {
348
  if ($item->getParentItem()) {
349
  return $item->getParentItem();
350
  }
356
  }
357
 
358
  /**
359
+ * Get the parent product of current item in a order
360
+ *
361
  * @param Mage_Sales_Model_Order_Item $item
362
  * @param mixed $storeId
363
  * @return Mage_Catalog_Model_Product
364
  */
365
+ protected function _getOrderItemParentProduct(Mage_Sales_Model_Order_Item $item, $storeId = null)
366
+ {
367
  if ($item->getParentItemId()) {
368
  // cannot use getParentItem() because we stripped parents from the order
369
  $parentItem = $this->_getOrderItemParent($item);
app/code/community/Auctane/Api/Model/Action/Shipnotify.php CHANGED
@@ -1,33 +1,50 @@
1
  <?php
2
-
3
- class Auctane_Api_Model_Action_Shipnotify {
4
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  /**
6
  * Perform a notify using POSTed data.
7
- *
8
  * See Auctane API specification.
9
  *
10
  * @param Mage_Core_Controller_Request_Http $request
11
  * @throws Exception
12
  */
13
- public function process(Mage_Core_Controller_Request_Http $request) {
 
14
  // Raw XML is POSTed to this stream
15
  $xml = simplexml_load_file('php://input');
16
 
17
  // load some objects
18
  $order = $this->_getOrder($xml->OrderNumber);
19
- $qtys = $this->_getOrderItemQtys(@$xml->Items, $order);
20
  $shipment = $this->_getOrderShipment($order, $qtys);
21
 
22
  // this is where tracking is actually added
23
  $track = Mage::getModel('sales/order_shipment_track')
24
  ->setNumber($xml->TrackingNumber)
25
  ->setCarrierCode($xml->Carrier)
26
- ->setTitle($xml->Service);
27
  $shipment->addTrack($track);
28
 
29
  // 'NotifyCustomer' must be "true" or "yes" to trigger an email
30
- $notify = filter_var(@$xml->NotifyCustomer, FILTER_VALIDATE_BOOLEAN);
31
 
32
  $capture = filter_var($request->getParam('capture'), FILTER_VALIDATE_BOOLEAN);
33
  if ($capture && $order->canInvoice()) {
@@ -40,16 +57,16 @@ class Auctane_Api_Model_Action_Shipnotify {
40
  }
41
 
42
  // Internal notes are only visible to admin
43
- if (@$xml->InternalNotes) {
44
  $shipment->addComment($xml->InternalNotes);
45
  }
46
  // Customer notes have 'Visible On Frontend' set
47
  if ($notify) {
48
  // if no NotesToCustomer then comment is empty string
49
- $shipment->sendEmail(true, (string) @$xml->NotesToCustomer)
50
  ->setEmailSent(true);
51
  }
52
- if (@$xml->NotesToCustomer) {
53
  $shipment->addComment($xml->NotesToCustomer, $notify, true);
54
  }
55
 
@@ -63,7 +80,7 @@ class Auctane_Api_Model_Action_Shipnotify {
63
  }
64
  $transaction->save();
65
 
66
- if ($order->canInvoice() && !$order->canShip()) { // then silently invoice if order is shipped to move status to "Complete")
67
  $invoice = $order->prepareInvoice();
68
  $invoice->setRequestedCaptureCase($invoice->canCapture() ? 'online' : 'offline')
69
  ->register() // captures & updates order totals
@@ -86,7 +103,8 @@ class Auctane_Api_Model_Action_Shipnotify {
86
  *
87
  * @return string
88
  */
89
- protected function _getInvoiceComment() {
 
90
  return Mage::getStoreConfig('auctaneapi/config/invoiceComment');
91
  }
92
 
@@ -94,7 +112,8 @@ class Auctane_Api_Model_Action_Shipnotify {
94
  * @param string $carrierCode
95
  * @return Mage_Shipping_Model_Carrier_Interface
96
  */
97
- protected function _getCarrier($carrierCode) {
 
98
  $carrierCode = strtolower($carrierCode);
99
  $carrierModel = Mage::getStoreConfig("carriers/{$carrierCode}/model");
100
  if (!$carrierModel)
@@ -112,14 +131,16 @@ class Auctane_Api_Model_Action_Shipnotify {
112
  * @param string $orderIncrementId
113
  * @return Mage_Sales_Model_Order
114
  */
115
- protected function _getOrder($orderIncrementId) {
 
116
  $order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
117
  if ($order->isObjectNew())
118
  throw new Exception("Order '{$orderIncrementId}' does not exist", 400);
119
  return $order;
120
  }
121
 
122
- protected function _getOrderItemQtys(SimpleXMLElement $xmlItems, Mage_Sales_Model_Order $order) {
 
123
  $shipAll = !count((array) $xmlItems);
124
  /* @var $items Mage_Sales_Model_Mysql4_Order_Item_Collection */
125
  $items = $order->getItemsCollection();
@@ -137,7 +158,7 @@ class Auctane_Api_Model_Action_Shipnotify {
137
  continue;
138
  }
139
  // search for item by SKU
140
- @list($xmlItem) = $xmlItems->xpath(sprintf('//Item/SKU[text()="%s"]/..', addslashes($item->getSku())));
141
  if ($xmlItem) {
142
  // store quantity by order item ID, not by SKU
143
  $qtys[$item->getId()] = (float) $xmlItem->Quantity;
@@ -170,7 +191,8 @@ class Auctane_Api_Model_Action_Shipnotify {
170
  * @param array $qtys
171
  * @return Mage_Sales_Model_Order_Shipment
172
  */
173
- protected function _getOrderShipment(Mage_Sales_Model_Order $order, $qtys) {
 
174
  $shipment = $order->prepareShipment($qtys);
175
  $shipment->register();
176
  $order->setIsInProgress(true);
1
  <?php
2
+ /**
3
+ * ShipStation
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@auctane.com so we can send you a copy immediately.
14
+ *
15
+ * @category Shipping
16
+ * @package Auctane_Api
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Auctane_Api_Model_Action_Shipnotify
21
+ {
22
  /**
23
  * Perform a notify using POSTed data.
 
24
  * See Auctane API specification.
25
  *
26
  * @param Mage_Core_Controller_Request_Http $request
27
  * @throws Exception
28
  */
29
+ public function process(Mage_Core_Controller_Request_Http $request)
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);
37
  $shipment = $this->_getOrderShipment($order, $qtys);
38
 
39
  // this is where tracking is actually added
40
  $track = Mage::getModel('sales/order_shipment_track')
41
  ->setNumber($xml->TrackingNumber)
42
  ->setCarrierCode($xml->Carrier)
43
+ ->setTitle(strtoupper($xml->Carrier));
44
  $shipment->addTrack($track);
45
 
46
  // 'NotifyCustomer' must be "true" or "yes" to trigger an email
47
+ $notify = filter_var($xml->NotifyCustomer, FILTER_VALIDATE_BOOLEAN);
48
 
49
  $capture = filter_var($request->getParam('capture'), FILTER_VALIDATE_BOOLEAN);
50
  if ($capture && $order->canInvoice()) {
57
  }
58
 
59
  // Internal notes are only visible to admin
60
+ if ($xml->InternalNotes) {
61
  $shipment->addComment($xml->InternalNotes);
62
  }
63
  // Customer notes have 'Visible On Frontend' set
64
  if ($notify) {
65
  // if no NotesToCustomer then comment is empty string
66
+ $shipment->sendEmail(true, (string) $xml->NotesToCustomer)
67
  ->setEmailSent(true);
68
  }
69
+ if ($xml->NotesToCustomer) {
70
  $shipment->addComment($xml->NotesToCustomer, $notify, true);
71
  }
72
 
80
  }
81
  $transaction->save();
82
 
83
+ if ($order->canInvoice() && !$order->canShip()) {
84
  $invoice = $order->prepareInvoice();
85
  $invoice->setRequestedCaptureCase($invoice->canCapture() ? 'online' : 'offline')
86
  ->register() // captures & updates order totals
103
  *
104
  * @return string
105
  */
106
+ protected function _getInvoiceComment()
107
+ {
108
  return Mage::getStoreConfig('auctaneapi/config/invoiceComment');
109
  }
110
 
112
  * @param string $carrierCode
113
  * @return Mage_Shipping_Model_Carrier_Interface
114
  */
115
+ protected function _getCarrier($carrierCode)
116
+ {
117
  $carrierCode = strtolower($carrierCode);
118
  $carrierModel = Mage::getStoreConfig("carriers/{$carrierCode}/model");
119
  if (!$carrierModel)
131
  * @param string $orderIncrementId
132
  * @return Mage_Sales_Model_Order
133
  */
134
+ protected function _getOrder($orderIncrementId)
135
+ {
136
  $order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
137
  if ($order->isObjectNew())
138
  throw new Exception("Order '{$orderIncrementId}' does not exist", 400);
139
  return $order;
140
  }
141
 
142
+ protected function _getOrderItemQtys(SimpleXMLElement $xmlItems, Mage_Sales_Model_Order $order)
143
+ {
144
  $shipAll = !count((array) $xmlItems);
145
  /* @var $items Mage_Sales_Model_Mysql4_Order_Item_Collection */
146
  $items = $order->getItemsCollection();
158
  continue;
159
  }
160
  // search for item by SKU
161
+ list($xmlItem) = $xmlItems->xpath(sprintf('//Item/SKU[text()="%s"]/..', addslashes($item->getSku())));
162
  if ($xmlItem) {
163
  // store quantity by order item ID, not by SKU
164
  $qtys[$item->getId()] = (float) $xmlItem->Quantity;
191
  * @param array $qtys
192
  * @return Mage_Sales_Model_Order_Shipment
193
  */
194
+ protected function _getOrderShipment(Mage_Sales_Model_Order $order, $qtys)
195
+ {
196
  $shipment = $order->prepareShipment($qtys);
197
  $shipment->register();
198
  $order->setIsInProgress(true);
app/code/community/Auctane/Api/Model/Observer.php CHANGED
@@ -1,4 +1,21 @@
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  class Auctane_Api_Model_Observer
4
  {
@@ -18,7 +35,7 @@ class Auctane_Api_Model_Observer
18
  $address = $observer->getAddress();
19
  $rule = $observer->getRule();
20
 
21
- $discounts = @unserialize($quote->getAuctaneapiDiscounts());
22
 
23
  if (!self::$_counter) {
24
  $discounts = array();
@@ -26,7 +43,7 @@ class Auctane_Api_Model_Observer
26
  self::$_counter++;
27
  }
28
 
29
- if (!isset(self::$_shippingAmountProcessed[$rule->getId()]) && $address->getShippingAmount()) {
30
  $shippingAmount = $address->getShippingAmountForDiscount();
31
  if ($shippingAmount !== null) {
32
  $baseShippingAmount = $address->getBaseShippingAmountForDiscount();
@@ -35,18 +52,17 @@ class Auctane_Api_Model_Observer
35
  }
36
 
37
  //check for discount applied on shipping amount or not
38
- if(!$rule['apply_to_shipping'])
39
  $baseShippingAmount = 0;
40
 
41
-
42
  $baseDiscountAmount = 0;
43
  $rulePercent = min(100, $rule->getDiscountAmount());
44
  switch ($rule->getSimpleAction()) {
45
  case Mage_SalesRule_Model_Rule::TO_PERCENT_ACTION:
46
  $rulePercent = max(0, 100 - $rule->getDiscountAmount());
47
  case Mage_SalesRule_Model_Rule::BY_PERCENT_ACTION:
48
- $baseDiscountAmount = ($baseShippingAmount -
49
- $address->getBaseShippingDiscountAmount()) * $rulePercent / 100;
50
  break;
51
  case Mage_SalesRule_Model_Rule::TO_FIXED_ACTION:
52
  $baseDiscountAmount = $baseShippingAmount - $rule->getDiscountAmount();
@@ -60,43 +76,29 @@ class Auctane_Api_Model_Observer
60
  self::$_cartRules[$rule->getId()] = $rule->getDiscountAmount();
61
  }
62
  if (self::$_cartRules[$rule->getId()] > 0) {
63
- $baseDiscountAmount = min(
64
- $baseShippingAmount - $address->getBaseShippingDiscountAmount(), self::$_cartRules[$rule->getId()]
65
- );
66
  self::$_cartRules[$rule->getId()] -= $baseDiscountAmount;
67
  }
68
  break;
69
  }
70
-
71
- $ruleDiscount = 0;
72
- $left = $baseShippingAmount - ($address->getBaseShippingDiscountAmount() + $baseDiscountAmount);
73
  if ($left >= 0)
74
  $ruleDiscount = $baseDiscountAmount;
75
-
76
- $discounts[$rule->getId() . '-' . $observer->getItem()->getId() . '-' . uniqid()] =
77
- $observer->getResult()->getBaseDiscountAmount() + $ruleDiscount;
 
78
 
79
- $address->setBaseShippingDiscountAmount(min(
80
- $address->getBaseShippingDiscountAmount() + $baseDiscountAmount,
81
- $baseShippingAmount
82
- ));
83
-
84
  self::$_shippingAmountProcessed[$rule->getId()] = true;
85
- }
86
- else {
87
- $discounts[$rule->getId() . '-' . $observer->getItem()->getId() . '-' . uniqid()] =
88
- $observer->getResult()->getBaseDiscountAmount();
89
  }
90
 
91
- $quote->setAuctaneapiDiscounts(@serialize($discounts));
92
  }
93
-
94
- /**
95
- * Export quote discounts info to order
96
- * @param Varien_Event_Observer $observer
97
- */
98
- public function salesConvertQuoteToOrder($observer)
99
- {
100
- $observer->getOrder()->setAuctaneapiDiscounts($observer->getQuote()->getAuctaneapiDiscounts());
101
- }
102
  }
1
  <?php
2
+ /**
3
+ * ShipStation
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@auctane.com so we can send you a copy immediately.
14
+ *
15
+ * @category Shipping
16
+ * @package Auctane_Api
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
 
20
  class Auctane_Api_Model_Observer
21
  {
35
  $address = $observer->getAddress();
36
  $rule = $observer->getRule();
37
 
38
+ $discounts = unserialize($quote->getAuctaneapiDiscounts());
39
 
40
  if (!self::$_counter) {
41
  $discounts = array();
43
  self::$_counter++;
44
  }
45
 
46
+ if (!isset(self::$_shippingAmountProcessed[$rule->getId()]) && $address->getShippingAmount()) {
47
  $shippingAmount = $address->getShippingAmountForDiscount();
48
  if ($shippingAmount !== null) {
49
  $baseShippingAmount = $address->getBaseShippingAmountForDiscount();
52
  }
53
 
54
  //check for discount applied on shipping amount or not
55
+ if (!$rule['apply_to_shipping'])
56
  $baseShippingAmount = 0;
57
 
 
58
  $baseDiscountAmount = 0;
59
  $rulePercent = min(100, $rule->getDiscountAmount());
60
  switch ($rule->getSimpleAction()) {
61
  case Mage_SalesRule_Model_Rule::TO_PERCENT_ACTION:
62
  $rulePercent = max(0, 100 - $rule->getDiscountAmount());
63
  case Mage_SalesRule_Model_Rule::BY_PERCENT_ACTION:
64
+ $shipDiscount = $baseShippingAmount - $address->getBaseShippingDiscountAmount();
65
+ $baseDiscountAmount = ($shipDiscount) * $rulePercent / 100;
66
  break;
67
  case Mage_SalesRule_Model_Rule::TO_FIXED_ACTION:
68
  $baseDiscountAmount = $baseShippingAmount - $rule->getDiscountAmount();
76
  self::$_cartRules[$rule->getId()] = $rule->getDiscountAmount();
77
  }
78
  if (self::$_cartRules[$rule->getId()] > 0) {
79
+ $shipAmount = $baseShippingAmount - $address->getBaseShippingDiscountAmount();
80
+ $baseDiscountAmount = min($shipAmount, self::$_cartRules[$rule->getId()]);
 
81
  self::$_cartRules[$rule->getId()] -= $baseDiscountAmount;
82
  }
83
  break;
84
  }
85
+
86
+ $ruleDiscount = 0;
87
+ $left = $baseShippingAmount - ($address->getBaseShippingDiscountAmount() + $baseDiscountAmount);
88
  if ($left >= 0)
89
  $ruleDiscount = $baseDiscountAmount;
90
+ $discountId = $rule->getId() . '-' . $observer->getItem()->getId() . '-' . uniqid();
91
+ $discounts[$discountId] = $observer->getResult()->getBaseDiscountAmount() + $ruleDiscount;
92
+ $shipDiscount = min($address->getBaseShippingDiscountAmount() + $baseDiscountAmount, $baseShippingAmount);
93
+ $address->setBaseShippingDiscountAmount($shipDiscount);
94
 
 
 
 
 
 
95
  self::$_shippingAmountProcessed[$rule->getId()] = true;
96
+ } else {
97
+ $discountId = $rule->getId() . '-' . $observer->getItem()->getId() . '-' . uniqid();
98
+ $discounts[$discountId] = $observer->getResult()->getBaseDiscountAmount();
 
99
  }
100
 
101
+ $quote->setAuctaneapiDiscounts(serialize($discounts));
102
  }
103
+
 
 
 
 
 
 
 
 
104
  }
app/code/community/Auctane/Api/Model/Server/Adapter.php CHANGED
@@ -12,128 +12,137 @@
12
  * obtain it through the world-wide-web, please send an email
13
  * to license@auctane.com so we can send you a copy immediately.
14
  *
15
- * @category Shipping
16
- * @package Auctane_Api
17
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
  */
19
 
20
  class Auctane_Api_Model_Server_Adapter
21
- extends Varien_Object
22
- implements Mage_Api_Model_Server_Adapter_Interface
23
  {
24
- /**
25
- * Set handler class name for webservice
26
- * Regular handlers are ignored because this adapter only performs one service.
27
- *
28
- * @param string $handler
29
- * @return Auctane_Api_Model_Server_Adapter
30
- */
31
- public function setHandler($handler)
32
- {
33
- $this->setData('handler', $handler);
34
- return $this;
35
- }
36
 
37
- /**
38
- * Retreive handler class name for webservice
39
- *
40
- * @return string
41
- */
42
- public function getHandler()
43
- {
44
- return $this->getData('handler');
45
- }
46
 
47
- /**
48
- * Set webservice api controller
49
- *
50
- * @param Auctane_Api_AuctaneController $controller
51
- * @return Auctane_Api_Model_Server_Adapter
52
- */
53
- public function setController(Mage_Api_Controller_Action $controller)
54
- {
55
- $this->setData('controller', $controller);
56
- return $this;
57
- }
58
 
59
- /**
60
- * Retrive webservice api controller
61
- *
62
- * @return Auctane_Api_AuctaneController
63
- */
64
- public function getController()
65
- {
66
- return $this->getData('controller');
67
- }
68
 
69
- /**
70
- * Run webservice
71
- *
72
- * @return Auctane_Api_Model_Server_Adapter
73
- */
74
- public function run()
75
- {
76
- // Basic HTTP Authentication is used here, check on every request.
77
- // Unlike RPC services there is no session
78
- /* @var $user Mage_Api_Model_User */
79
- $user = Mage::getModel('api/user');
80
 
81
- $sapi_type = php_sapi_name();
82
- if (substr($sapi_type, 0, 3) == 'cgi' && isset($_SERVER['HTTP_AUTHORIZATION'])) {
83
- list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':' , base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));
 
84
  }
85
-
86
- $auth_user = isset($_SERVER['HTTP_SS_AUTH_USER']) ? $_SERVER['HTTP_SS_AUTH_USER'] : @$_SERVER['PHP_AUTH_USER'];
87
- $auth_password = isset($_SERVER['HTTP_SS_AUTH_PW']) ? $_SERVER['HTTP_SS_AUTH_PW'] : @$_SERVER['PHP_AUTH_PW'];
 
 
 
 
 
 
 
 
88
 
89
- if(!$auth_user)
90
- $auth_user = $this->getController()->getRequest()->getParam('SS-UserName');
91
 
92
- if(!$auth_password)
93
- $auth_password = $this->getController()->getRequest()->getParam('SS-Password');
94
 
95
- if (!$user->authenticate($auth_user, $auth_password)) {
96
- header(sprintf('WWW-Authenticate: Basic realm="%s"', Mage::getStoreConfig('auctaneapi/config/realm')));
97
- $this->fault(401, 'Unauthorized');
98
- }
99
 
100
- try { switch ($this->getController()->getRequest()->getParam('action', 'export')) {
101
- case 'export':
102
- $action = Mage::getModel('auctaneapi/action_export');
103
- $action->process($this->getController()->getRequest(),
104
- $this->getController()->getResponse());
105
- break;
106
- case 'shipnotify':
107
- $action = Mage::getModel('auctaneapi/action_shipnotify');
108
- $action->process($this->getController()->getRequest());
109
- // if there hasn't been an error yet the work is done and a "200 OK" is given
110
- break;
111
- }}
112
- catch (Exception $e) {
113
- $this->fault($e->getCode(), $e->getMessage());
114
- }
115
 
116
- return $this;
117
- }
118
 
119
- /**
120
- * Dispatch webservice fault
121
- *
122
- * @param int $code
123
- * @param string $message
124
- */
125
- public function fault($code, $message)
126
- {
127
- if (is_numeric($code) && strlen((int) $code) === 3) {
128
- header(sprintf('%s %03d Fault', $_SERVER['SERVER_PROTOCOL'], $code));
129
- }
130
- header('Content-Type: text/xml; charset=UTF-8');
131
- die('<?xml version="1.0" encoding="UTF-8"?>
132
- <fault>
133
- <faultcode>' . $code . '</faultcode>
134
- <faultstring>' . $message . '</faultstring>
135
- </fault>
136
- ');
137
- }
138
 
139
- }
12
  * obtain it through the world-wide-web, please send an email
13
  * to license@auctane.com so we can send you a copy immediately.
14
  *
15
+ * @category Shipping
16
+ * @package Auctane_Api
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
  */
19
 
20
  class Auctane_Api_Model_Server_Adapter
21
+ extends Varien_Object
22
+ implements Mage_Api_Model_Server_Adapter_Interface
23
  {
24
+ /**
25
+ * Set handler class name for webservice
26
+ * Regular handlers are ignored because this adapter only performs one service.
27
+ *
28
+ * @param string $handler
29
+ * @return Auctane_Api_Model_Server_Adapter
30
+ */
31
+ public function setHandler($handler)
32
+ {
33
+ $this->setData('handler', $handler);
34
+ return $this;
35
+ }
36
 
37
+ /**
38
+ * Retreive handler class name for webservice
39
+ *
40
+ * @return string
41
+ */
42
+ public function getHandler()
43
+ {
44
+ return $this->getData('handler');
45
+ }
46
 
47
+ /**
48
+ * Set webservice api controller
49
+ *
50
+ * @param Auctane_Api_AuctaneController $controller
51
+ * @return Auctane_Api_Model_Server_Adapter
52
+ */
53
+ public function setController(Mage_Api_Controller_Action $controller)
54
+ {
55
+ $this->setData('controller', $controller);
56
+ return $this;
57
+ }
58
 
59
+ /**
60
+ * Retrive webservice api controller
61
+ *
62
+ * @return Auctane_Api_AuctaneController
63
+ */
64
+ public function getController()
65
+ {
66
+ return $this->getData('controller');
67
+ }
68
 
69
+ /**
70
+ * Run webservice
71
+ *
72
+ * @return Auctane_Api_Model_Server_Adapter
73
+ */
74
+ public function run()
75
+ {
76
+ // Basic HTTP Authentication is used here, check on every request.
77
+ // Unlike RPC services there is no session
78
+ /* @var $user Mage_Api_Model_User */
79
+ $user = Mage::getModel('api/user');
80
 
81
+ $sapiType = php_sapi_name();
82
+ if (substr($sapiType, 0, 3) == 'cgi' && isset($_SERVER['HTTP_AUTHORIZATION'])) {
83
+ $httpAuth = explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));
84
+ list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = $httpAuth;
85
  }
86
+
87
+ $phpUser = '';
88
+ if (isset($_SERVER['PHP_AUTH_USER']))
89
+ $phpUser = $_SERVER['PHP_AUTH_USER'];
90
+
91
+ $phpPass = '';
92
+ if (isset($_SERVER['PHP_AUTH_PW']))
93
+ $phpPass = $_SERVER['PHP_AUTH_PW'];
94
+
95
+ $authUser = isset($_SERVER['HTTP_SS_AUTH_USER']) ? $_SERVER['HTTP_SS_AUTH_USER'] : $phpUser;
96
+ $authPassword = isset($_SERVER['HTTP_SS_AUTH_PW']) ? $_SERVER['HTTP_SS_AUTH_PW'] : $phpPass;
97
 
98
+ if (!$authUser)
99
+ $authUser = $this->getController()->getRequest()->getParam('SS-UserName');
100
 
101
+ if (!$authPassword)
102
+ $authPassword = $this->getController()->getRequest()->getParam('SS-Password');
103
 
104
+ if (!$user->authenticate($authUser, $authPassword)) {
105
+ header(sprintf('WWW-Authenticate: Basic realm="%s"', Mage::getStoreConfig('auctaneapi/config/realm')));
106
+ $this->fault(401, 'Unauthorized');
107
+ }
108
 
109
+ try {
110
+ switch ($this->getController()->getRequest()->getParam('action', 'export')) {
111
+ case 'export':
112
+ $action = Mage::getModel('auctaneapi/action_export');
113
+ $action->process($this->getController()->getRequest(), $this->getController()->getResponse());
114
+ break;
115
+ case 'shipnotify':
116
+ $action = Mage::getModel('auctaneapi/action_shipnotify');
117
+ $action->process($this->getController()->getRequest());
118
+ // if there hasn't been an error yet the work is done and a "200 OK" is given
119
+ break;
120
+ }
121
+ } catch (Exception $e) {
122
+ $this->fault($e->getCode(), $e->getMessage());
123
+ }
124
 
125
+ return $this;
126
+ }
127
 
128
+ /**
129
+ * Dispatch webservice fault
130
+ *
131
+ * @param int $code
132
+ * @param string $message
133
+ */
134
+ public function fault($code, $message)
135
+ {
136
+ if (is_numeric($code) && strlen((int) $code) === 3) {
137
+ header(sprintf('%s %03d Fault', $_SERVER['SERVER_PROTOCOL'], $code));
138
+ }
139
+ header('Content-Type: text/xml; charset=UTF-8');
140
+ die('<?xml version="1.0" encoding="UTF-8"?>
141
+ <fault>
142
+ <faultcode>' . $code . '</faultcode>
143
+ <faultstring>' . $message . '</faultstring>
144
+ </fault>
145
+ ');
146
+ }
147
 
148
+ }
app/code/community/Auctane/Api/Model/System/Source/Config/Customattributes.php CHANGED
@@ -12,32 +12,31 @@
12
  * obtain it through the world-wide-web, please send an email
13
  * to license@auctane.com so we can send you a copy immediately.
14
  *
15
- * @category Shipping
16
- * @package Auctane_Api
17
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
  */
19
-
20
  class Auctane_Api_Model_System_Source_Config_Customattributes
21
  {
 
 
 
 
 
22
 
23
- public function toOptionArray()
24
- {
25
- $type = Mage::getModel('eav/entity_type');
26
- $type->loadByCode('catalog_product');
27
-
28
- $attrs = Mage::getResourceModel('eav/entity_attribute_collection');
29
- $attrs->setEntityTypeFilter($type);
30
- $attrs->addFieldToFilter('is_user_defined', true);
31
 
32
- $array = array();
33
- /* @var $attr Mage_Eav_Model_Entity_Attribute */
34
- foreach ($attrs as $id => $attr) {
35
- $array[$id] = array(
36
- 'value' => $attr->getId(),
37
- 'label' => $attr->getFrontendLabel()
38
- );
39
- }
40
- return $array;
41
- }
42
 
43
  }
12
  * obtain it through the world-wide-web, please send an email
13
  * to license@auctane.com so we can send you a copy immediately.
14
  *
15
+ * @category Shipping
16
+ * @package Auctane_Api
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
  */
 
19
  class Auctane_Api_Model_System_Source_Config_Customattributes
20
  {
21
+
22
+ public function toOptionArray()
23
+ {
24
+ $type = Mage::getModel('eav/entity_type');
25
+ $type->loadByCode('catalog_product');
26
 
27
+ $attrs = Mage::getResourceModel('eav/entity_attribute_collection');
28
+ $attrs->setEntityTypeFilter($type);
29
+ $attrs->addFieldToFilter('is_user_defined', true);
 
 
 
 
 
30
 
31
+ $array = array();
32
+ /* @var $attr Mage_Eav_Model_Entity_Attribute */
33
+ foreach ($attrs as $id => $attr) {
34
+ $array[$id] = array(
35
+ 'value' => $attr->getId(),
36
+ 'label' => $attr->getFrontendLabel()
37
+ );
38
+ }
39
+ return $array;
40
+ }
41
 
42
  }
app/code/community/Auctane/Api/Model/System/Source/Config/Import.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  /**
4
  * ShipStation
5
  *
@@ -13,10 +12,11 @@
13
  * obtain it through the world-wide-web, please send an email
14
  * to license@auctane.com so we can send you a copy immediately.
15
  *
16
- * @category Shipping
17
- * @package Auctane_Api
18
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
  */
 
20
  class Auctane_Api_Model_System_Source_Config_Import
21
  {
22
  const YES = 1;
1
  <?php
 
2
  /**
3
  * ShipStation
4
  *
12
  * obtain it through the world-wide-web, please send an email
13
  * to license@auctane.com so we can send you a copy immediately.
14
  *
15
+ * @category Shipping
16
+ * @package Auctane_Api
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
  */
19
+
20
  class Auctane_Api_Model_System_Source_Config_Import
21
  {
22
  const YES = 1;
app/code/community/Auctane/Api/Model/System/Source/Config/Prices.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  /**
4
  * ShipStation
5
  *
@@ -13,10 +12,11 @@
13
  * obtain it through the world-wide-web, please send an email
14
  * to license@auctane.com so we can send you a copy immediately.
15
  *
16
- * @category Shipping
17
- * @package Auctane_Api
18
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
  */
 
20
  class Auctane_Api_Model_System_Source_Config_Prices
21
  {
22
  const STORE_PRICE = 1;
@@ -37,4 +37,4 @@ class Auctane_Api_Model_System_Source_Config_Prices
37
  );
38
  }
39
 
40
- }
1
  <?php
 
2
  /**
3
  * ShipStation
4
  *
12
  * obtain it through the world-wide-web, please send an email
13
  * to license@auctane.com so we can send you a copy immediately.
14
  *
15
+ * @category Shipping
16
+ * @package Auctane_Api
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
  */
19
+
20
  class Auctane_Api_Model_System_Source_Config_Prices
21
  {
22
  const STORE_PRICE = 1;
37
  );
38
  }
39
 
40
+ }
app/code/community/Auctane/Api/controllers/AuctaneController.php CHANGED
@@ -21,6 +21,8 @@ class Auctane_Api_AuctaneController extends Mage_Api_Controller_Action
21
  {
22
  public function indexAction()
23
  {
 
 
24
  $this->_getServer()->init($this, 'auctane')
25
  ->run();
26
  }
21
  {
22
  public function indexAction()
23
  {
24
+ //To allow cross browser compatibility.
25
+ header('Access-Control-Allow-Origin: *');
26
  $this->_getServer()->init($this, 'auctane')
27
  ->run();
28
  }
app/code/community/Auctane/Api/etc/api.xml CHANGED
@@ -26,4 +26,4 @@
26
  </auctane>
27
  </adapters>
28
  </api>
29
- </config>
26
  </auctane>
27
  </adapters>
28
  </api>
29
+ </config>
app/code/community/Auctane/Api/etc/config.xml CHANGED
@@ -1,239 +1,338 @@
1
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
  <!--
3
- * ShipStation
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to license@auctane.com so we can send you a copy immediately.
14
- *
15
- * @category Shipping
16
- * @package Auctane_Api
17
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
- -->
19
  <config>
20
- <modules>
21
- <Auctane_Api>
22
- <version>1.3.26</version>
23
- </Auctane_Api>
24
- </modules>
25
- <global>
26
- <events>
27
- <salesrule_validator_process>
28
- <observers>
29
- <auctaneapi_salesrule_process>
30
- <class>auctaneapi/observer</class>
31
- <method>salesruleProcess</method>
32
- </auctaneapi_salesrule_process>
33
- </observers>
34
- </salesrule_validator_process>
35
- <sales_convert_quote_to_order>
36
- <observers>
37
- <auctaneapi_quote_to_order>
38
- <class>auctaneapi/observer</class>
39
- <method>salesConvertQuoteToOrder</method>
40
- </auctaneapi_quote_to_order>
41
- </observers>
42
- </sales_convert_quote_to_order>
43
- </events>
44
- <helpers>
45
- <auctaneapi>
46
- <class>Auctane_Api_Helper</class>
47
- </auctaneapi>
48
- </helpers>
49
- <models>
50
- <auctaneapi>
51
- <class>Auctane_Api_Model</class>
52
- <resourceModel>auctaneapi_mysql4</resourceModel>
53
- </auctaneapi>
54
- <auctaneapi_mysql4>
55
- <class>Auctane_Api_Model_Mysql4</class>
56
- <entities>
57
- <order_discount>
58
- <table>auctane_api_discounts</table>
59
- </order_discount>
60
- </entities>
61
- </auctaneapi_mysql4>
62
- </models>
63
- <resources>
64
- <!-- Adapters don't need to be specified in modern versions of Magento, but included here for compatibility -->
65
- <auctaneapi_write>
66
- <connection><use>core_write</use></connection>
67
- </auctaneapi_write>
68
- <auctaneapi_read>
69
- <connection><use>core_read</use></connection>
70
- </auctaneapi_read>
71
- <auctaneapi_setup>
72
- <setup>
73
- <module>Auctane_Api</module>
74
- </setup>
75
- </auctaneapi_setup>
76
- </resources>
77
- <fieldsets>
78
- <sales_order>
79
- <increment_id><auctaneapi>OrderNumber</auctaneapi></increment_id>
80
- <created_at><auctaneapi>OrderDate</auctaneapi></created_at>
81
- <status><auctaneapi>OrderStatus</auctaneapi></status>
82
- <updated_at><auctaneapi>LastModified</auctaneapi></updated_at>
83
- <shipping_description><auctaneapi>ShippingMethod</auctaneapi></shipping_description>
84
- <grand_total><auctaneapi>OrderTotal</auctaneapi></grand_total>
85
- <tax_amount><auctaneapi>TaxAmount</auctaneapi></tax_amount>
86
- <shipping_amount><auctaneapi>ShippingAmount</auctaneapi></shipping_amount>
87
- <!-- status_history_text & gift_message are provided by Auctane, it is not standard Magento -->
88
- <status_history_text><auctaneapi>InternalNotes</auctaneapi></status_history_text>
89
- <gift_message><auctaneapi>GiftMessage</auctaneapi></gift_message>
90
- <!-- Change "gift" to "gift_message_available" to show when customer had the choice, even if they did not enter a message. -->
91
- <gift><auctaneapi>Gift</auctaneapi></gift>
92
- </sales_order>
93
- <base_sales_order>
94
- <increment_id><auctaneapi>OrderNumber</auctaneapi></increment_id>
95
- <created_at><auctaneapi>OrderDate</auctaneapi></created_at>
96
- <status><auctaneapi>OrderStatus</auctaneapi></status>
97
- <updated_at><auctaneapi>LastModified</auctaneapi></updated_at>
98
- <shipping_description><auctaneapi>ShippingMethod</auctaneapi></shipping_description>
99
- <base_grand_total><auctaneapi>OrderTotal</auctaneapi></base_grand_total>
100
- <base_tax_amount><auctaneapi>TaxAmount</auctaneapi></base_tax_amount>
101
- <base_shipping_amount><auctaneapi>ShippingAmount</auctaneapi></base_shipping_amount>
102
- <!-- status_history_text & gift_message are provided by Auctane, it is not standard Magento -->
103
- <status_history_text><auctaneapi>InternalNotes</auctaneapi></status_history_text>
104
- <gift_message><auctaneapi>GiftMessage</auctaneapi></gift_message>
105
- <!-- Change "gift" to "gift_message_available" to show when customer had the choice, even if they did not enter a message. -->
106
- <gift><auctaneapi>Gift</auctaneapi></gift>
107
- </base_sales_order>
108
- <sales_order_billing_address>
109
- <name><auctaneapi>Name</auctaneapi></name>
110
- <company><auctaneapi>Company</auctaneapi></company>
111
- <telephone><auctaneapi>Phone</auctaneapi></telephone>
112
- <email><auctaneapi>Email</auctaneapi></email>
113
- </sales_order_billing_address>
114
- <sales_order_shipping_address>
115
- <name><auctaneapi>Name</auctaneapi></name>
116
- <company><auctaneapi>Company</auctaneapi></company>
117
- <telephone><auctaneapi>Phone</auctaneapi></telephone>
118
- <street1><auctaneapi>Address1</auctaneapi></street1>
119
- <street2><auctaneapi>Address2</auctaneapi></street2>
120
- <city><auctaneapi>City</auctaneapi></city>
121
- <region_code><auctaneapi>State</auctaneapi></region_code>
122
- <postcode><auctaneapi>PostalCode</auctaneapi></postcode>
123
- <country_id><auctaneapi>Country</auctaneapi></country_id>
124
- <telephone><auctaneapi>Phone</auctaneapi></telephone>
125
- </sales_order_shipping_address>
126
- <sales_order_item>
127
- <sku><auctaneapi>SKU</auctaneapi></sku>
128
- <name><auctaneapi>Name</auctaneapi></name>
129
- <weight><auctaneapi>Weight</auctaneapi></weight>
130
- <qty_ordered><auctaneapi>Quantity</auctaneapi></qty_ordered>
131
- <price><auctaneapi>UnitPrice</auctaneapi></price>
132
- <!-- gift_message is provided by Auctane, it is not standard Magento -->
133
- <gift><auctaneapi>Gift</auctaneapi></gift>
134
- <gift_message><auctaneapi>GiftMessage</auctaneapi></gift_message>
135
- </sales_order_item>
136
- <base_sales_order_item>
137
- <sku><auctaneapi>SKU</auctaneapi></sku>
138
- <name><auctaneapi>Name</auctaneapi></name>
139
- <weight><auctaneapi>Weight</auctaneapi></weight>
140
- <qty_ordered><auctaneapi>Quantity</auctaneapi></qty_ordered>
141
- <base_price><auctaneapi>UnitPrice</auctaneapi></base_price>
142
- <!-- gift_message is provided by Auctane, it is not standard Magento -->
143
- <gift><auctaneapi>Gift</auctaneapi></gift>
144
- <gift_message><auctaneapi>GiftMessage</auctaneapi></gift_message>
145
- </base_sales_order_item>
146
- <sales_order_item_product>
147
- <!-- Any product attributes listed here will be output as order item fields -->
148
- <!-- Note: Product attributes may change after an order is placed -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
 
150
- <!-- image_url is a built in function, can also be small_image_url or thumbnail_url -->
151
- <image_url><auctaneapi>ImageUrl</auctaneapi></image_url>
152
- <!-- There are many product functions that can be used here such as:
153
- category_id, category_ids, website_ids, formatted_price, url_path -->
154
- </sales_order_item_product>
155
- <sales_order_item_option>
156
- <label><auctaneapi>Name</auctaneapi></label>
157
- <value><auctaneapi>Value</auctaneapi></value>
158
- </sales_order_item_option>
159
- </fieldsets>
160
- <catalog>
161
- <product>
162
- <type>
163
- <!-- Specify any product types here to exclude them from export -->
164
- <configurable>
165
- <auctane_exclude>1</auctane_exclude>
166
- </configurable>
167
- </type>
168
- </product>
169
- </catalog>
170
- <!-- The following node is only necessary for versions of Magento older than 1.3
171
- <rewrite>
172
- <auctaneapi>
173
- <from><![CDATA[#^api/auctane/#]]></from>
174
- <to>auctaneapi/auctane/</to>
175
- </auctaneapi>
176
- </rewrite>
177
- -->
178
- </global>
179
- <adminhtml>
180
- <layout>
181
- <updates>
182
- <auctaneapi>
183
- <file>auctaneapi.xml</file>
184
- </auctaneapi>
185
- </updates>
186
- </layout>
187
- <acl>
188
- <resources>
189
- <admin>
190
- <children>
191
- <system>
192
- <children>
193
- <config>
194
- <children>
195
- <auctaneapi translate="title" module="auctaneapi">
196
- <title>ShipStation</title>
197
- </auctaneapi>
198
- </children>
199
- </config>
200
- </children>
201
- </system>
202
- </children>
203
- </admin>
204
- </resources>
205
- </acl>
206
- </adminhtml>
207
- <frontend>
208
- <routers>
209
- <!-- The following node is only necessary for versions of Magento older than 1.3
210
- <auctaneapi>
211
- <use>standard</use>
212
- <args>
213
- <module>Auctane_Api</module>
214
- <frontName>auctanceapi</frontName>
215
- </args>
216
- </auctaneapi>
217
- -->
218
- <api>
219
- <args>
220
- <modules>
221
- <auctaneapi before="Mage_Api">Auctane_Api</auctaneapi>
222
- </modules>
223
- </args>
224
- </api>
225
- </routers>
226
- </frontend>
227
- <default>
228
- <auctaneapi>
229
- <config>
230
- <realm>Auctane ShipStation</realm>
231
- <exportPageSize>100</exportPageSize>
232
- <invoiceComment>Issued by Auctane ShipStation.</invoiceComment>
 
 
 
 
 
 
 
 
 
 
 
233
  <export_price>1</export_price>
234
  <import_discounts>1</import_discounts>
235
  <import_child_products>1</import_child_products>
236
- </config>
237
- </auctaneapi>
238
- </default>
239
  </config>
1
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
  <!--
3
+ * ShipStation
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@auctane.com so we can send you a copy immediately.
14
+ *
15
+ * @category Shipping
16
+ * @package Auctane_Api
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ -->
19
  <config>
20
+ <modules>
21
+ <Auctane_Api>
22
+ <version>1.3.33</version>
23
+ </Auctane_Api>
24
+ </modules>
25
+ <global>
26
+ <events>
27
+ <salesrule_validator_process>
28
+ <observers>
29
+ <auctaneapi_salesrule_process>
30
+ <class>auctaneapi/observer</class>
31
+ <method>salesruleProcess</method>
32
+ </auctaneapi_salesrule_process>
33
+ </observers>
34
+ </salesrule_validator_process>
35
+ </events>
36
+ <helpers>
37
+ <auctaneapi>
38
+ <class>Auctane_Api_Helper</class>
39
+ </auctaneapi>
40
+ </helpers>
41
+ <models>
42
+ <auctaneapi>
43
+ <class>Auctane_Api_Model</class>
44
+ <resourceModel>auctaneapi_mysql4</resourceModel>
45
+ </auctaneapi>
46
+ </models>
47
+ <resources>
48
+ <!-- Adapters don't need to be specified in modern versions of Magento-->
49
+ <auctaneapi_write>
50
+ <connection>
51
+ <use>core_write</use>
52
+ </connection>
53
+ </auctaneapi_write>
54
+ <auctaneapi_read>
55
+ <connection>
56
+ <use>core_read</use>
57
+ </connection>
58
+ </auctaneapi_read>
59
+ <auctaneapi_setup>
60
+ <setup>
61
+ <module>Auctane_Api</module>
62
+ </setup>
63
+ </auctaneapi_setup>
64
+ </resources>
65
+ <fieldsets>
66
+ <sales_order>
67
+ <increment_id>
68
+ <auctaneapi>OrderNumber</auctaneapi>
69
+ </increment_id>
70
+ <created_at>
71
+ <auctaneapi>OrderDate</auctaneapi>
72
+ </created_at>
73
+ <status>
74
+ <auctaneapi>OrderStatus</auctaneapi>
75
+ </status>
76
+ <updated_at>
77
+ <auctaneapi>LastModified</auctaneapi>
78
+ </updated_at>
79
+ <shipping_description>
80
+ <auctaneapi>ShippingMethod</auctaneapi>
81
+ </shipping_description>
82
+ <grand_total>
83
+ <auctaneapi>OrderTotal</auctaneapi>
84
+ </grand_total>
85
+ <tax_amount>
86
+ <auctaneapi>TaxAmount</auctaneapi>
87
+ </tax_amount>
88
+ <shipping_amount>
89
+ <auctaneapi>ShippingAmount</auctaneapi>
90
+ </shipping_amount>
91
+ <!-- status_history_text & gift_message are provided by Auctane, it is not standard Magento -->
92
+ <status_history_text>
93
+ <auctaneapi>InternalNotes</auctaneapi>
94
+ </status_history_text>
95
+ <gift_message>
96
+ <auctaneapi>GiftMessage</auctaneapi>
97
+ </gift_message>
98
+ <!-- Change "gift" to "gift_message_available" -->
99
+ <gift>
100
+ <auctaneapi>Gift</auctaneapi>
101
+ </gift>
102
+ </sales_order>
103
+ <base_sales_order>
104
+ <increment_id>
105
+ <auctaneapi>OrderNumber</auctaneapi>
106
+ </increment_id>
107
+ <created_at>
108
+ <auctaneapi>OrderDate</auctaneapi>
109
+ </created_at>
110
+ <status>
111
+ <auctaneapi>OrderStatus</auctaneapi>
112
+ </status>
113
+ <updated_at>
114
+ <auctaneapi>LastModified</auctaneapi>
115
+ </updated_at>
116
+ <shipping_description>
117
+ <auctaneapi>ShippingMethod</auctaneapi>
118
+ </shipping_description>
119
+ <base_grand_total>
120
+ <auctaneapi>OrderTotal</auctaneapi>
121
+ </base_grand_total>
122
+ <base_tax_amount>
123
+ <auctaneapi>TaxAmount</auctaneapi>
124
+ </base_tax_amount>
125
+ <base_shipping_amount>
126
+ <auctaneapi>ShippingAmount</auctaneapi>
127
+ </base_shipping_amount>
128
+ <!-- status_history_text & gift_message are provided by Auctane, it is not standard Magento -->
129
+ <status_history_text>
130
+ <auctaneapi>InternalNotes</auctaneapi>
131
+ </status_history_text>
132
+ <gift_message>
133
+ <auctaneapi>GiftMessage</auctaneapi>
134
+ </gift_message>
135
+ <!-- Change "gift" to "gift_message_available" -->
136
+ <gift>
137
+ <auctaneapi>Gift</auctaneapi>
138
+ </gift>
139
+ </base_sales_order>
140
+ <sales_order_billing_address>
141
+ <name>
142
+ <auctaneapi>Name</auctaneapi>
143
+ </name>
144
+ <company>
145
+ <auctaneapi>Company</auctaneapi>
146
+ </company>
147
+ <telephone>
148
+ <auctaneapi>Phone</auctaneapi>
149
+ </telephone>
150
+ <email>
151
+ <auctaneapi>Email</auctaneapi>
152
+ </email>
153
+ </sales_order_billing_address>
154
+ <sales_order_shipping_address>
155
+ <name>
156
+ <auctaneapi>Name</auctaneapi>
157
+ </name>
158
+ <company>
159
+ <auctaneapi>Company</auctaneapi>
160
+ </company>
161
+ <telephone>
162
+ <auctaneapi>Phone</auctaneapi>
163
+ </telephone>
164
+ <street1>
165
+ <auctaneapi>Address1</auctaneapi>
166
+ </street1>
167
+ <street2>
168
+ <auctaneapi>Address2</auctaneapi>
169
+ </street2>
170
+ <city>
171
+ <auctaneapi>City</auctaneapi>
172
+ </city>
173
+ <region_code>
174
+ <auctaneapi>State</auctaneapi>
175
+ </region_code>
176
+ <postcode>
177
+ <auctaneapi>PostalCode</auctaneapi>
178
+ </postcode>
179
+ <country_id>
180
+ <auctaneapi>Country</auctaneapi>
181
+ </country_id>
182
+ <telephone>
183
+ <auctaneapi>Phone</auctaneapi>
184
+ </telephone>
185
+ </sales_order_shipping_address>
186
+ <sales_order_item>
187
+ <sku>
188
+ <auctaneapi>SKU</auctaneapi>
189
+ </sku>
190
+ <name>
191
+ <auctaneapi>Name</auctaneapi>
192
+ </name>
193
+ <weight>
194
+ <auctaneapi>Weight</auctaneapi>
195
+ </weight>
196
+ <qty_ordered>
197
+ <auctaneapi>Quantity</auctaneapi>
198
+ </qty_ordered>
199
+ <price>
200
+ <auctaneapi>UnitPrice</auctaneapi>
201
+ </price>
202
+ <!-- gift_message is provided by Auctane, it is not standard Magento -->
203
+ <gift>
204
+ <auctaneapi>Gift</auctaneapi>
205
+ </gift>
206
+ <gift_message>
207
+ <auctaneapi>GiftMessage</auctaneapi>
208
+ </gift_message>
209
+ </sales_order_item>
210
+ <base_sales_order_item>
211
+ <sku>
212
+ <auctaneapi>SKU</auctaneapi>
213
+ </sku>
214
+ <name>
215
+ <auctaneapi>Name</auctaneapi>
216
+ </name>
217
+ <weight>
218
+ <auctaneapi>Weight</auctaneapi>
219
+ </weight>
220
+ <qty_ordered>
221
+ <auctaneapi>Quantity</auctaneapi>
222
+ </qty_ordered>
223
+ <base_price>
224
+ <auctaneapi>UnitPrice</auctaneapi>
225
+ </base_price>
226
+ <!-- gift_message is provided by Auctane, it is not standard Magento -->
227
+ <gift>
228
+ <auctaneapi>Gift</auctaneapi>
229
+ </gift>
230
+ <gift_message>
231
+ <auctaneapi>GiftMessage</auctaneapi>
232
+ </gift_message>
233
+ </base_sales_order_item>
234
+ <sales_order_item_product>
235
+ <!-- Any product attributes listed here will be output as order item fields -->
236
+ <!-- Note: Product attributes may change after an order is placed -->
237
 
238
+ <!-- image_url is a built in function, can also be small_image_url or thumbnail_url -->
239
+ <image_url>
240
+ <auctaneapi>ImageUrl</auctaneapi>
241
+ </image_url>
242
+ <!-- There are many product functions that can be used here such as:
243
+ category_id, category_ids, website_ids, formatted_price, url_path -->
244
+ </sales_order_item_product>
245
+ <sales_order_item_option>
246
+ <label>
247
+ <auctaneapi>Name</auctaneapi>
248
+ </label>
249
+ <value>
250
+ <auctaneapi>Value</auctaneapi>
251
+ </value>
252
+ </sales_order_item_option>
253
+ <sales_convert_quote>
254
+ <auctaneapi_discounts>
255
+ <to_order>*</to_order>
256
+ </auctaneapi_discounts>
257
+ </sales_convert_quote>
258
+ </fieldsets>
259
+ <catalog>
260
+ <product>
261
+ <type>
262
+ <!-- Specify any product types here to exclude them from export -->
263
+ <configurable>
264
+ <auctane_exclude>1</auctane_exclude>
265
+ </configurable>
266
+ </type>
267
+ </product>
268
+ </catalog>
269
+ <!-- The following node is only necessary for versions of Magento older than 1.3
270
+ <rewrite>
271
+ <auctaneapi>
272
+ <from><![CDATA[#^api/auctane/#]]></from>
273
+ <to>auctaneapi/auctane/</to>
274
+ </auctaneapi>
275
+ </rewrite>
276
+ -->
277
+ </global>
278
+ <adminhtml>
279
+ <layout>
280
+ <updates>
281
+ <auctaneapi>
282
+ <file>auctaneapi.xml</file>
283
+ </auctaneapi>
284
+ </updates>
285
+ </layout>
286
+ <acl>
287
+ <resources>
288
+ <admin>
289
+ <children>
290
+ <system>
291
+ <children>
292
+ <config>
293
+ <children>
294
+ <auctaneapi translate="title" module="auctaneapi">
295
+ <title>ShipStation</title>
296
+ </auctaneapi>
297
+ </children>
298
+ </config>
299
+ </children>
300
+ </system>
301
+ </children>
302
+ </admin>
303
+ </resources>
304
+ </acl>
305
+ </adminhtml>
306
+ <frontend>
307
+ <routers>
308
+ <!-- The following node is only necessary for versions of Magento older than 1.3
309
+ <auctaneapi>
310
+ <use>standard</use>
311
+ <args>
312
+ <module>Auctane_Api</module>
313
+ <frontName>auctanceapi</frontName>
314
+ </args>
315
+ </auctaneapi>
316
+ -->
317
+ <api>
318
+ <args>
319
+ <modules>
320
+ <auctaneapi before="Mage_Api">Auctane_Api</auctaneapi>
321
+ </modules>
322
+ </args>
323
+ </api>
324
+ </routers>
325
+ </frontend>
326
+ <default>
327
+ <auctaneapi>
328
+ <config>
329
+ <realm>Auctane ShipStation</realm>
330
+ <exportPageSize>100</exportPageSize>
331
+ <invoiceComment>Issued by Auctane ShipStation.</invoiceComment>
332
  <export_price>1</export_price>
333
  <import_discounts>1</import_discounts>
334
  <import_child_products>1</import_child_products>
335
+ </config>
336
+ </auctaneapi>
337
+ </default>
338
  </config>
app/etc/modules/Auctane_Api.xml CHANGED
@@ -6,4 +6,4 @@
6
  <codePool>community</codePool>
7
  </Auctane_Api>
8
  </modules>
9
- </config>
6
  <codePool>community</codePool>
7
  </Auctane_Api>
8
  </modules>
9
+ </config>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Auctane_ShipStation</name>
4
- <version>1.3.27</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>2014-11-21</date>
16
- <time>07:38:07</time>
17
- <contents><target name="mageetc"><dir name="modules"><file name="Auctane_Api.xml" hash="a27b534a3ad08732488959f8bdb72a03"/></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="33984bc5e9f69c4dc1326164dac9e115"/></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="46b4c629256bd8e3f03c16755776ae49"/><file name="Shipnotify.php" hash="45733af4236d6b855d7db21f36d68cc1"/></dir><file name="Observer.php" hash="35039bba674a42171212e3a13b7800ca"/><dir name="Server"><file name="Adapter.php" hash="4d70ea8343994966675603c602c1e22c"/></dir><dir name="System"><dir name="Source"><dir name="Config"><file name="Customattributes.php" hash="a10dff7d323044151803ce2e30313615"/><file name="Import.php" hash="f7e86512477d957d2620084faab48327"/><file name="Prices.php" hash="0869f093096b4ff6d2ae24f14468d782"/></dir></dir></dir></dir><dir name="controllers"><file name="AuctaneController.php" hash="b7100ac35e0b3a5d737cde7ef96e19c0"/></dir><dir name="etc"><file name="api.xml" hash="3b6279da3c6a4e5fc71c72f1caf94ae1"/><file name="config.xml" hash="d1ac0a7ac817642d47ba2cb629b6a447"/><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.33</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>2015-07-16</date>
16
+ <time>09:54:49</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="cdf85d4f5e0b8a3f9f7f6697069b62c0"/></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="88363ce44cd46d4ac439468977b63f73"/><file name="Shipnotify.php" hash="06fe0518595c3f9dc616ea4073a4587e"/></dir><file name="Observer.php" hash="60445facb51142a030ea9944872fa98a"/><dir name="Server"><file name="Adapter.php" hash="5ea525614a853bcbd95e6dcfb5b3d587"/></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="7e061e11641656226d2fd7c653c79d4a"/><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>