Tritac_ChannelEngine - Version 5.0.2

Version Notes

* Improved feed generation

Download this release

Release Info

Developer Christiaan de Ridder
Extension Tritac_ChannelEngine
Version 5.0.2
Comparing to
See all releases


Code changes from version 4.6.0 to 5.0.2

app/code/community/Tritac/ChannelEngine/Block/Head.php CHANGED
@@ -4,10 +4,10 @@ class Tritac_ChannelEngine_Block_Head extends Mage_Core_Block_Template
4
  public function getAccountName() {
5
 
6
  $storeId = Mage::app()->getStore()->getId();
7
- $config = Mage::helper('channelengine')->getGeneralConfig();
8
 
9
- if(!isset($config[$storeId]) || empty($config[$storeId]['tenant'])) return false;
10
 
11
- return $config[$storeId]['tenant'];
12
  }
13
  }
4
  public function getAccountName() {
5
 
6
  $storeId = Mage::app()->getStore()->getId();
7
+ $config = Mage::helper('channelengine')->getConfig($storeId);
8
 
9
+ if(!isset($config['general'][$storeId]) || empty($config['general'][$storeId]['tenant'])) return false;
10
 
11
+ return $config['general'][$storeId]['tenant'];
12
  }
13
  }
app/code/community/Tritac/ChannelEngine/Helper/Data.php CHANGED
@@ -1,130 +1,70 @@
1
  <?php
2
- class Tritac_ChannelEngine_Helper_Data extends Mage_Core_Helper_Abstract {
 
 
3
 
4
- const AUTOLOAD_FILENAME = 'autoload.php';
5
- const DEFAULT_PATH = '{{libdir}}/ChannelEngine/vendor';
 
 
 
 
 
6
 
7
- protected $_config = null;
 
 
 
 
 
8
 
9
- /**
10
- * Default expected shipment time (in weekdays)
11
- *
12
- * @var int
13
- */
14
- protected $_defaultTimeToShip = 5;
 
 
 
 
 
15
 
16
- /**
17
- * The location of the vendor directory on the machine the site is running on.
18
- * It always comes without a trailing slash.
19
- *
20
- * @return string
21
- */
22
- public function getVendorDirectoryPath()
23
- {
24
- $path = (string) Mage::getConfig()->getNode('global/composer_autoloader/path');
25
- if (!$path) {
26
- $path = self::DEFAULT_PATH;
27
- }
28
- $path = str_replace('/', DS, $path);
29
- $path = str_replace('{{basedir}}', Mage::getBaseDir(), $path);
30
- $path = str_replace('{{libdir}}', Mage::getBaseDir('lib'), $path);
31
- $path = rtrim($path, DS);
32
- return realpath($path);
33
- }
34
 
35
- /**
36
- * @param string|null $path Path to vendor directory. Pass null to use the configured value.
37
- * @param string|null $filename Filename of autoload file. Pass null to use the default (autoload.php).
38
- */
39
- public function registerAutoloader($path = null, $filename = null)
40
- {
41
- if ($path === null) {
42
- $path = $this->getVendorDirectoryPath();
43
- }
44
- if ($filename === null) {
45
- $filename = self::AUTOLOAD_FILENAME;
46
- }
47
- if (file_exists($path . DS . $filename)) {
48
- require_once($path . DS . $filename);
49
- }
50
- }
51
 
52
- /**
53
- * Get extension general config
54
- *
55
- * @param null $storeId
56
- * @return array
57
- */
58
- public function getConfig($storeId = null)
59
- {
60
- if(empty($this->_config)) {
61
- foreach(Mage::app()->getStores() as $_store) {
62
- $this->_config[$_store->getId()] = Mage::getStoreConfig('channelengine', $_store->getId());
63
- }
64
- }
65
 
66
- if($storeId) {
67
- if(!isset($this->_config[$storeId])) {
68
- return false;
69
- }else{
70
- return $this->_config[$storeId];
71
- }
72
- }
73
 
74
- return $this->_config;
75
- }
 
76
 
77
- /**
78
- * Get extension general config
79
- *
80
- * @return array
81
- */
82
- public function getGeneralConfig()
83
- {
84
- $result = array();
85
-
86
- foreach($this->getConfig() as $storeId => $storeConfig)
87
- {
88
- if(isset($storeConfig['general']))
89
- {
90
- $result[$storeId] = $storeConfig['general'];
91
- }
92
- }
93
- return $result;
94
- }
95
-
96
- /**
97
- * Check required general config data
98
- *
99
- * @param null $storeId
100
- * @return bool
101
- */
102
- public function checkGeneralConfig($storeId = null)
103
- {
104
- $config = Mage::getStoreConfig('channelengine/general', $storeId);
105
- return (empty($config['api_key']) || empty($config['tenant'])) ? false : true;
106
- }
107
-
108
- /**
109
- * Get store expected shipment text
110
- *
111
- * @param $storeId
112
- * @return DateTime
113
- */
114
- public function getExpectedShipmentDate($storeId)
115
- {
116
- $config = $this->getConfig($storeId);
117
-
118
- $weekdays = (int) $config['optional']['expected_date'];
119
- if($weekdays <= 0)
120
- $weekdays = $this->_defaultTimeToShip;
121
-
122
- $expectedDate = date("Y-m-d", strtotime("{$weekdays} weekdays"));
123
- return new DateTime($expectedDate);
124
- }
125
-
126
- public function getExtensionVersion()
127
- {
128
- return (string) Mage::getConfig()->getNode()->modules->Tritac_ChannelEngine->version;
129
- }
130
  }
1
  <?php
2
+ class Tritac_ChannelEngine_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+ private $config = array();
5
 
6
+ public function __construct()
7
+ {
8
+ foreach(Mage::app()->getStores() as $store)
9
+ {
10
+ $this->config[$store->getId()] = Mage::getStoreConfig('channelengine', $store->getId());
11
+ }
12
+ }
13
 
14
+ /**
15
+ * Default expected shipment time (in weekdays)
16
+ *
17
+ * @var int
18
+ */
19
+ protected $_defaultTimeToShip = 5;
20
 
21
+
22
+ /**
23
+ * Get extension general config
24
+ *
25
+ * @param null $storeId
26
+ * @return array
27
+ */
28
+ public function getConfig($storeId = null)
29
+ {
30
+ if(is_null($storeId)) return $this->config;
31
+ if(!isset($this->config[$storeId])) return false;
32
 
33
+ return $this->config[$storeId];
34
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
+ /**
37
+ * Check required general config data
38
+ *
39
+ * @param null $storeId
40
+ * @return bool
41
+ */
42
+ public function isConnected($storeId)
43
+ {
44
+ $config = $this->getConfig($storeId);
45
+ return (empty($config['general']['api_key']) || empty($config['general']['tenant'])) ? false : true;
46
+ }
 
 
 
 
 
47
 
48
+ /**
49
+ * Get store expected shipment text
50
+ *
51
+ * @param $storeId
52
+ * @return DateTime
53
+ */
54
+ public function getExpectedShipmentDate($storeId)
55
+ {
56
+ $config = $this->getConfig($storeId);
 
 
 
 
57
 
58
+ $weekdays = (int) $config['optional']['expected_date'];
59
+ if($weekdays <= 0)
60
+ $weekdays = $this->_defaultTimeToShip;
 
 
 
 
61
 
62
+ $expectedDate = date("Y-m-d", strtotime("{$weekdays} weekdays"));
63
+ return new DateTime($expectedDate);
64
+ }
65
 
66
+ public function getExtensionVersion()
67
+ {
68
+ return (string) Mage::getConfig()->getNode()->modules->Tritac_ChannelEngine->version;
69
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  }
app/code/community/Tritac/ChannelEngine/Helper/Feed.php ADDED
@@ -0,0 +1,528 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Tritac_ChannelEngine_Helper_Feed extends Mage_Core_Helper_Abstract {
4
+
5
+ private $helper;
6
+ private $feedDir;
7
+ private $stores;
8
+
9
+ const ATTRIBUTES_LIMIT = 30;
10
+
11
+ public function __construct()
12
+ {
13
+ $this->feedDir = Mage::getBaseDir('media') . DS . 'channelengine' . DS;
14
+ $this->stores = [];
15
+ $this->config = [];
16
+
17
+ $this->helper = Mage::helper('channelengine');
18
+ $this->stores = Mage::app()->getStores();
19
+ $this->config = $this->helper->getConfig();
20
+
21
+ //Mage::app()->loadAreaPart(Mage_Core_Model_App_Area::AREA_FRONTEND, Mage_Core_Model_App_Area::PART_EVENTS);
22
+ }
23
+
24
+ /**
25
+ * Generate products feed for ChannelEngine
26
+ */
27
+ public function generateFeeds()
28
+ {
29
+ @set_time_limit(15 * 60);
30
+
31
+ foreach($this->stores as $store)
32
+ {
33
+ $this->generateFeed($store, $categories);
34
+ }
35
+
36
+ return true;
37
+ }
38
+
39
+ public function generateFeed($store, $categoriesArray)
40
+ {
41
+ Mage::app()->setCurrentStore($store);
42
+ $storeId = $store->getId();
43
+ $config = $this->config[$storeId];
44
+
45
+ if(!$this->helper->isConnected($storeId)) return;
46
+
47
+ $memoryUsage = memory_get_usage();
48
+ $tenant = $config['general']['tenant'];
49
+
50
+ $name = $tenant.'_products.xml';
51
+ $file = $this->feedDir . DS . $name;
52
+
53
+ $date = date('c');
54
+
55
+ $io = new Varien_Io_File();
56
+ $io->setAllowCreateFolders(true);
57
+ $io->open(array('path' => $path));
58
+ $io->streamOpen($file, 'w+');
59
+ $io->streamLock(true);
60
+ $io->streamWrite('<?xml version="1.0" encoding="UTF-8"?>' . "\n");
61
+ $io->streamWrite('<Products xmlns:xsd="http://www.w3.org/2001/XMLSchema"
62
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" GeneratedAt="'.$date.'">' . "\n");
63
+
64
+ $collection = Mage::getResourceModel('catalog/product_collection');
65
+ $flatCatalogEnabled = $collection->isEnabledFlat();
66
+
67
+ $attributesInfo = $this->getAttributes($storeId, $flatCatalogEnabled);
68
+ $attributesToSelect = $attributesInfo['attributesToSelect'];
69
+ $visibleAttributes = $attributesInfo['visibleAttributes'];
70
+ $systemAttributes = $attributesInfo['systemAttributes'];
71
+
72
+ $categories = $this->getCategories($store);
73
+ $options = $this->getOptions();
74
+
75
+ // Make sure to create a new instance of our collection after setting the store ID
76
+ // when using the flat catalog. Otherwise store ID will be ignored. This is a bug in magento.
77
+ // https://magento.stackexchange.com/a/25908
78
+ if($flatCatalogEnabled)
79
+ {
80
+ // The flat product entity has a setStoreId method, the regular entity does not have one
81
+ $collection->getEntity()->setStoreId($storeId);
82
+ $collection = Mage::getResourceModel('catalog/product_collection');
83
+ }
84
+
85
+ // Only get simple products,
86
+ $collection->addAttributeToSelect($attributesToSelect, 'left')
87
+ ->addFieldToFilter('type_id', array('in' => array('simple')))
88
+ ->addStoreFilter($store)
89
+ ->addAttributeToFilter('status', 1)
90
+ ->addAttributeToFilter('visibility', array('in' => array(
91
+ Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG,
92
+ Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_SEARCH,
93
+ Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)))
94
+ ->addAttributeToSort('entity_id', 'DESC');
95
+
96
+ // Add qty and category fields to select
97
+ $collection->getSelect()
98
+ ->joinLeft(
99
+ array('csi' => Mage::getSingleton('core/resource')->getTableName('cataloginventory/stock_item')),
100
+ 'e.entity_id = csi.product_id',
101
+ array('qty' => 'COALESCE(qty, 0)')
102
+ )
103
+ ->joinLeft(
104
+ array('ccp' => Mage::getSingleton('core/resource')->getTableName('catalog/category_product_index')),
105
+ 'e.entity_id = ccp.product_id AND ccp.store_id = ' . $storeId . ' AND is_parent = 1',
106
+ array('category_id' => 'MAX(`ccp`.`category_id`)')
107
+ )
108
+ ->group('e.entity_id');
109
+
110
+ // Iterate all simple products, except the invisible ones (they are most probably children of configurable products)
111
+ $this->iterateProductCollection($io, $categories, $visibleAttributes, $systemAttributes, $attributesToSelect, $options, $store, $memoryUsage, $collection->getSelect(), false);
112
+
113
+ // Update the query to select configurable products
114
+ $collection->clear()->getSelect()->reset('where');
115
+ $collection->addFieldToFilter('type_id', array('in' => array('configurable')))
116
+ ->addStoreFilter($store)
117
+ ->addAttributeToFilter('status', 1)
118
+ ->addAttributeToFilter('visibility', array('in' => array(
119
+ Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG,
120
+ Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_SEARCH,
121
+ Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)))
122
+ ->addAttributeToSort('entity_id', 'DESC');
123
+
124
+ $this->iterateProductCollection($io, $categories, $visibleAttributes, $systemAttributes, $attributesToSelect, $options, $store, $memoryUsage, $collection->getSelect(), true);
125
+
126
+ $io->streamWrite('</Products>');
127
+ $io->streamUnlock();
128
+ $io->streamClose();
129
+
130
+ return true;
131
+ }
132
+
133
+ public function iterateProductsCallback($args)
134
+ {
135
+ $io = $args['io'];
136
+ $row = $args['row'];
137
+ $attributes = $args['visibleAttributes'];
138
+ $systemAttributes = $args['systemAttributes'];
139
+ $attributesToSelect = $args['attributesToSelect'];
140
+ $categories = $args['categories'];
141
+ $options = $args['options'];
142
+ $store = $args['store'];
143
+ $isConfigurable = $args['isConfigurable'];
144
+
145
+ $storeId = $store->getId();
146
+ $productResource = Mage::getResourceModel('catalog/product');
147
+ $product = Mage::getModel('catalog/product');
148
+ $product->setData($row);
149
+
150
+ $config = $this->config[$storeId];
151
+
152
+ $mediaGalleryAttr = $productResource->getAttribute('media_gallery');
153
+ $mediaGalleryBackend = $mediaGalleryAttr->getBackend();
154
+ $mediaGalleryBackend->afterLoad($product);
155
+
156
+ $additional = array(
157
+ 'systemAttributes' => $systemAttributes,
158
+ 'attributes' => $attributes
159
+ );
160
+
161
+
162
+ $productData = $product->getData();
163
+ if(!empty($config['general']['gtin'])) $productData['gtin'] = $productData[$config['general']['gtin']];
164
+ $productData['url'] = $product->getProductUrl();
165
+ $productData['images'] = $product->getMediaGalleryImages();
166
+ $productData['price'] = $product->getFinalPrice();
167
+
168
+ if(isset($options[$productData['entity_id']]))
169
+ {
170
+ $productData['parent_id'] = $productData['entity_id'];
171
+
172
+ foreach($options[$productData['entity_id']] as $option)
173
+ {
174
+ if(isset($option['values']))
175
+ {
176
+ foreach($option['values'] as $value)
177
+ {
178
+ $variantData = $productData;
179
+ $variantData['id'] = $variantData['entity_id'] . '_' . $option['option_id'] . '_' . $value->getId();
180
+
181
+ if(isset($value['price']))
182
+ {
183
+ if($value['price_type'] == 'fixed')
184
+ {
185
+ $variantData['price'] = $variantData['price'] + $value['price'];
186
+ }
187
+ elseif($value['price_type'] == 'percent')
188
+ {
189
+ $variantData['price'] = $variantData['price'] + ($variantData['price'] * $value['price'] / 100);
190
+ }
191
+ }
192
+
193
+ $additional['title'] = str_replace(' ', '_', $option['default_title']);
194
+ $additional['value'] = $value->getDefaultTitle();
195
+
196
+ $this->writeProduct($io, $variantData, $categories, $additional);
197
+ }
198
+ }
199
+ else
200
+ {
201
+ $variantData = $productData;
202
+ $variantData['id'] = $variantData['entity_id'] . '_' . $option['option_id'];
203
+ $additional['title'] = str_replace(' ', '_', $option['default_title']);
204
+ $additional['value'] = '';
205
+ if(isset($option['price']))
206
+ {
207
+ if($option['price_type'] == 'fixed')
208
+ {
209
+ $variantData['price'] = $variantData['price'] + $option['price'];
210
+ }
211
+ elseif($option['price_type'] == 'percent')
212
+ {
213
+ $variantData['price'] = $variantData['price'] + ($variantData['price'] * $option['price'] / 100);
214
+ }
215
+ }
216
+ $this->writeProduct($io, $variantData, $categories, $additional);
217
+ }
218
+ }
219
+ }
220
+ else
221
+ {
222
+ $productData['id'] = $productData['entity_id'];
223
+
224
+ $this->writeProduct($io, $productData, $categories, $additional);
225
+ }
226
+
227
+ if(!$isConfigurable) return;
228
+
229
+ $productAttributeOptions = $product->getTypeInstance(true)->getConfigurableAttributesAsArray($product);
230
+
231
+ $superAttributes = array();
232
+ foreach($productAttributeOptions as $superAttribute)
233
+ {
234
+ foreach($superAttribute['values'] as $value)
235
+ {
236
+ $superAttributes[$superAttribute['attribute_code']][$value['value_index']] = $value;
237
+ }
238
+ }
239
+
240
+ $childProducts = Mage::getModel('catalog/product_type_configurable')
241
+ ->getUsedProductCollection($product)
242
+ ->addAttributeToSelect($attributesToSelect)
243
+ ->getItems();
244
+
245
+ foreach($childProducts as $child)
246
+ {
247
+ $childData = $child->getData();
248
+
249
+ $childData['id'] = $childData['entity_id'];
250
+ $childData['parent_id'] = $productData['id'];
251
+ //$childData['price'] = $productData['price'];
252
+ $childData['url'] = $productData['url'];
253
+ $childData['description'] = $productData['description'];
254
+
255
+ if(!isset($childData['images'])) {
256
+ $childData['images'] = $productData['images'];
257
+ }
258
+
259
+ if(!isset($childData['category_id'])) $childData['category_id'] = $productData['category_id'];
260
+
261
+ if(isset($childData['stock_item']) && $childData['stock_item'] !== null) {
262
+ $stock = $childData['stock_item']->getData();
263
+ $childData['qty'] = $stock['qty'];
264
+ }
265
+
266
+ if(!isset($childData['image']) || $childData['image'] == 'no_slection') $childData['image'] = $productData['image'];
267
+
268
+ foreach($superAttributes as $code => $superAttribute)
269
+ {
270
+ if(isset($childData[$code]))
271
+ {
272
+ $priceValue = $superAttribute[$childData[$code]]['pricing_value'];
273
+ if($superAttribute[$childData[$code]]['is_percent']) {
274
+ $newPrice = $childData['price'] + $childData['price'] * $priceValue / 100;
275
+ } else {
276
+ $newPrice = $childData['price'] + $priceValue;
277
+ }
278
+ $childData['price'] = $newPrice;
279
+ }
280
+ }
281
+
282
+ $this->writeProduct($io, $childData, $categories, $additional);
283
+ }
284
+ }
285
+
286
+ private function writeProduct($io, $product, $categories, $additional = null)
287
+ {
288
+ $io->streamWrite('<Product>');
289
+ $io->streamWrite('<Id>' . $product['id'] . '</Id>');
290
+
291
+ // Add group code with product id if product have custom options
292
+ if(isset($product['group_code'])) {
293
+ $io->streamWrite('<GroupCode><![CDATA[' . $product['group_code'] . ']]></GroupCode>');
294
+ }
295
+
296
+ if(isset($product['parent_id'])) {
297
+ $io->streamWrite('<ParentId><![CDATA[' . $product['parent_id'] . ']]></ParentId>');
298
+ }
299
+
300
+ $io->streamWrite('<Type><![CDATA[' . $product['type_id'] . ']]></Type>');
301
+ $io->streamWrite('<Name><![CDATA[' . $product['name'] . ']]></Name>');
302
+ $io->streamWrite('<Description><![CDATA['. $this->stripHtml($product['description']) . ']]></Description>');
303
+ $io->streamWrite('<Price><![CDATA['. $product['price'] . ']]></Price>');
304
+ $io->streamWrite('<ListPrice><![CDATA[' . $product['msrp'] . ']]></ListPrice>');
305
+ $io->streamWrite('<PurchasePrice><![CDATA[' . $product['cost'] . ']]></PurchasePrice>');
306
+
307
+ // Add product stock qty
308
+ $io->streamWrite('<Stock><![CDATA[' . $product['qty'] . ']]></Stock>');
309
+
310
+ // Add product SKU and GTIN
311
+ $io->streamWrite('<SKU><![CDATA[' . $product['sku'] . ']]></SKU>');
312
+ if(!empty($product['gtin'])) {
313
+ $io->streamWrite('<GTIN><![CDATA[' . $product['gtin'] . ']]></GTIN>');
314
+ }
315
+
316
+ // VAT and Shipping Time are pre configured in extension settings
317
+ if(!empty($this->_config[$product['store_id']]['optional']['vat_rate'])) {
318
+ $vat = $this->_config[$product['store_id']]['optional']['vat_rate'];
319
+ $io->streamWrite('<VAT><![CDATA[".$vat."]]></VAT>');
320
+ }
321
+
322
+ $shippingTime = ($product['qty'] > 0) ? $this->_config[$product['store_id']]['optional']['shipping_time'] : $this->_config[$product['store_id']]['optional']['shipping_time_oos'];
323
+
324
+ if($shippingTime) {
325
+ $io->streamWrite('<ShippingTime><![CDATA[' . $shippingTime . ']]></ShippingTime>');
326
+ }
327
+
328
+ $io->streamWrite('<Url><![CDATA[' . $product['url'] . ']]></Url>');
329
+ $images = $product['images'];
330
+ $i = 0;
331
+
332
+ foreach($product['images'] as $image) {
333
+ if($i == 0){
334
+ $io->streamWrite('<ImageUrl><![CDATA[' . $image->getUrl() . ']]></ImageUrl>');
335
+ } else {
336
+ $io->streamWrite('<ImageUrl' . $i .'><![CDATA[' . $image->getUrl() . ']]></ImageUrl' . $i . '>');
337
+ }
338
+ $i++;
339
+ }
340
+
341
+ // Prepare category path
342
+ $io->streamWrite('<CategoryId><![CDATA[' . $product['category_id'] . ']]></CategoryId>');
343
+ if(!empty($product['category_id']) && !empty($categories)) {
344
+ $categoryId = $product['category_id'];
345
+ $categoryPathIds = explode('/', $categories[$categoryId]['path']);
346
+ $categoryPath = null;
347
+ foreach($categoryPathIds as $id) {
348
+ if($id > 2) {
349
+ $categoryPath .= ($categoryPath) ? ' > ':'';
350
+ $categoryPath .= $categories[$id]['name'];
351
+ }
352
+ }
353
+ if($categoryPath) {
354
+ $io->streamWrite('<Category><![CDATA[' . $categoryPath . ']]></Category>');
355
+ }
356
+ }
357
+
358
+ if(isset($additional['title']) && isset($additional['value']))
359
+ {
360
+ $title = preg_replace("/[^a-zA-Z0-9]/", "", $additional['title']);
361
+ $io->streamWrite(sprintf("<%1\$s><![CDATA[%2\$s]]></%1\$s>",
362
+ $title,
363
+ $additional['value']
364
+ ));
365
+ }
366
+
367
+ /*
368
+ * Prepare product visible attributes
369
+ */
370
+ if(isset($additional['attributes']))
371
+ {
372
+ $io->streamWrite('<Attributes>');
373
+
374
+ foreach($additional['attributes'] as $code => $attribute)
375
+ {
376
+
377
+ if(isset($product[$code]) && !in_array($code, $additional['systemAttributes']))
378
+ {
379
+ $io->streamWrite('<' . $code . '>');
380
+
381
+ if(!empty($attribute['values']))
382
+ {
383
+ $io->streamWrite('<![CDATA[' . $attribute['values'][$product[$code]] . ']]>');
384
+ }
385
+ else
386
+ {
387
+ $io->streamWrite('<![CDATA[' . $product[$code] . ']]>');
388
+ }
389
+
390
+ $io->streamWrite('</' . $code . '>');
391
+ }
392
+ }
393
+ $io->streamWrite('</Attributes>');
394
+ }
395
+
396
+ $io->streamWrite('</Product>');
397
+ }
398
+
399
+ private function iterateProductCollection($io, $categories, $visibleAttributes, $systemAttributes, $attributesToSelect, $options, $store, $memoryUsage, $select, $isConfigurable)
400
+ {
401
+ Mage::getSingleton('core/resource_iterator')->walk(
402
+ $select,
403
+ array(array($this, 'iterateProductsCallback')),
404
+ array(
405
+ 'io' => $io,
406
+ 'categories' => $categories,
407
+ 'visibleAttributes' => $visibleAttributes,
408
+ 'systemAttributes' => $systemAttributes,
409
+ 'attributesToSelect' => $attributesToSelect,
410
+ 'options' => $options,
411
+ 'store' => $store,
412
+ 'startMemory' => $memoryUsage,
413
+ 'isConfigurable' => $isConfigurable
414
+ )
415
+ );
416
+ }
417
+
418
+ private function getCategories($store)
419
+ {
420
+ $categoryArray = array();
421
+ $parent = $store->getRootCategoryId();
422
+
423
+ $rootCategory = Mage::getModel('catalog/category')->load($parent);
424
+
425
+ if ($rootCategory->getId())
426
+ {
427
+ $categoryArray[$rootCategory->getId()] = $rootCategory->getData();
428
+ $storeCategories = $rootCategory->getCategories($parent, 0, true, true, true);
429
+ foreach($storeCategories as $category)
430
+ {
431
+ $categoryArray[$category->getId()] = $category->getData();
432
+ }
433
+ }
434
+
435
+ return $categoryArray;
436
+ }
437
+
438
+ private function getOptions()
439
+ {
440
+ $optionsArray = array();
441
+ $options = Mage::getModel('catalog/product_option')
442
+ ->getCollection()
443
+ ->addTitleToResult($storeId)
444
+ ->addPriceToResult($storeId)
445
+ ->addValuesToResult($storeId)
446
+ ->setOrder('sort_order', 'asc');
447
+
448
+ foreach($options as $options)
449
+ {
450
+ $productId = $options->getProductId();
451
+ $optionId = $options->getOptionId();
452
+ $optionsArray[$productId][$optionId] = $options->getData();
453
+ if($options->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DROP_DOWN)
454
+ {
455
+ $optionsArray[$productId][$optionId]['values'] = $options->getValues();
456
+ }
457
+ }
458
+ return $optionsArray;
459
+ }
460
+
461
+ private function getAttributes($storeId, $flatCatalogEnabled)
462
+ {
463
+ $visibleAttributes = array();
464
+ $systemAttributes = array();
465
+
466
+ $attributesToSelect = array(
467
+ 'sku',
468
+ 'name',
469
+ 'manufacturer',
470
+ 'description',
471
+ 'image',
472
+ 'url_key',
473
+ 'price',
474
+ 'cost',
475
+ 'special_price',
476
+ 'special_from_date',
477
+ 'special_to_date',
478
+ 'visibility',
479
+ 'msrp'
480
+ );
481
+
482
+ if(!empty($this->config[$storeId]['general']['gtin'])) $attributesToSelect[] = $this->config[$storeId]['general']['gtin'];
483
+ $attributes = Mage::getResourceModel('catalog/product_attribute_collection');
484
+
485
+ $totalAttributes = count($attributesToSelect);
486
+
487
+ foreach($attributes as $attribute)
488
+ {
489
+ $code = $attribute->getAttributeCode();
490
+ $isFlat = $flatCatalogEnabled && $attribute->getUsedInProductListing();
491
+ $isRegular = !$flatCatalogEnabled && $attribute->getIsVisible() && $attribute->getIsVisibleOnFront();
492
+
493
+ // Only allow a subset of system attributes
494
+ $isSystem = !$attribute->getIsUserDefined();
495
+
496
+ if(!$isFlat && !$isRegular || ($isRegular && $totalAttributes >= self::ATTRIBUTES_LIMIT)) continue;
497
+
498
+ $visibleAttributes[$code]['label'] = $attribute->getFrontendLabel();
499
+ foreach($attribute->getSource()->getAllOptions(false) as $option)
500
+ {
501
+ $visibleAttributes[$code]['values'][$option['value']] = $option['label'];
502
+ }
503
+
504
+ if($isSystem)
505
+ {
506
+ $systemAttributes[] = $code;
507
+ continue;
508
+ }
509
+
510
+ if(in_array($code, $attributesToSelect)) continue;
511
+
512
+ $attributesToSelect[] = $code;
513
+ $totalAttributes++;
514
+ }
515
+
516
+ return array(
517
+ 'systemAttributes' => $systemAttributes,
518
+ 'visibleAttributes' => $visibleAttributes,
519
+ 'attributesToSelect' => $attributesToSelect
520
+ );
521
+ }
522
+
523
+ private function stripHtml($string)
524
+ {
525
+ $string = preg_replace('/\<br(\s*)?\/?\>/i', "\n", $string);
526
+ return strip_tags($string);
527
+ }
528
+ }
app/code/community/Tritac/ChannelEngine/Model/Loader.php CHANGED
@@ -4,10 +4,14 @@
4
  */
5
  class Tritac_ChannelEngine_Model_Loader
6
  {
 
 
 
7
  /**
8
  * @var bool
9
  */
10
  protected static $added = false;
 
11
  /**
12
  * Register the Composer autoloader
13
  * @param Varien_Event_Observer $observer
@@ -15,10 +19,44 @@ class Tritac_ChannelEngine_Model_Loader
15
  public function addComposerAutoloader(Varien_Event_Observer $observer)
16
  {
17
  if (self::$added === false) {
18
- /** @var $helper Tritac_ChannelEngine_Helper_Data */
19
- $helper = Mage::helper('channelengine');
20
- $helper->registerAutoloader();
21
  self::$added = true;
22
  }
23
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  }
4
  */
5
  class Tritac_ChannelEngine_Model_Loader
6
  {
7
+ const AUTOLOAD_FILENAME = 'autoload.php';
8
+ const DEFAULT_PATH = '{{libdir}}/ChannelEngine/vendor';
9
+
10
  /**
11
  * @var bool
12
  */
13
  protected static $added = false;
14
+
15
  /**
16
  * Register the Composer autoloader
17
  * @param Varien_Event_Observer $observer
19
  public function addComposerAutoloader(Varien_Event_Observer $observer)
20
  {
21
  if (self::$added === false) {
22
+ $this->registerAutoloader();
 
 
23
  self::$added = true;
24
  }
25
  }
26
+
27
+ /**
28
+ * The location of the vendor directory on the machine the site is running on.
29
+ * It always comes without a trailing slash.
30
+ *
31
+ * @return string
32
+ */
33
+ public function getVendorDirectoryPath()
34
+ {
35
+ $path = (string) Mage::getConfig()->getNode('global/composer_autoloader/path');
36
+ if (!$path) {
37
+ $path = self::DEFAULT_PATH;
38
+ }
39
+ $path = str_replace('/', DS, $path);
40
+ $path = str_replace('{{basedir}}', Mage::getBaseDir(), $path);
41
+ $path = str_replace('{{libdir}}', Mage::getBaseDir('lib'), $path);
42
+ $path = rtrim($path, DS);
43
+ return realpath($path);
44
+ }
45
+
46
+ /**
47
+ * @param string|null $path Path to vendor directory. Pass null to use the configured value.
48
+ * @param string|null $filename Filename of autoload file. Pass null to use the default (autoload.php).
49
+ */
50
+ public function registerAutoloader($path = null, $filename = null)
51
+ {
52
+ if ($path === null) {
53
+ $path = $this->getVendorDirectoryPath();
54
+ }
55
+ if ($filename === null) {
56
+ $filename = self::AUTOLOAD_FILENAME;
57
+ }
58
+ if (file_exists($path . DS . $filename)) {
59
+ require_once($path . DS . $filename);
60
+ }
61
+ }
62
  }
app/code/community/Tritac/ChannelEngine/Model/Observer.php CHANGED
@@ -20,14 +20,6 @@ use ChannelEngine\ApiClient\Model\MerchantShipmentLineRequest;
20
 
21
  class Tritac_ChannelEngine_Model_Observer
22
  {
23
- /**
24
- * To prevent exceeding the maximum number of allowed mySQL joins
25
- * when not using the flat catalog.
26
- *
27
- * @var int
28
- */
29
- const ATTRIBUTES_LIMIT = 30;
30
-
31
  /**
32
  * The CE logfile path
33
  *
@@ -56,6 +48,13 @@ class Tritac_ChannelEngine_Model_Observer
56
  */
57
  protected $_helper = null;
58
 
 
 
 
 
 
 
 
59
  /**
60
  * Whether this merchant uses the postNL extension
61
  *
@@ -70,14 +69,16 @@ class Tritac_ChannelEngine_Model_Observer
70
  public function __construct()
71
  {
72
  $this->_helper = Mage::helper('channelengine');
 
73
  $this->_hasPostNL = Mage::helper('core')->isModuleEnabled('TIG_PostNL');
74
 
75
  $this->_config = $this->_helper->getConfig();
 
76
  /**
77
  * Check required config parameters. Initialize API client.
78
  */
79
  foreach($this->_config as $storeId => $storeConfig) {
80
- if($this->_helper->checkGeneralConfig($storeId)) {
81
  $apiConfig = new Configuration();
82
 
83
  $apiConfig->setApiKey('apikey', $storeConfig['general']['api_key']);
@@ -118,6 +119,11 @@ class Tritac_ChannelEngine_Model_Observer
118
  $this->log($e->__toString(), Zend_Log::ERR);
119
  }
120
 
 
 
 
 
 
121
  /**
122
  * Fetch new orders from ChannelEngine.
123
  * Ran by cron. The cronjob is set in extension config file.
@@ -579,445 +585,6 @@ class Tritac_ChannelEngine_Model_Observer
579
  }
580
  }
581
 
582
- /**
583
- * Generate products feed for ChannelEngine
584
- */
585
- public function generateFeed()
586
- {
587
- @set_time_limit(15 * 60);
588
- $start_memory = memory_get_usage();
589
-
590
- /**
591
- * Prepare categories array
592
- */
593
- $categoryArray = array();
594
- $parent = Mage::app()->getWebsite(true)->getDefaultStore()->getRootCategoryId();
595
- $category = Mage::getModel('catalog/category');
596
- if ($category->checkId($parent)) {
597
- $storeCategories = $category->getCategories($parent, 0, true, true, true);
598
- foreach($storeCategories as $_category) {
599
- $categoryArray[$_category->getId()] = $_category->getData();
600
- }
601
- }
602
-
603
- /**
604
- * Prepare products relation
605
- */
606
- // $productsRelation = array();
607
- // $_resource = Mage::getSingleton('core/resource');
608
- // $_connection = $_resource->getConnection('core_read');
609
- // $relations = $_connection->fetchAll("SELECT * FROM " . $_resource->getTableName('catalog/product_relation'));
610
- // foreach($relations as $relation) {
611
- // $productsRelation[$relation['child_id']] = $relation['parent_id'];
612
- // }
613
-
614
- /**
615
- * Export products from each store.
616
- * Note: products with undefined website id will not be export.
617
- */
618
- foreach(Mage::app()->getStores() as $_store)
619
- {
620
- Mage::app()->setCurrentStore($_store);
621
-
622
- $path = Mage::getBaseDir('media') . DS . 'channelengine' . DS;
623
- $storeConfig = $this->_helper->getConfig($_store->getId());
624
-
625
- if(!$this->_helper->checkGeneralConfig($_store->getId())) continue;
626
-
627
- $name = $storeConfig['general']['tenant'].'_products.xml';
628
- $file = $path . DS . $name;
629
- $date = date('c');
630
-
631
- $io = new Varien_Io_File();
632
- $io->setAllowCreateFolders(true);
633
- $io->open(array('path' => $path));
634
- $io->streamOpen($file, 'w+');
635
- $io->streamLock(true);
636
- $io->streamWrite('<?xml version="1.0" encoding="UTF-8"?>' . "\n");
637
- $io->streamWrite('<Products xmlns:xsd="http://www.w3.org/2001/XMLSchema"
638
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" GeneratedAt="'.$date.'">' . "\n");
639
-
640
- /**
641
- * Prepare custom options array
642
- */
643
- $storeId = $_store->getId();
644
- $optionsArray = array();
645
- $_options = Mage::getModel('catalog/product_option')
646
- ->getCollection()
647
- ->addTitleToResult($storeId)
648
- ->addPriceToResult($storeId)
649
- ->addValuesToResult($storeId)
650
- ->setOrder('sort_order', 'asc');
651
- foreach($_options as $_option) {
652
- $productId = $_option->getProductId();
653
- $optionId = $_option->getOptionId();
654
- $optionsArray[$productId][$optionId] = $_option->getData();
655
- if($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DROP_DOWN) {
656
- $optionsArray[$productId][$optionId]['values'] = $_option->getValues();
657
- }
658
- }
659
-
660
- /**
661
- * Retrieve product collection with all visible attributes
662
- */
663
- $collection = Mage::getResourceModel('catalog/product_collection');
664
- $flatCatalogEnabled = $collection->isEnabledFlat();
665
-
666
- // Make sure to create a new instance of our collection after setting the store ID
667
- // when using the flat catalog. Otherwise store ID will be ignored. This is a bug in magento.
668
- // https://magento.stackexchange.com/a/25908
669
- if($flatCatalogEnabled)
670
- {
671
- // The flat product entity has a setStoreId method, the regular entity does not have one
672
- $collection->getEntity()->setStoreId($storeId);
673
- $collection = Mage::getResourceModel('catalog/product_collection');
674
- }
675
-
676
- $visibleAttributes = array();
677
- $systemAttributes = array();
678
- $attributesToSelect = array(
679
- 'sku',
680
- 'name',
681
- 'manufacturer',
682
- 'description',
683
- 'image',
684
- 'url_key',
685
- 'price',
686
- 'cost',
687
- 'special_price',
688
- 'special_from_date',
689
- 'special_to_date',
690
- 'visibility',
691
- 'msrp'
692
- );
693
-
694
- if(!empty($this->_config[$storeId]['general']['gtin'])) $attributesToSelect[] = $this->_config[$storeId]['general']['gtin'];
695
- $attributes = Mage::getResourceModel('catalog/product_attribute_collection');
696
-
697
- $totalAttributes = count($attributesToSelect);
698
-
699
- foreach($attributes as $attribute)
700
- {
701
- $code = $attribute->getAttributeCode();
702
- $isFlat = $flatCatalogEnabled && $attribute->getUsedInProductListing();
703
- $isRegular = !$flatCatalogEnabled && $attribute->getIsVisible() && $attribute->getIsVisibleOnFront();
704
-
705
- // Only allow a subset of system attributes
706
- $isSystem = !$attribute->getIsUserDefined();
707
-
708
- if(!$isFlat && !$isRegular || ($isRegular && $totalAttributes >= self::ATTRIBUTES_LIMIT)) continue;
709
-
710
- $visibleAttributes[$code]['label'] = $attribute->getFrontendLabel();
711
- foreach($attribute->getSource()->getAllOptions(false) as $option)
712
- {
713
- $visibleAttributes[$code]['values'][$option['value']] = $option['label'];
714
- }
715
-
716
- if($isSystem)
717
- {
718
- $systemAttributes[] = $code;
719
- continue;
720
- }
721
-
722
- if(in_array($code, $attributesToSelect)) continue;
723
-
724
- $attributesToSelect[] = $code;
725
- $totalAttributes++;
726
- }
727
-
728
- $collection->addAttributeToSelect($attributesToSelect, 'left')
729
- ->addFieldToFilter('type_id', array('in' => array('simple')))
730
- ->addStoreFilter($_store)
731
- ->addAttributeToFilter('status', 1)
732
- ->addAttributeToFilter('visibility', array('in' => array(
733
- Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG,
734
- Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_SEARCH,
735
- Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)))
736
- ->addAttributeToSort('entity_id', 'DESC');
737
-
738
- // Add qty and category fields to select
739
- $collection->getSelect()
740
- ->joinLeft(
741
- array('csi' => Mage::getSingleton('core/resource')->getTableName('cataloginventory/stock_item')),
742
- '`e`.`entity_id` = `csi`.`product_id`',
743
- array('qty' => 'COALESCE(`qty`, 0)')
744
- )
745
- ->joinLeft(
746
- array('ccp' => Mage::getSingleton('core/resource')->getTableName('catalog/category_product')),
747
- '`e`.`entity_id` = `ccp`.`product_id`',
748
- array('category_id' => 'MAX(`ccp`.`category_id`)')
749
- )
750
- ->group('e.entity_id');
751
-
752
- Mage::getSingleton('core/resource_iterator')->walk(
753
- $collection->getSelect(),
754
- array(array($this, 'callbackGenerateFeed')),
755
- array(
756
- 'io' => $io,
757
- 'categories' => $categoryArray,
758
- 'attributes' => $visibleAttributes,
759
- 'systemAttributes' => $systemAttributes,
760
- 'options' => $optionsArray,
761
- 'store' => $_store,
762
- 'startMemory' => $start_memory,
763
- )
764
- );
765
-
766
- $collection->clear()->getSelect()->reset('where');
767
- $collection->addFieldToFilter('type_id', array('in' => array('configurable')))
768
- ->addStoreFilter($_store)
769
- ->addAttributeToFilter('status', 1)
770
- ->addAttributeToSort('entity_id', 'DESC');
771
-
772
- foreach($collection as $_product) {
773
- $productAttributeOptions = $_product->getTypeInstance(true)->getConfigurableAttributesAsArray($_product);
774
- $superAttributes = array();
775
-
776
- foreach($productAttributeOptions as $superAttribute) {
777
- foreach($superAttribute['values'] as $value) {
778
- $superAttributes[$superAttribute['attribute_code']][$value['value_index']] = $value;
779
- }
780
- }
781
-
782
- $parentData = $_product->getData();
783
- $parentData['id'] = $parentData['entity_id'];
784
-
785
- $productModel = Mage::getModel('catalog/product');
786
- $productModel->setData('entity_id', $parentData['entity_id']);
787
- $productModel->setData('url_key', $parentData['url_key']);
788
- $productModel->setData('store_id', $parentData['store_id']);
789
-
790
- $parentData['url'] = $productModel->getProductUrl();
791
-
792
- $specialPrice = $parentData['special_price'];
793
- $specialFrom = $parentData['special_from_date'];
794
- $specialTo = $parentData['special_to_date'];
795
- $parentData['price'] = Mage::getModel('catalog/product_type_price')->calculateSpecialPrice($parentData['price'], $specialPrice, $specialFrom, $specialTo, $storeId);
796
-
797
- $xml = $this->_getProductXml($parentData, $categoryArray, array('systemAttributes' => $systemAttributes, 'attributes' => $visibleAttributes));
798
-
799
- $childProductCollection = Mage::getModel('catalog/product_type_configurable')
800
- ->getUsedProductCollection($_product)
801
- ->addAttributeToSelect($attributesToSelect);
802
-
803
- $_childProducts = $childProductCollection->getItems();
804
-
805
-
806
- foreach($_childProducts as $_child) {
807
- $childData = $_child->getData();
808
-
809
- $childData['id'] = $childData['entity_id'];
810
- $childData['parent_id'] = $parentData['id'];
811
- $childData['price'] = $parentData['price'];
812
- $childData['url'] = $parentData['url'];
813
- $childData['description'] = $parentData['description'];
814
-
815
- if(isset($childData['stock_item']) && $childData['stock_item'] !== null) {
816
- $stock = $childData['stock_item']->getData();
817
- $childData['qty'] = $stock['qty'];
818
- }
819
-
820
- if(!isset($childData['image']) || $childData['image'] == 'no_slection') {
821
- $childData['image'] = $parentData['image'];
822
- }
823
-
824
- foreach($superAttributes as $code => $superAttribute) {
825
- if(isset($childData[$code])) {
826
- $priceValue = $superAttribute[$childData[$code]]['pricing_value'];
827
- if($superAttribute[$childData[$code]]['is_percent']) {
828
- $newPrice = $childData['price'] + $childData['price'] * $priceValue / 100;
829
- } else {
830
- $newPrice = $childData['price'] + $priceValue;
831
- }
832
- $childData['price'] = $newPrice;
833
- }
834
- }
835
-
836
- $xml .= $this->_getProductXml($childData, $categoryArray, array('systemAttributes' => $systemAttributes, 'attributes' => $visibleAttributes));
837
- }
838
- $io->streamWrite($xml);
839
- }
840
-
841
-
842
-
843
- $io->streamWrite('</Products>');
844
- $io->streamUnlock();
845
- $io->streamClose();
846
- }
847
-
848
- return true;
849
- }
850
-
851
- public function callbackGenerateFeed($args)
852
- {
853
- $io = $args['io'];
854
- $product = $args['row'];
855
- $attributes = $args['attributes'];
856
- $systemAttributes = $args['systemAttributes'];
857
- $categories = $args['categories'];
858
- $options = $args['options'];
859
- $_store = $args['store'];
860
- $storeId = $_store->getId();
861
-
862
- $xml = '';
863
-
864
- $product['store_id'] = $storeId;
865
- if(!empty($this->_config[$storeId]['general']['gtin'])) {
866
- $product['gtin'] = $product[$this->_config[$storeId]['general']['gtin']];
867
- }
868
-
869
- $specialPrice = $product['special_price'];
870
- $specialFrom = $product['special_from_date'];
871
- $specialTo = $product['special_to_date'];
872
- $product['price'] = Mage::getModel('catalog/product_type_price')
873
- ->calculateSpecialPrice($product['price'], $specialPrice, $specialFrom, $specialTo, $storeId);
874
-
875
- $productModel = Mage::getModel('catalog/product');
876
- $productModel->setData('entity_id', $product['entity_id']);
877
- $productModel->setData('url_key', $product['url_key']);
878
- $productModel->setData('store_id', $product['store_id']);
879
- $product['url'] = $productModel->getProductUrl();
880
-
881
- /**
882
- * Add product custom options to feed.
883
- * Each option value will generate new product row
884
- */
885
- $additional['systemAttributes'] = $systemAttributes;
886
- $additional['attributes'] = $attributes;
887
- if(isset($options[$product['entity_id']])) {
888
- $product['group_code'] = $product['entity_id'];
889
- foreach($options[$product['entity_id']] as $option) {
890
- if(isset($option['values'])) {
891
- foreach($option['values'] as $_value) {
892
- $product['id'] = $product['entity_id'].'_'.$option['option_id'].'_'.$_value->getId();
893
- $additional['title'] = str_replace(' ', '_', $option['default_title']);
894
- $additional['value'] = $_value->getDefaultTitle();
895
- $xml .= $this->_getProductXml($product, $categories, $additional);
896
- }
897
- } else {
898
- $product['id'] = $product['entity_id'].'_'.$option['option_id'];
899
- $additional['title'] = str_replace(' ', '_', $option['default_title']);
900
- $additional['value'] = '';
901
- $xml .= $this->_getProductXml($product, $categories, $additional);
902
- }
903
- }
904
- }else {
905
- $product['id'] = $product['entity_id'];
906
- $xml .= $this->_getProductXml($product, $categories, $additional);
907
- }
908
-
909
- $io->streamWrite($xml);
910
- }
911
-
912
- protected function _getProductXml($product, $categories, $additional = null)
913
- {
914
- $xml = "<Product>";
915
- $xml .= "<Id>".$product['id']."</Id>";
916
-
917
- // Add group code with product id if product have custom options
918
- if(isset($product['group_code'])) {
919
- $xml .= "<GroupCode><![CDATA[".$product['group_code']."]]></GroupCode>";
920
- }
921
-
922
- if(isset($product['parent_id'])) {
923
- $xml .= "<ParentId><![CDATA[".$product['parent_id']."]]></ParentId>";
924
- }
925
-
926
- $xml .= "<Type><![CDATA[".$product['type_id']."]]></Type>";
927
- $xml .= "<Name><![CDATA[".$product['name']."]]></Name>";
928
- $xml .= "<Description><![CDATA[".strip_tags($product['description'])."]]></Description>";
929
- $xml .= "<Price><![CDATA[".$product['price']."]]></Price>";
930
- $xml .= "<ListPrice><![CDATA[".$product['msrp']."]]></ListPrice>";
931
- $xml .= "<PurchasePrice><![CDATA[".$product['cost']."]]></PurchasePrice>";
932
-
933
- // Add product stock qty
934
- $xml .= "<Stock><![CDATA[".$product['qty']."]]></Stock>";
935
-
936
- // Add product SKU and GTIN
937
- $xml .= "<SKU><![CDATA[".$product['sku']."]]></SKU>";
938
- if(!empty($product['gtin'])) {
939
- $xml .= "<GTIN><![CDATA[".$product['gtin']."]]></GTIN>";
940
- }
941
-
942
- // VAT and Shipping Time are pre configured in extension settings
943
- if(!empty($this->_config[$product['store_id']]['optional']['vat_rate'])) {
944
- $vat = $this->_config[$product['store_id']]['optional']['vat_rate'];
945
- $xml .= "<VAT><![CDATA[".$vat."]]></VAT>";
946
- }
947
-
948
- $shippingTime = ($product['qty'] > 0) ? $this->_config[$product['store_id']]['optional']['shipping_time'] : $this->_config[$product['store_id']]['optional']['shipping_time_oos'];
949
-
950
- if($shippingTime) {
951
- $xml .= "<ShippingTime><![CDATA[".$shippingTime."]]></ShippingTime>";
952
- }
953
-
954
- $xml .= "<Url><![CDATA[".$product['url']."]]></Url>";
955
-
956
- if(isset($product['image']) && $product['image'] != 'no_selection') {
957
- $imgUrl = Mage::getSingleton('catalog/product_media_config')->getMediaUrl($product['image']);
958
- $xml .= "<ImageUrl><![CDATA[".$imgUrl."]]></ImageUrl>";
959
- }
960
-
961
- // Prepare category path
962
- if(!empty($product['category_id']) && !empty($categories)) {
963
- $categoryId = $product['category_id'];
964
- $categoryPathIds = explode('/', $categories[$categoryId]['path']);
965
- $categoryPath = null;
966
- foreach($categoryPathIds as $id) {
967
- if($id > 2) {
968
- $categoryPath .= ($categoryPath) ? ' > ':'';
969
- $categoryPath .= $categories[$id]['name'];
970
- }
971
- }
972
- if($categoryPath) {
973
- $xml .= "<Category><![CDATA[".$categoryPath."]]></Category>";
974
- }
975
- }
976
-
977
- if(isset($additional['title']) && isset($additional['value'])) {
978
- $title = preg_replace("/[^a-zA-Z0-9]/", "", $additional['title']);
979
- $xml .= sprintf("<%1\$s><![CDATA[%2\$s]]></%1\$s>",
980
- $title,
981
- $additional['value']
982
- );
983
- }
984
-
985
- /*
986
- * Prepare product visible attributes
987
- */
988
- if(isset($additional['attributes'])) {
989
- $xml .= '<Attributes>';
990
- foreach($additional['attributes'] as $code => $attribute) {
991
-
992
- if(isset($product[$code]) && !in_array($code, $additional['systemAttributes'])) {
993
- $xml .= "<".$code.">";
994
- /*$xml .= "<label><![CDATA[".$attribute['label']."]]></label>";
995
- if(!empty($attribute['values'])) {
996
- $xml .= "<value><![CDATA[".$attribute['values'][$product[$code]]."]]></value>";
997
- } else {
998
- $xml .= "<value><![CDATA[".$product[$code]."]]></value>";
999
- }*/
1000
- if(!empty($attribute['values'])) {
1001
- $xml .= "<![CDATA[".$attribute['values'][$product[$code]]."]]>";
1002
- } else {
1003
- $xml .= "<![CDATA[".$product[$code]."]]>";
1004
- }
1005
- $xml .= "</".$code.">";
1006
- }
1007
- }
1008
- $xml .= '</Attributes>';
1009
- }
1010
-
1011
- $xml .= "</Product>\n";
1012
-
1013
- return $xml;
1014
- }
1015
-
1016
- public function addConfigurableProducts($collection)
1017
- {
1018
-
1019
- }
1020
-
1021
  /**
1022
  * Join channelengine order fields to adminhtml order grid
1023
  *
20
 
21
  class Tritac_ChannelEngine_Model_Observer
22
  {
 
 
 
 
 
 
 
 
23
  /**
24
  * The CE logfile path
25
  *
48
  */
49
  protected $_helper = null;
50
 
51
+ /**
52
+ * ChannelEngine helper
53
+ *
54
+ * @var Tritac_ChannelEngine_Helper_Feed
55
+ */
56
+ protected $_feedHelper = null;
57
+
58
  /**
59
  * Whether this merchant uses the postNL extension
60
  *
69
  public function __construct()
70
  {
71
  $this->_helper = Mage::helper('channelengine');
72
+ $this->_feedHelper = Mage::helper('channelengine/feed');
73
  $this->_hasPostNL = Mage::helper('core')->isModuleEnabled('TIG_PostNL');
74
 
75
  $this->_config = $this->_helper->getConfig();
76
+
77
  /**
78
  * Check required config parameters. Initialize API client.
79
  */
80
  foreach($this->_config as $storeId => $storeConfig) {
81
+ if($this->_helper->isConnected($storeId)) {
82
  $apiConfig = new Configuration();
83
 
84
  $apiConfig->setApiKey('apikey', $storeConfig['general']['api_key']);
119
  $this->log($e->__toString(), Zend_Log::ERR);
120
  }
121
 
122
+ public function generateFeeds()
123
+ {
124
+ $this->_feedHelper->generateFeeds();
125
+ }
126
+
127
  /**
128
  * Fetch new orders from ChannelEngine.
129
  * Ran by cron. The cronjob is set in extension config file.
585
  }
586
  }
587
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
588
  /**
589
  * Join channelengine order fields to adminhtml order grid
590
  *
app/code/community/Tritac/ChannelEngine/controllers/Adminhtml/GenerateController.php CHANGED
@@ -3,8 +3,8 @@ class Tritac_ChannelEngine_Adminhtml_GenerateController extends Mage_Adminhtml_C
3
  {
4
  public function feedAction()
5
  {
6
- $observer = Mage::getModel('channelengine/observer');
7
- $result = $observer->generateFeed();
8
  if($result) {
9
  $this->returnStatus(false, $result);
10
  } else {
3
  {
4
  public function feedAction()
5
  {
6
+ $feed = Mage::helper('channelengine/feed');
7
+ $result = $feed->generateFeeds();
8
  if($result) {
9
  $this->returnStatus(false, $result);
10
  } else {
app/code/community/Tritac/ChannelEngine/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Tritac_ChannelEngine>
5
- <version>4.6.0</version>
6
  </Tritac_ChannelEngine>
7
  </modules>
8
 
@@ -195,7 +195,7 @@
195
  <cron_expr>30 * * * *</cron_expr>
196
  </schedule>
197
  <run>
198
- <model>channelengine/observer::generateFeed</model>
199
  </run>
200
  </channelengine_generate_feed>
201
  </jobs>
2
  <config>
3
  <modules>
4
  <Tritac_ChannelEngine>
5
+ <version>5.0.2</version>
6
  </Tritac_ChannelEngine>
7
  </modules>
8
 
195
  <cron_expr>30 * * * *</cron_expr>
196
  </schedule>
197
  <run>
198
+ <model>channelengine/observer::generateFeeds</model>
199
  </run>
200
  </channelengine_generate_feed>
201
  </jobs>
lib/ChannelEngine/composer.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
  "require": {
3
- "channelengine/api-client": "dev-master"
4
  }
5
  }
1
  {
2
  "require": {
3
+ "channelengine/api-client-php": "^2.1"
4
  }
5
  }
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Tritac_ChannelEngine</name>
4
- <version>4.6.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
@@ -20,11 +20,11 @@ Features of ChannelEngine:&#xD;
20
  * Receive orders from marketplaces using one single connection.&#xD;
21
  * Using this magento extension you can connect to ChannelEngine instantly without any further configuration.&#xD;
22
  * For more information, visit: ChannelEngine.com</description>
23
- <notes>* Add diagnostic information</notes>
24
  <authors><author><name>Christiaan de Ridder</name><user>christiaander</user><email>support@channelengine.com</email></author></authors>
25
- <date>2017-06-22</date>
26
- <time>11:04:56</time>
27
- <contents><target name="mageetc"><dir name="modules"><file name="Tritac_ChannelEngine.xml" hash="f6b4a6d9af9aa3bcd3019fd566d6a67c"/></dir></target><target name="magecommunity"><dir name="Tritac"><dir name="ChannelEngine"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><file name="Button.php" hash="1a665843a90bca8058a5aa55105f6caa"/><file name="Feed.php" hash="621f24ef43bc16c33f2c590fc6c3aca6"/><file name="Link.php" hash="f25fef9d460c12ef5e5f580516fcedb1"/><file name="Version.php" hash="d68dce8484984be51fac14e7f8a4d9cb"/></dir></dir></dir></dir><file name="Head.php" hash="98f6d4e3caf6f2d6b2ad001fe274cee7"/></dir><dir name="Helper"><file name="Data.php" hash="7053bcccd8e419e5bf736b061515259c"/></dir><dir name="Model"><dir name="Carrier"><file name="Channelengine.php" hash="b6e04e43096e934d57e8e8745dd67c75"/></dir><file name="Loader.php" hash="b8207f87e0e26c0b62b433ad44e85c58"/><file name="Observer.php" hash="34e27a045d7b9c4f3a4e03e37c15b92c"/><file name="Order.php" hash="7b5d59152a0341cf5bff5b7adf6c76b7"/><dir name="Payment"><dir name="Method"><file name="Channelengine.php" hash="b938300284d504de42dd04777c45c75b"/></dir></dir><dir name="Resource"><dir name="Order"><file name="Collection.php" hash="fedd812bdf0090a36ce7bdd23e7876f5"/></dir><file name="Order.php" hash="cab73cceec877cda4daadc5c66f356fe"/><file name="Setup.php" hash="ed5ca35f61e6158a8b617630ae84c5b8"/><dir name="Shipment"><file name="Collection.php" hash="56e7c3bee221edefdcb587801bd36cc2"/></dir><file name="Shipment.php" hash="e09302f0ff110b94fc34031ee9255caa"/></dir><file name="Shipment.php" hash="5aa413e4e1ca441456d0d28ed541d2fc"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Gtin.php" hash="d2c18169dfaf87a01d9d7357329f1c78"/><file name="Shipping.php" hash="00d71eaebba3014fe9d17ee75f7cf0a9"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="GenerateController.php" hash="546bf4a6eac28e2c23838dbb4a2791cb"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="2a9dc6ac1738bebb470c1aa699478467"/><file name="config.xml" hash="e8d1bc06fe36a0f7fe62e7995d9cbaee"/><file name="system.xml" hash="bc0210d6c9531e933995d0b09c01bd0f"/></dir><dir name="sql"><dir name="channelengine_setup"><file name="mysql4-install-1.0.0.php" hash="6d04678d7750ff3de5a9eb697c13d52f"/><file name="mysql4-upgrade-2.6.0-2.7.0.php" hash="1f8c2f9d0239c9fbf31d3bfdd1c6cc46"/></dir></dir></dir></dir></target><target name="magelib"><dir name="ChannelEngine"><file name="composer.json" hash="0409500a61e93de939a4dbe6a287db9b"/><file name="composer.lock" hash="6564646e142a50bab18a5d2c0ec6438a"/><dir name="vendor"><file name="autoload.php" hash="a318487cebe1e11bb07ff9ca3859f466"/><dir name="channelengine"><dir name="api-client"><file name="README.md" hash="bd216e504ca4e5db1e0b44031b52d279"/><file name="api-client.sublime-project" hash="3b415c0c18b0c5aba978e919389acb31"/><file name="autoload.php" hash="705933da41eaf10d3874a1843118558c"/><file name="composer.json" hash="22f8d07476d06c404c059ff9da66f31f"/><dir name="docs"><dir name="Api"><file name="BackOrderApi.md" hash="502a8dd3880ae59abd08d1d0e5a1abeb"/><file name="CancellationApi.md" hash="603fc4f25887e55a97f2aec34109d8a3"/><file name="ClientApi.md" hash="1569a1fd53bde30b8b04bebec5c12756"/><file name="OrderApi.md" hash="2d5adef1989c78c406bd97d5ffec3744"/><file name="ProductApi.md" hash="dee883c5ab049bab98c25b26ad615e88"/><file name="ReturnApi.md" hash="4994513857e57786beb793523769a225"/><file name="ShipmentApi.md" hash="c8cb49e2b8bbc728106acc6f3b00c591"/></dir><dir name="Model"><file name="ApiResponse.md" hash="c2c27b0cde81c5b1fe3e7eb16fc0f491"/><file name="BackOrder.md" hash="84a6006f4447ec2f3bc38e1f4f6aa032"/><file name="BackOrderLine.md" hash="95579a0724930de6e28616a0ef24fb44"/><file name="ChannelCancellationLineResponse.md" hash="60cd567274761c97d498b96a419b3d90"/><file name="ChannelCancellationResponse.md" hash="d26af09dc0e5896af8255e6fa46f6398"/><file name="ChannelOfferResponse.md" hash="665ca9f581db6f876240e3afca489b43"/><file name="ChannelOrderLineRequest.md" hash="63e6f8749551c7e6e35654b7d757d32f"/><file name="ChannelOrderRequest.md" hash="d153101ffafe1f007aaa5ae1bb2b6ef8"/><file name="ChannelProcessedChangesRequest.md" hash="4a340f2bf061c99c2f0dc9ff08cf7eff"/><file name="ChannelProductChangesResponse.md" hash="1d60c94776a102ce70adfe423053662c"/><file name="ChannelProductResponse.md" hash="ab03738a7d36ca757d4d760f494f34eb"/><file name="ChannelReferencesRequest.md" hash="0093f0fb9f984d1b5487a21e7f228881"/><file name="ChannelReturnLineRequest.md" hash="8772b0e3d83aa4d9b9a5096d4e7d3a71"/><file name="ChannelReturnLineResponse.md" hash="3776c0d0d4c55b771f56cf7d54dfcbd6"/><file name="ChannelReturnRequest.md" hash="e3f7f0bac18928f306c7a6250a33559c"/><file name="ChannelReturnResponse.md" hash="fce03223b6d72522aaebbc571710c184"/><file name="ChannelShipmentLineResponse.md" hash="7af4b4969f67785856935ea2157ef777"/><file name="ChannelShipmentResponse.md" hash="d08e3ffaa74bb3cfacc302ab4ecc6647"/><file name="CollectionOfBackOrder.md" hash="a598d6feabc24120bb32d27039257815"/><file name="CollectionOfChannelCancellationResponse.md" hash="17d808e9a597a7b577f06dda3826b209"/><file name="CollectionOfChannelOfferResponse.md" hash="960220f338c97e7f7f8d22d6a1dda078"/><file name="CollectionOfChannelReturnResponse.md" hash="5aa569265ef1bffe72598717b54eb744"/><file name="CollectionOfChannelShipmentResponse.md" hash="921c98e16402963a54914a49b2ae4315"/><file name="CollectionOfMerchantOrderResponse.md" hash="2b485b16c88d9b572a920832cee2d640"/><file name="CollectionOfMerchantReturnResponse.md" hash="28e166e6c4334999d01e72ed45b9f1cd"/><file name="EntitiesAddressModels.md" hash="a39c3572451706980ef8ca89150839d1"/><file name="ExtraDataItem.md" hash="0de36fae230fc29f94271b1d4cfda0be"/><file name="MerchantCancellationLineRequest.md" hash="7d34f8383485ab49aeefda8bfb7a5549"/><file name="MerchantCancellationRequest.md" hash="18b66e8fb6bac478187c47f9d1b9f33a"/><file name="MerchantOrderLineResponse.md" hash="2c9798e602c11355d27673d6dd5c595f"/><file name="MerchantOrderResponse.md" hash="aa294617b05c2ff8e1b8827e12dfbe58"/><file name="MerchantProductRequest.md" hash="b716f6455a82ac7edd34a805944e45be"/><file name="MerchantProductResponse.md" hash="1feac7443fa488fcf3049dd9fae9f9f3"/><file name="MerchantReturnLineRequest.md" hash="00ffe9d7430d1f8906664335f31dab47"/><file name="MerchantReturnLineResponse.md" hash="9d93c86dfc723c70013b38194821a4c0"/><file name="MerchantReturnRequest.md" hash="c6f8feb89091a6934edda9afc303055d"/><file name="MerchantReturnResponse.md" hash="68556dd65cf825c8bbfc9c4258732890"/><file name="MerchantShipmentLineRequest.md" hash="c64bb2841e6220eebec76af08f6521b4"/><file name="MerchantShipmentRequest.md" hash="a6375c9cd3353a9e1f58ecd13bc9db46"/><file name="MerchantShipmentTrackingRequest.md" hash="31de02f6fc295de48495954e0661cedf"/><file name="OrderAcknowledgement.md" hash="4efbc52fac5d1096411b71dbf9eadfc8"/><file name="ProductCreationResult.md" hash="f7405b1242dac1e7691fea916126a762"/><file name="ProductMessage.md" hash="f0183ec14571d04083c97184fd0d0cb0"/><file name="SingleOfBackOrder.md" hash="40d153f95799d834702713f67f51f2dd"/><file name="SingleOfChannelProductChangesResponse.md" hash="66b59de7b2664656f0dbe41aaf236bc2"/><file name="SingleOfMerchantProductResponse.md" hash="0bb93f7335afe61d1f3085147eb2c62f"/><file name="SingleOfProductCreationResult.md" hash="b716e0f72131560a100ea752486b6fb0"/></dir></dir><file name="git_push.sh" hash="cb43424bd3b91aad6248982e6d022abf"/><dir name="lib"><dir name="Api"><file name="BackOrderApi.php" hash="5e81ec4edf4158643bec19b4bc1626f2"/><file name="CancellationApi.php" hash="d8dd5fc664e97e48a2b4d8675398075f"/><file name="ClientApi.php" hash="27b7e36e2e2a58a48e23b9b3d60718a0"/><file name="OrderApi.php" hash="878b6aef80ca14ae6e78e22e3e23d272"/><file name="ProductApi.php" hash="e2fda0f0bd93d83a8fd3341248951370"/><file name="ReturnApi.php" hash="bab74b31173552b26ddded0ab634f791"/><file name="ShipmentApi.php" hash="c959703b9f4b0625857909305f2bce9c"/></dir><file name="ApiClient.php" hash="842d8cc43ed577f9c6309325274cae8b"/><file name="ApiException.php" hash="35e42f31a447db6fa7829f3921bb71f3"/><file name="Configuration.php" hash="31b0a02797b7a7be75aee5882e4a71a4"/><dir name="Model"><file name="ApiResponse.php" hash="0a3b05df633ae7f3ab07a11a125fca9c"/><file name="BackOrder.php" hash="8381e382e6cb0003122fe0cf6724ffc6"/><file name="BackOrderLine.php" hash="d7bce03323b7fc81a247e9d2d1013a3b"/><file name="ChannelCancellationLineResponse.php" hash="bca9fdefe0c204ee9ef232f963b3de47"/><file name="ChannelCancellationResponse.php" hash="e67a3c71c1f2b233cc76d6a105cb3e3e"/><file name="ChannelOfferResponse.php" hash="c0dcfdd5e2176537cf8c65786806ab78"/><file name="ChannelOrderLineRequest.php" hash="e1731a835a52ce636c78782d87dc8ff6"/><file name="ChannelOrderRequest.php" hash="f76b555f79c9ef7bc891fb1e8c272702"/><file name="ChannelProcessedChangesRequest.php" hash="811154776d351b4a4b4cfdd8e52dabea"/><file name="ChannelProductChangesResponse.php" hash="4005bddd62fb2f3fa8c5cbd18915c769"/><file name="ChannelProductResponse.php" hash="5c56cb7c3e7b066a416e492cea0ae5a3"/><file name="ChannelReferencesRequest.php" hash="8475df642ea577070897525ec531df5a"/><file name="ChannelReturnLineRequest.php" hash="efb6cafb95306f9a1daa174cdced04da"/><file name="ChannelReturnLineResponse.php" hash="cb278e5cb10e4f8e96319fdfdcd011e5"/><file name="ChannelReturnRequest.php" hash="ec2e7c79e2f64c88ed3022d5b777132a"/><file name="ChannelReturnResponse.php" hash="d4476c0c9c9254a7e61efaf733a99633"/><file name="ChannelShipmentLineResponse.php" hash="05c3bf0d034f2ec710d5c31d787995ae"/><file name="ChannelShipmentResponse.php" hash="018ba0efa56760cc898db241c4fb1960"/><file name="CollectionOfBackOrder.php" hash="ceb2f8cce017d574f95c31fd710925db"/><file name="CollectionOfChannelCancellationResponse.php" hash="d16d711ec15156e378ef1d47cb7c2035"/><file name="CollectionOfChannelOfferResponse.php" hash="e2aa6951e00d415a0e1d01fb5039c571"/><file name="CollectionOfChannelReturnResponse.php" hash="82fbfd1ab05901cd5f9ed0378315ff21"/><file name="CollectionOfChannelShipmentResponse.php" hash="6887ab42ff36160caeea7fe3e7a81a3f"/><file name="CollectionOfMerchantOrderResponse.php" hash="25c69cc1c18d5d378a66b4b6510c90ad"/><file name="CollectionOfMerchantReturnResponse.php" hash="3cb0aae8dc98658933abe39596112238"/><file name="EntitiesAddressModels.php" hash="0e77da388045bcd741491f0e808c5590"/><file name="ExtraDataItem.php" hash="fd4591749f2db73f7419fa60eb61ece1"/><file name="MerchantCancellationLineRequest.php" hash="fc592a1326f5d757518f136868e79abe"/><file name="MerchantCancellationRequest.php" hash="aa91c8397263205bd2ea352487a4789b"/><file name="MerchantOrderLineResponse.php" hash="3a03961b88af656a8d445fd6ad362c61"/><file name="MerchantOrderResponse.php" hash="204e6f13d44bc7c39359db3dfbc259e8"/><file name="MerchantProductRequest.php" hash="d30cac5bde0749267b31122027b5faf3"/><file name="MerchantProductResponse.php" hash="59637638ced5d01950f74e129f17118f"/><file name="MerchantReturnLineRequest.php" hash="febc3d102920720bab159b3cc7b096f1"/><file name="MerchantReturnLineResponse.php" hash="1c684535ba88a7667920b3d7e75e3864"/><file name="MerchantReturnRequest.php" hash="50ee599cf61519fed768072a87c4dd8c"/><file name="MerchantReturnResponse.php" hash="01b709acf280d9c068e6d201e09a5222"/><file name="MerchantShipmentLineRequest.php" hash="5304190e3a68136f3c0aec3de99e2424"/><file name="MerchantShipmentRequest.php" hash="541886892421fb9b2d358578779ca849"/><file name="MerchantShipmentTrackingRequest.php" hash="037a86688447c3fb348221e2ce587265"/><file name="OrderAcknowledgement.php" hash="dda1ada83257f1ee8aecae11c0fa3e32"/><file name="ProductCreationResult.php" hash="889dc202026af5080801077a48361c64"/><file name="ProductMessage.php" hash="673e069e1fc5e6ad9f05825f57922d25"/><file name="SingleOfBackOrder.php" hash="f2c5ea0cb45bba633e37b3f7fdd6b5ca"/><file name="SingleOfChannelProductChangesResponse.php" hash="9bd19387159ffbc97e846c37f2414f43"/><file name="SingleOfMerchantProductResponse.php" hash="d729298d1ebc24064de1e157db0e5357"/><file name="SingleOfProductCreationResult.php" hash="dbd32037409ae8a9a6bc70e8bb394ef9"/></dir><file name="ObjectSerializer.php" hash="e6842da289d7dfa60c4ad2cd427f0ac5"/></dir><file name="phpunit.xml.dist" hash="82cdb47416d5294f68042ad4ef3bbdfb"/><dir name="test"><dir name="Api"><file name="BackOrderApiTest.php" hash="38eadf8e5bd8d5b64e751cd995a5d14c"/><file name="CancellationApiTest.php" hash="2e708e7da73249459a5f2135bf7a6493"/><file name="ClientApiTest.php" hash="9977a02ce29e75244a6cc0f77d7b2f2f"/><file name="OrderApiTest.php" hash="a5171f8ba78f55d71b500f0dd3ffd339"/><file name="ProductApiTest.php" hash="8e2c07929122cae5f2bca51e9b3f7a53"/><file name="ReturnApiTest.php" hash="6f41f9c096a319c8ffdd1512ea6eeeb3"/><file name="ShipmentApiTest.php" hash="69ce282bb21987efcaf9ef58a4e3c929"/></dir><dir name="Model"><file name="ApiResponseTest.php" hash="47ad10b81c24c046d26a721593743549"/><file name="BackOrderLineTest.php" hash="386d64b5b048dba890fdf527a9384bdc"/><file name="BackOrderTest.php" hash="20db2c9fc8bc7b2ee95b23217ec90324"/><file name="ChannelCancellationLineResponseTest.php" hash="c3911b9a14fa6e6e224e1fef0d14ebe3"/><file name="ChannelCancellationResponseTest.php" hash="5ac4db00dec924f7991e30f7cd851a85"/><file name="ChannelOfferResponseTest.php" hash="864f75a5ec3d1164a494fa7611a99d74"/><file name="ChannelOrderLineRequestTest.php" hash="1bc6bdc75b0ca3f7fc81600b00adce9e"/><file name="ChannelOrderRequestTest.php" hash="28e9fcf7f92df24cd4eade51e924c418"/><file name="ChannelProcessedChangesRequestTest.php" hash="2e31c7235b56f4c78ca961692740b2a4"/><file name="ChannelProductChangesResponseTest.php" hash="23f00d9199f2cc208efc55ecdf9365c6"/><file name="ChannelProductResponseTest.php" hash="a28341ed1fef5facb5ff2f2c30a1fe6f"/><file name="ChannelReferencesRequestTest.php" hash="cde66fa66d8ba5d6d2d9179e37e6d9f2"/><file name="ChannelReturnLineRequestTest.php" hash="ed6494db84eedab689da22870e0ad909"/><file name="ChannelReturnLineResponseTest.php" hash="e914765391866a51659fd4022381f760"/><file name="ChannelReturnRequestTest.php" hash="96080f38514039e9f5bd97c49575bd8c"/><file name="ChannelReturnResponseTest.php" hash="02fbc0c9be981e10fa825d40ce77b1cd"/><file name="ChannelShipmentLineResponseTest.php" hash="4b2876b2f6cc0466a1575348a04aeab6"/><file name="ChannelShipmentResponseTest.php" hash="d8fb3ed6643a2da9139873b9f40e1ded"/><file name="CollectionOfBackOrderTest.php" hash="5b213ba119b95cc1b1cd47f38c7ae4ae"/><file name="CollectionOfChannelCancellationResponseTest.php" hash="d1aafe9dfddb92125a7613194ba04d1d"/><file name="CollectionOfChannelOfferResponseTest.php" hash="178d3c84aacd4f3ad3edc84a17bdbf02"/><file name="CollectionOfChannelReturnResponseTest.php" hash="6d53549630c3337a31bb1ecb87e61555"/><file name="CollectionOfChannelShipmentResponseTest.php" hash="a934c9bf97695687f3a2d5116fedae58"/><file name="CollectionOfMerchantOrderResponseTest.php" hash="7428c9b0708ca263a036ff90a9278e08"/><file name="CollectionOfMerchantReturnResponseTest.php" hash="9215b1ef54894b1d18c74b165521962d"/><file name="EntitiesAddressModelsTest.php" hash="7ce550b6e3c4eba3a17e8a1c026ecb72"/><file name="ExtraDataItemTest.php" hash="caa7c4e33ad26050ede14df690d94ce2"/><file name="MerchantCancellationLineRequestTest.php" hash="f06c4131e5472a835c82c0f46d035c6d"/><file name="MerchantCancellationRequestTest.php" hash="f8d8cc7821aa1ecf842935656019a914"/><file name="MerchantOrderLineResponseTest.php" hash="b22d878593d9286a96733cf7d19a19c5"/><file name="MerchantOrderResponseTest.php" hash="0aab3e4a85d092aa9dd5ae353a61c027"/><file name="MerchantProductRequestTest.php" hash="e9f310562cca319e8e25220dcda2fd5c"/><file name="MerchantProductResponseTest.php" hash="5ca76d16364c27f5a5dd7f0ee41ac9b4"/><file name="MerchantReturnLineRequestTest.php" hash="a5c136a8524288aca4ac9cb356dcdc2a"/><file name="MerchantReturnLineResponseTest.php" hash="3d5dbd7817316a7d05c0472d7abf5017"/><file name="MerchantReturnRequestTest.php" hash="aab02e41fa8a30c80323758cf823e70e"/><file name="MerchantReturnResponseTest.php" hash="216d32bab151c70cc757dd3604548980"/><file name="MerchantShipmentLineRequestTest.php" hash="fb14a111aa135c9c2fbf8426fe4ec209"/><file name="MerchantShipmentRequestTest.php" hash="9b654c3525eb68df96dd267fc90575f2"/><file name="MerchantShipmentTrackingRequestTest.php" hash="a2e71dd4870faba873059a1f00ef6a3a"/><file name="OrderAcknowledgementTest.php" hash="ec258b97dcdea4cf0f32abbe4dca3846"/><file name="ProductCreationResultTest.php" hash="925f49219cb866042d0f5fa3b3bbceb2"/><file name="ProductMessageTest.php" hash="70c0ef075db83195b5767fd21cb0e1a9"/><file name="SingleOfBackOrderTest.php" hash="56ec1bd486a42d7bee62d5aac02dccd2"/><file name="SingleOfChannelProductChangesResponseTest.php" hash="6687c279b79298dc67490387637d19fb"/><file name="SingleOfMerchantProductResponseTest.php" hash="856d0ed5e85f30d263dc3f4b5a59e58a"/><file name="SingleOfProductCreationResultTest.php" hash="02720936c9cd7429c65ae0ebe6a57ecd"/></dir></dir><file name=".gitignore" hash="a72c432223a956b74e9bd5ea5dd8b8c3"/><file name=".php_cs" hash="a921a6cf564b1304d4ff8721ab46d435"/><file name=".travis.yml" hash="8c1fae058e6e8d1f0d2fd39dc488a850"/></dir></dir><dir name="composer"><file name="ClassLoader.php" hash="292c079dbe63ba06bfbf37fd99fe4bf9"/><file name="LICENSE" hash="955d5fe58c231244f6b49000f383b5e2"/><file name="autoload_classmap.php" hash="8645d3a4e3ad87e7cf4d88a46717aab4"/><file name="autoload_namespaces.php" hash="35e12c7d76c4a81633bcf547c0e229a9"/><file name="autoload_psr4.php" hash="34e17c04104094e954858e2e564ff4b0"/><file name="autoload_real.php" hash="692ff591b75b6853c6661061389055a9"/><file name="autoload_static.php" hash="e4628c11a0745f787a3e9de5a5de4ad7"/><file name="installed.json" hash="cd50a8b83c078b04628a5aa85e5551b5"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="channelengine.xml" hash="ae6a00b46a84a610964743034eb72081"/></dir><dir name="template"><dir name="channelengine"><dir name="checkout"><file name="success.phtml" hash="dbcb8298cd52a3c44560ae911349a3c7"/></dir><file name="head.phtml" hash="a7a7ab566adc1dc7d2645bf1cdfac0d4"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="channelengine"><dir name="system"><dir name="config"><dir name="form"><file name="ajax_button.phtml" hash="882106ebb297393737bdf97d2ddc8e41"/></dir></dir></dir></dir></dir></dir></dir></dir></target></contents>
28
  <compatible/>
29
- <dependencies><required><php><min>5.4.0</min><max>7.1.3</max></php><extension><name>curl</name><min/><max/></extension><extension><name>mbstring</name><min/><max/></extension><extension><name>json</name><min/><max/></extension></required></dependencies>
30
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Tritac_ChannelEngine</name>
4
+ <version>5.0.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
20
  * Receive orders from marketplaces using one single connection.&#xD;
21
  * Using this magento extension you can connect to ChannelEngine instantly without any further configuration.&#xD;
22
  * For more information, visit: ChannelEngine.com</description>
23
+ <notes>* Improved feed generation</notes>
24
  <authors><author><name>Christiaan de Ridder</name><user>christiaander</user><email>support@channelengine.com</email></author></authors>
25
+ <date>2017-07-31</date>
26
+ <time>12:15:40</time>
27
+ <contents><target name="mageetc"><dir name="modules"><file name="Tritac_ChannelEngine.xml" hash="f6b4a6d9af9aa3bcd3019fd566d6a67c"/></dir></target><target name="magecommunity"><dir name="Tritac"><dir name="ChannelEngine"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><file name="Button.php" hash="1a665843a90bca8058a5aa55105f6caa"/><file name="Feed.php" hash="621f24ef43bc16c33f2c590fc6c3aca6"/><file name="Link.php" hash="f25fef9d460c12ef5e5f580516fcedb1"/><file name="Version.php" hash="d68dce8484984be51fac14e7f8a4d9cb"/></dir></dir></dir></dir><file name="Head.php" hash="4d4dd3ce734e647058800282c6db2f8c"/></dir><dir name="Helper"><file name="Data.php" hash="8a1e1421d74fe1105501dfec2b7f2f86"/><file name="Feed.php" hash="b88acc8682d2f3893c288ea7310fe648"/></dir><dir name="Model"><dir name="Carrier"><file name="Channelengine.php" hash="b6e04e43096e934d57e8e8745dd67c75"/></dir><file name="Loader.php" hash="0b43c830760378009073df3df91b0168"/><file name="Observer.php" hash="6983546240a15e69e5521f4ab94fee6f"/><file name="Order.php" hash="7b5d59152a0341cf5bff5b7adf6c76b7"/><dir name="Payment"><dir name="Method"><file name="Channelengine.php" hash="b938300284d504de42dd04777c45c75b"/></dir></dir><dir name="Resource"><dir name="Order"><file name="Collection.php" hash="fedd812bdf0090a36ce7bdd23e7876f5"/></dir><file name="Order.php" hash="cab73cceec877cda4daadc5c66f356fe"/><file name="Setup.php" hash="ed5ca35f61e6158a8b617630ae84c5b8"/><dir name="Shipment"><file name="Collection.php" hash="56e7c3bee221edefdcb587801bd36cc2"/></dir><file name="Shipment.php" hash="e09302f0ff110b94fc34031ee9255caa"/></dir><file name="Shipment.php" hash="5aa413e4e1ca441456d0d28ed541d2fc"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Gtin.php" hash="d2c18169dfaf87a01d9d7357329f1c78"/><file name="Shipping.php" hash="00d71eaebba3014fe9d17ee75f7cf0a9"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="GenerateController.php" hash="b26f6d8ef198f292a74a4074882f9ac6"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="2a9dc6ac1738bebb470c1aa699478467"/><file name="config.xml" hash="c4fd13b3e538de547ace051331364d5c"/><file name="system.xml" hash="bc0210d6c9531e933995d0b09c01bd0f"/></dir><dir name="sql"><dir name="channelengine_setup"><file name="mysql4-install-1.0.0.php" hash="6d04678d7750ff3de5a9eb697c13d52f"/><file name="mysql4-upgrade-2.6.0-2.7.0.php" hash="1f8c2f9d0239c9fbf31d3bfdd1c6cc46"/></dir></dir></dir></dir></target><target name="magelib"><dir name="ChannelEngine"><file name="composer.json" hash="bd56f4f1fde7d3b49882c621626049dd"/><file name="composer.lock" hash="6564646e142a50bab18a5d2c0ec6438a"/><dir name="vendor"><file name="autoload.php" hash="a318487cebe1e11bb07ff9ca3859f466"/><dir name="channelengine"><dir name="api-client"><file name="README.md" hash="bd216e504ca4e5db1e0b44031b52d279"/><file name="api-client.sublime-project" hash="3b415c0c18b0c5aba978e919389acb31"/><file name="autoload.php" hash="705933da41eaf10d3874a1843118558c"/><file name="composer.json" hash="22f8d07476d06c404c059ff9da66f31f"/><dir name="docs"><dir name="Api"><file name="BackOrderApi.md" hash="502a8dd3880ae59abd08d1d0e5a1abeb"/><file name="CancellationApi.md" hash="603fc4f25887e55a97f2aec34109d8a3"/><file name="ClientApi.md" hash="1569a1fd53bde30b8b04bebec5c12756"/><file name="OrderApi.md" hash="2d5adef1989c78c406bd97d5ffec3744"/><file name="ProductApi.md" hash="dee883c5ab049bab98c25b26ad615e88"/><file name="ReturnApi.md" hash="4994513857e57786beb793523769a225"/><file name="ShipmentApi.md" hash="c8cb49e2b8bbc728106acc6f3b00c591"/></dir><dir name="Model"><file name="ApiResponse.md" hash="c2c27b0cde81c5b1fe3e7eb16fc0f491"/><file name="BackOrder.md" hash="84a6006f4447ec2f3bc38e1f4f6aa032"/><file name="BackOrderLine.md" hash="95579a0724930de6e28616a0ef24fb44"/><file name="ChannelCancellationLineResponse.md" hash="60cd567274761c97d498b96a419b3d90"/><file name="ChannelCancellationResponse.md" hash="d26af09dc0e5896af8255e6fa46f6398"/><file name="ChannelOfferResponse.md" hash="665ca9f581db6f876240e3afca489b43"/><file name="ChannelOrderLineRequest.md" hash="63e6f8749551c7e6e35654b7d757d32f"/><file name="ChannelOrderRequest.md" hash="d153101ffafe1f007aaa5ae1bb2b6ef8"/><file name="ChannelProcessedChangesRequest.md" hash="4a340f2bf061c99c2f0dc9ff08cf7eff"/><file name="ChannelProductChangesResponse.md" hash="1d60c94776a102ce70adfe423053662c"/><file name="ChannelProductResponse.md" hash="ab03738a7d36ca757d4d760f494f34eb"/><file name="ChannelReferencesRequest.md" hash="0093f0fb9f984d1b5487a21e7f228881"/><file name="ChannelReturnLineRequest.md" hash="8772b0e3d83aa4d9b9a5096d4e7d3a71"/><file name="ChannelReturnLineResponse.md" hash="3776c0d0d4c55b771f56cf7d54dfcbd6"/><file name="ChannelReturnRequest.md" hash="e3f7f0bac18928f306c7a6250a33559c"/><file name="ChannelReturnResponse.md" hash="fce03223b6d72522aaebbc571710c184"/><file name="ChannelShipmentLineResponse.md" hash="7af4b4969f67785856935ea2157ef777"/><file name="ChannelShipmentResponse.md" hash="d08e3ffaa74bb3cfacc302ab4ecc6647"/><file name="CollectionOfBackOrder.md" hash="a598d6feabc24120bb32d27039257815"/><file name="CollectionOfChannelCancellationResponse.md" hash="17d808e9a597a7b577f06dda3826b209"/><file name="CollectionOfChannelOfferResponse.md" hash="960220f338c97e7f7f8d22d6a1dda078"/><file name="CollectionOfChannelReturnResponse.md" hash="5aa569265ef1bffe72598717b54eb744"/><file name="CollectionOfChannelShipmentResponse.md" hash="921c98e16402963a54914a49b2ae4315"/><file name="CollectionOfMerchantOrderResponse.md" hash="2b485b16c88d9b572a920832cee2d640"/><file name="CollectionOfMerchantReturnResponse.md" hash="28e166e6c4334999d01e72ed45b9f1cd"/><file name="EntitiesAddressModels.md" hash="a39c3572451706980ef8ca89150839d1"/><file name="ExtraDataItem.md" hash="0de36fae230fc29f94271b1d4cfda0be"/><file name="MerchantCancellationLineRequest.md" hash="7d34f8383485ab49aeefda8bfb7a5549"/><file name="MerchantCancellationRequest.md" hash="18b66e8fb6bac478187c47f9d1b9f33a"/><file name="MerchantOrderLineResponse.md" hash="2c9798e602c11355d27673d6dd5c595f"/><file name="MerchantOrderResponse.md" hash="aa294617b05c2ff8e1b8827e12dfbe58"/><file name="MerchantProductRequest.md" hash="b716f6455a82ac7edd34a805944e45be"/><file name="MerchantProductResponse.md" hash="1feac7443fa488fcf3049dd9fae9f9f3"/><file name="MerchantReturnLineRequest.md" hash="00ffe9d7430d1f8906664335f31dab47"/><file name="MerchantReturnLineResponse.md" hash="9d93c86dfc723c70013b38194821a4c0"/><file name="MerchantReturnRequest.md" hash="c6f8feb89091a6934edda9afc303055d"/><file name="MerchantReturnResponse.md" hash="68556dd65cf825c8bbfc9c4258732890"/><file name="MerchantShipmentLineRequest.md" hash="c64bb2841e6220eebec76af08f6521b4"/><file name="MerchantShipmentRequest.md" hash="a6375c9cd3353a9e1f58ecd13bc9db46"/><file name="MerchantShipmentTrackingRequest.md" hash="31de02f6fc295de48495954e0661cedf"/><file name="OrderAcknowledgement.md" hash="4efbc52fac5d1096411b71dbf9eadfc8"/><file name="ProductCreationResult.md" hash="f7405b1242dac1e7691fea916126a762"/><file name="ProductMessage.md" hash="f0183ec14571d04083c97184fd0d0cb0"/><file name="SingleOfBackOrder.md" hash="40d153f95799d834702713f67f51f2dd"/><file name="SingleOfChannelProductChangesResponse.md" hash="66b59de7b2664656f0dbe41aaf236bc2"/><file name="SingleOfMerchantProductResponse.md" hash="0bb93f7335afe61d1f3085147eb2c62f"/><file name="SingleOfProductCreationResult.md" hash="b716e0f72131560a100ea752486b6fb0"/></dir></dir><file name="git_push.sh" hash="cb43424bd3b91aad6248982e6d022abf"/><dir name="lib"><dir name="Api"><file name="BackOrderApi.php" hash="5e81ec4edf4158643bec19b4bc1626f2"/><file name="CancellationApi.php" hash="d8dd5fc664e97e48a2b4d8675398075f"/><file name="ClientApi.php" hash="27b7e36e2e2a58a48e23b9b3d60718a0"/><file name="OrderApi.php" hash="878b6aef80ca14ae6e78e22e3e23d272"/><file name="ProductApi.php" hash="e2fda0f0bd93d83a8fd3341248951370"/><file name="ReturnApi.php" hash="bab74b31173552b26ddded0ab634f791"/><file name="ShipmentApi.php" hash="c959703b9f4b0625857909305f2bce9c"/></dir><file name="ApiClient.php" hash="842d8cc43ed577f9c6309325274cae8b"/><file name="ApiException.php" hash="35e42f31a447db6fa7829f3921bb71f3"/><file name="Configuration.php" hash="31b0a02797b7a7be75aee5882e4a71a4"/><dir name="Model"><file name="ApiResponse.php" hash="0a3b05df633ae7f3ab07a11a125fca9c"/><file name="BackOrder.php" hash="8381e382e6cb0003122fe0cf6724ffc6"/><file name="BackOrderLine.php" hash="d7bce03323b7fc81a247e9d2d1013a3b"/><file name="ChannelCancellationLineResponse.php" hash="bca9fdefe0c204ee9ef232f963b3de47"/><file name="ChannelCancellationResponse.php" hash="e67a3c71c1f2b233cc76d6a105cb3e3e"/><file name="ChannelOfferResponse.php" hash="c0dcfdd5e2176537cf8c65786806ab78"/><file name="ChannelOrderLineRequest.php" hash="e1731a835a52ce636c78782d87dc8ff6"/><file name="ChannelOrderRequest.php" hash="f76b555f79c9ef7bc891fb1e8c272702"/><file name="ChannelProcessedChangesRequest.php" hash="811154776d351b4a4b4cfdd8e52dabea"/><file name="ChannelProductChangesResponse.php" hash="4005bddd62fb2f3fa8c5cbd18915c769"/><file name="ChannelProductResponse.php" hash="5c56cb7c3e7b066a416e492cea0ae5a3"/><file name="ChannelReferencesRequest.php" hash="8475df642ea577070897525ec531df5a"/><file name="ChannelReturnLineRequest.php" hash="efb6cafb95306f9a1daa174cdced04da"/><file name="ChannelReturnLineResponse.php" hash="cb278e5cb10e4f8e96319fdfdcd011e5"/><file name="ChannelReturnRequest.php" hash="ec2e7c79e2f64c88ed3022d5b777132a"/><file name="ChannelReturnResponse.php" hash="d4476c0c9c9254a7e61efaf733a99633"/><file name="ChannelShipmentLineResponse.php" hash="05c3bf0d034f2ec710d5c31d787995ae"/><file name="ChannelShipmentResponse.php" hash="018ba0efa56760cc898db241c4fb1960"/><file name="CollectionOfBackOrder.php" hash="ceb2f8cce017d574f95c31fd710925db"/><file name="CollectionOfChannelCancellationResponse.php" hash="d16d711ec15156e378ef1d47cb7c2035"/><file name="CollectionOfChannelOfferResponse.php" hash="e2aa6951e00d415a0e1d01fb5039c571"/><file name="CollectionOfChannelReturnResponse.php" hash="82fbfd1ab05901cd5f9ed0378315ff21"/><file name="CollectionOfChannelShipmentResponse.php" hash="6887ab42ff36160caeea7fe3e7a81a3f"/><file name="CollectionOfMerchantOrderResponse.php" hash="25c69cc1c18d5d378a66b4b6510c90ad"/><file name="CollectionOfMerchantReturnResponse.php" hash="3cb0aae8dc98658933abe39596112238"/><file name="EntitiesAddressModels.php" hash="0e77da388045bcd741491f0e808c5590"/><file name="ExtraDataItem.php" hash="fd4591749f2db73f7419fa60eb61ece1"/><file name="MerchantCancellationLineRequest.php" hash="fc592a1326f5d757518f136868e79abe"/><file name="MerchantCancellationRequest.php" hash="aa91c8397263205bd2ea352487a4789b"/><file name="MerchantOrderLineResponse.php" hash="3a03961b88af656a8d445fd6ad362c61"/><file name="MerchantOrderResponse.php" hash="204e6f13d44bc7c39359db3dfbc259e8"/><file name="MerchantProductRequest.php" hash="d30cac5bde0749267b31122027b5faf3"/><file name="MerchantProductResponse.php" hash="59637638ced5d01950f74e129f17118f"/><file name="MerchantReturnLineRequest.php" hash="febc3d102920720bab159b3cc7b096f1"/><file name="MerchantReturnLineResponse.php" hash="1c684535ba88a7667920b3d7e75e3864"/><file name="MerchantReturnRequest.php" hash="50ee599cf61519fed768072a87c4dd8c"/><file name="MerchantReturnResponse.php" hash="01b709acf280d9c068e6d201e09a5222"/><file name="MerchantShipmentLineRequest.php" hash="5304190e3a68136f3c0aec3de99e2424"/><file name="MerchantShipmentRequest.php" hash="541886892421fb9b2d358578779ca849"/><file name="MerchantShipmentTrackingRequest.php" hash="037a86688447c3fb348221e2ce587265"/><file name="OrderAcknowledgement.php" hash="dda1ada83257f1ee8aecae11c0fa3e32"/><file name="ProductCreationResult.php" hash="889dc202026af5080801077a48361c64"/><file name="ProductMessage.php" hash="673e069e1fc5e6ad9f05825f57922d25"/><file name="SingleOfBackOrder.php" hash="f2c5ea0cb45bba633e37b3f7fdd6b5ca"/><file name="SingleOfChannelProductChangesResponse.php" hash="9bd19387159ffbc97e846c37f2414f43"/><file name="SingleOfMerchantProductResponse.php" hash="d729298d1ebc24064de1e157db0e5357"/><file name="SingleOfProductCreationResult.php" hash="dbd32037409ae8a9a6bc70e8bb394ef9"/></dir><file name="ObjectSerializer.php" hash="e6842da289d7dfa60c4ad2cd427f0ac5"/></dir><file name="phpunit.xml.dist" hash="82cdb47416d5294f68042ad4ef3bbdfb"/><dir name="test"><dir name="Api"><file name="BackOrderApiTest.php" hash="38eadf8e5bd8d5b64e751cd995a5d14c"/><file name="CancellationApiTest.php" hash="2e708e7da73249459a5f2135bf7a6493"/><file name="ClientApiTest.php" hash="9977a02ce29e75244a6cc0f77d7b2f2f"/><file name="OrderApiTest.php" hash="a5171f8ba78f55d71b500f0dd3ffd339"/><file name="ProductApiTest.php" hash="8e2c07929122cae5f2bca51e9b3f7a53"/><file name="ReturnApiTest.php" hash="6f41f9c096a319c8ffdd1512ea6eeeb3"/><file name="ShipmentApiTest.php" hash="69ce282bb21987efcaf9ef58a4e3c929"/></dir><dir name="Model"><file name="ApiResponseTest.php" hash="47ad10b81c24c046d26a721593743549"/><file name="BackOrderLineTest.php" hash="386d64b5b048dba890fdf527a9384bdc"/><file name="BackOrderTest.php" hash="20db2c9fc8bc7b2ee95b23217ec90324"/><file name="ChannelCancellationLineResponseTest.php" hash="c3911b9a14fa6e6e224e1fef0d14ebe3"/><file name="ChannelCancellationResponseTest.php" hash="5ac4db00dec924f7991e30f7cd851a85"/><file name="ChannelOfferResponseTest.php" hash="864f75a5ec3d1164a494fa7611a99d74"/><file name="ChannelOrderLineRequestTest.php" hash="1bc6bdc75b0ca3f7fc81600b00adce9e"/><file name="ChannelOrderRequestTest.php" hash="28e9fcf7f92df24cd4eade51e924c418"/><file name="ChannelProcessedChangesRequestTest.php" hash="2e31c7235b56f4c78ca961692740b2a4"/><file name="ChannelProductChangesResponseTest.php" hash="23f00d9199f2cc208efc55ecdf9365c6"/><file name="ChannelProductResponseTest.php" hash="a28341ed1fef5facb5ff2f2c30a1fe6f"/><file name="ChannelReferencesRequestTest.php" hash="cde66fa66d8ba5d6d2d9179e37e6d9f2"/><file name="ChannelReturnLineRequestTest.php" hash="ed6494db84eedab689da22870e0ad909"/><file name="ChannelReturnLineResponseTest.php" hash="e914765391866a51659fd4022381f760"/><file name="ChannelReturnRequestTest.php" hash="96080f38514039e9f5bd97c49575bd8c"/><file name="ChannelReturnResponseTest.php" hash="02fbc0c9be981e10fa825d40ce77b1cd"/><file name="ChannelShipmentLineResponseTest.php" hash="4b2876b2f6cc0466a1575348a04aeab6"/><file name="ChannelShipmentResponseTest.php" hash="d8fb3ed6643a2da9139873b9f40e1ded"/><file name="CollectionOfBackOrderTest.php" hash="5b213ba119b95cc1b1cd47f38c7ae4ae"/><file name="CollectionOfChannelCancellationResponseTest.php" hash="d1aafe9dfddb92125a7613194ba04d1d"/><file name="CollectionOfChannelOfferResponseTest.php" hash="178d3c84aacd4f3ad3edc84a17bdbf02"/><file name="CollectionOfChannelReturnResponseTest.php" hash="6d53549630c3337a31bb1ecb87e61555"/><file name="CollectionOfChannelShipmentResponseTest.php" hash="a934c9bf97695687f3a2d5116fedae58"/><file name="CollectionOfMerchantOrderResponseTest.php" hash="7428c9b0708ca263a036ff90a9278e08"/><file name="CollectionOfMerchantReturnResponseTest.php" hash="9215b1ef54894b1d18c74b165521962d"/><file name="EntitiesAddressModelsTest.php" hash="7ce550b6e3c4eba3a17e8a1c026ecb72"/><file name="ExtraDataItemTest.php" hash="caa7c4e33ad26050ede14df690d94ce2"/><file name="MerchantCancellationLineRequestTest.php" hash="f06c4131e5472a835c82c0f46d035c6d"/><file name="MerchantCancellationRequestTest.php" hash="f8d8cc7821aa1ecf842935656019a914"/><file name="MerchantOrderLineResponseTest.php" hash="b22d878593d9286a96733cf7d19a19c5"/><file name="MerchantOrderResponseTest.php" hash="0aab3e4a85d092aa9dd5ae353a61c027"/><file name="MerchantProductRequestTest.php" hash="e9f310562cca319e8e25220dcda2fd5c"/><file name="MerchantProductResponseTest.php" hash="5ca76d16364c27f5a5dd7f0ee41ac9b4"/><file name="MerchantReturnLineRequestTest.php" hash="a5c136a8524288aca4ac9cb356dcdc2a"/><file name="MerchantReturnLineResponseTest.php" hash="3d5dbd7817316a7d05c0472d7abf5017"/><file name="MerchantReturnRequestTest.php" hash="aab02e41fa8a30c80323758cf823e70e"/><file name="MerchantReturnResponseTest.php" hash="216d32bab151c70cc757dd3604548980"/><file name="MerchantShipmentLineRequestTest.php" hash="fb14a111aa135c9c2fbf8426fe4ec209"/><file name="MerchantShipmentRequestTest.php" hash="9b654c3525eb68df96dd267fc90575f2"/><file name="MerchantShipmentTrackingRequestTest.php" hash="a2e71dd4870faba873059a1f00ef6a3a"/><file name="OrderAcknowledgementTest.php" hash="ec258b97dcdea4cf0f32abbe4dca3846"/><file name="ProductCreationResultTest.php" hash="925f49219cb866042d0f5fa3b3bbceb2"/><file name="ProductMessageTest.php" hash="70c0ef075db83195b5767fd21cb0e1a9"/><file name="SingleOfBackOrderTest.php" hash="56ec1bd486a42d7bee62d5aac02dccd2"/><file name="SingleOfChannelProductChangesResponseTest.php" hash="6687c279b79298dc67490387637d19fb"/><file name="SingleOfMerchantProductResponseTest.php" hash="856d0ed5e85f30d263dc3f4b5a59e58a"/><file name="SingleOfProductCreationResultTest.php" hash="02720936c9cd7429c65ae0ebe6a57ecd"/></dir></dir><file name=".gitignore" hash="a72c432223a956b74e9bd5ea5dd8b8c3"/><file name=".php_cs" hash="a921a6cf564b1304d4ff8721ab46d435"/><file name=".travis.yml" hash="8c1fae058e6e8d1f0d2fd39dc488a850"/></dir></dir><dir name="composer"><file name="ClassLoader.php" hash="292c079dbe63ba06bfbf37fd99fe4bf9"/><file name="LICENSE" hash="955d5fe58c231244f6b49000f383b5e2"/><file name="autoload_classmap.php" hash="8645d3a4e3ad87e7cf4d88a46717aab4"/><file name="autoload_namespaces.php" hash="35e12c7d76c4a81633bcf547c0e229a9"/><file name="autoload_psr4.php" hash="34e17c04104094e954858e2e564ff4b0"/><file name="autoload_real.php" hash="692ff591b75b6853c6661061389055a9"/><file name="autoload_static.php" hash="e4628c11a0745f787a3e9de5a5de4ad7"/><file name="installed.json" hash="cd50a8b83c078b04628a5aa85e5551b5"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="channelengine.xml" hash="ae6a00b46a84a610964743034eb72081"/></dir><dir name="template"><dir name="channelengine"><dir name="checkout"><file name="success.phtml" hash="dbcb8298cd52a3c44560ae911349a3c7"/></dir><file name="head.phtml" hash="a7a7ab566adc1dc7d2645bf1cdfac0d4"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="channelengine"><dir name="system"><dir name="config"><dir name="form"><file name="ajax_button.phtml" hash="882106ebb297393737bdf97d2ddc8e41"/></dir></dir></dir></dir></dir></dir></dir></dir></target></contents>
28
  <compatible/>
29
+ <dependencies><required><php><min>5.4.0</min><max>7.3.0</max></php><extension><name>curl</name><min/><max/></extension><extension><name>mbstring</name><min/><max/></extension><extension><name>json</name><min/><max/></extension></required></dependencies>
30
  </package>