Atosho - Version 1.1.4

Version Notes

Minor fixes

Download this release

Release Info

Developer Magento Core Team
Extension Atosho
Version 1.1.4
Comparing to
See all releases


Code changes from version 1.1.3 to 1.1.4

app/code/community/Atosho/AtoshoPayment/etc/system.xml CHANGED
@@ -30,7 +30,7 @@
30
  <order_status translate="label">
31
  <label>New order status</label>
32
  <frontend_type>select</frontend_type>
33
- <source_model>adminhtml/system_config_source_order_status_new</source_model>
34
  <sort_order>2</sort_order>
35
  <show_in_default>1</show_in_default>
36
  <show_in_website>1</show_in_website>
30
  <order_status translate="label">
31
  <label>New order status</label>
32
  <frontend_type>select</frontend_type>
33
+ <source_model>adminhtml/system_config_source_order_status</source_model>
34
  <sort_order>2</sort_order>
35
  <show_in_default>1</show_in_default>
36
  <show_in_website>1</show_in_website>
app/code/community/Atosho/Integration/controllers/FeedController.php CHANGED
@@ -13,8 +13,9 @@ class Atosho_Integration_FeedController extends Mage_Core_Controller_Front_Actio
13
  public function versionAction() {
14
  set_error_handler(array($this, 'errorHandler'));
15
 
 
16
  $writer = new XMLWriter();
17
- $writer->openURI('php://output');
18
  $writer->startDocument('1.0', 'UTF-8');
19
  $writer->setIndent(true);
20
  $writer->setIndentString("\t");
@@ -24,7 +25,7 @@ class Atosho_Integration_FeedController extends Mage_Core_Controller_Front_Actio
24
  $writer->writeElement('module', Mage::getConfig()->cleanCache()->getModuleConfig('Atosho_Integration')->version);
25
  $writer->endElement();
26
  $writer->endDocument();
27
- $writer->flush();
28
  }
29
 
30
 
@@ -71,8 +72,11 @@ class Atosho_Integration_FeedController extends Mage_Core_Controller_Front_Actio
71
  else {
72
  $info['simple'] = $simpleCollection->getSize();
73
  }
 
 
 
74
  $writer = new XMLWriter();
75
- $writer->openURI('php://output');
76
  $writer->startDocument('1.0', 'UTF-8');
77
  $writer->setIndent(true);
78
  $writer->setIndentString("\t");
@@ -82,7 +86,7 @@ class Atosho_Integration_FeedController extends Mage_Core_Controller_Front_Actio
82
  }
83
  $writer->endElement();
84
  $writer->endDocument();
85
- $writer->flush();
86
  }
87
 
88
 
@@ -204,6 +208,7 @@ class Atosho_Integration_FeedController extends Mage_Core_Controller_Front_Actio
204
  public function categoriesAction() {
205
  set_error_handler(array($this, 'errorHandler'));
206
 
 
207
  $params = Mage::app()->getRequest()->getParams();
208
  if (!isset($params['store'])) {
209
  $params['store'] = null;
@@ -226,7 +231,7 @@ class Atosho_Integration_FeedController extends Mage_Core_Controller_Front_Actio
226
  }
227
 
228
  $writer = new XMLWriter();
229
- $writer->openURI('php://output');
230
  $writer->startDocument('1.0', 'UTF-8');
231
  $writer->setIndent(true);
232
  $writer->setIndentString("\t");
@@ -237,13 +242,14 @@ class Atosho_Integration_FeedController extends Mage_Core_Controller_Front_Actio
237
 
238
  $writer->endElement();
239
  $writer->endDocument();
240
- $writer->flush();
241
  }
242
 
243
 
244
  public function productlistAction() {
245
  set_error_handler(array($this, 'errorHandler'));
246
 
 
247
  $params = Mage::app()->getRequest()->getParams();
248
  if (!isset($params['store'])) {
249
  $params['store'] = Mage::app()->getDefaultStoreView()->getId();
@@ -253,13 +259,13 @@ class Atosho_Integration_FeedController extends Mage_Core_Controller_Front_Actio
253
  $this->generateProductList();
254
 
255
  $writer = new XMLWriter();
256
- $writer->openURI('php://output');
257
  $writer->startDocument('1.0', 'UTF-8');
258
  $writer->setIndent(true);
259
  $writer->setIndentString("\t");
260
 
261
  $writer->writeComment('Peak: '.memory_get_peak_usage());
262
-
263
  $writer->startElement('productlist');
264
  foreach ($this->skus as $id => $product) {
265
  $writer->startElement('product');
@@ -268,11 +274,12 @@ class Atosho_Integration_FeedController extends Mage_Core_Controller_Front_Actio
268
  $writer->writeAttribute('type', $product['type']);
269
  $writer->writeAttribute('status', (int) ($product['status'] == 1) );
270
  $writer->endElement();
 
271
  }
272
  $writer->endElement();
273
 
274
  $writer->endDocument();
275
- $writer->flush();
276
  }
277
 
278
 
@@ -300,8 +307,9 @@ class Atosho_Integration_FeedController extends Mage_Core_Controller_Front_Actio
300
  }
301
 
302
  // XML
 
303
  $writer = new XMLWriter();
304
- $writer->openURI('php://output');
305
  $writer->startDocument('1.0', 'UTF-8');
306
  $writer->setIndent(true);
307
  $writer->setIndentString("\t");
@@ -310,7 +318,7 @@ class Atosho_Integration_FeedController extends Mage_Core_Controller_Front_Actio
310
  }
311
  $this->writeProduct($writer, $p);
312
  $writer->endDocument();
313
- $writer->flush();
314
  }
315
 
316
 
@@ -357,7 +365,6 @@ class Atosho_Integration_FeedController extends Mage_Core_Controller_Front_Actio
357
  }
358
 
359
  $products[$product->getId()] = $p;
360
- //echo memory_get_usage(false).PHP_EOL;
361
  }
362
 
363
  // Fill in parentsku where parentid is defined
@@ -384,8 +391,9 @@ class Atosho_Integration_FeedController extends Mage_Core_Controller_Front_Actio
384
  }
385
 
386
  // XML
 
387
  $writer = new XMLWriter();
388
- $writer->openURI('php://output');
389
  $writer->startDocument('1.0', 'UTF-8');
390
  $writer->setIndent(true);
391
  $writer->setIndentString("\t");
@@ -400,12 +408,12 @@ class Atosho_Integration_FeedController extends Mage_Core_Controller_Front_Actio
400
 
401
  foreach ($products as $p) {
402
  $this->writeProduct($writer, $p);
 
403
  }
404
 
405
  $writer->endElement();
406
  $writer->endDocument();
407
- $writer->flush();
408
- //print_r($products);
409
  }
410
 
411
 
13
  public function versionAction() {
14
  set_error_handler(array($this, 'errorHandler'));
15
 
16
+ $this->getResponse()->setHeader('Content-Type', 'application/xml');
17
  $writer = new XMLWriter();
18
+ $writer->openMemory();
19
  $writer->startDocument('1.0', 'UTF-8');
20
  $writer->setIndent(true);
21
  $writer->setIndentString("\t");
25
  $writer->writeElement('module', Mage::getConfig()->cleanCache()->getModuleConfig('Atosho_Integration')->version);
26
  $writer->endElement();
27
  $writer->endDocument();
28
+ $this->getResponse()->appendBody($writer->outputMemory());
29
  }
30
 
31
 
72
  else {
73
  $info['simple'] = $simpleCollection->getSize();
74
  }
75
+
76
+ // XML
77
+ $this->getResponse()->setHeader('Content-Type', 'application/xml');
78
  $writer = new XMLWriter();
79
+ $writer->openMemory();
80
  $writer->startDocument('1.0', 'UTF-8');
81
  $writer->setIndent(true);
82
  $writer->setIndentString("\t");
86
  }
87
  $writer->endElement();
88
  $writer->endDocument();
89
+ $this->getResponse()->appendBody($writer->outputMemory());
90
  }
91
 
92
 
208
  public function categoriesAction() {
209
  set_error_handler(array($this, 'errorHandler'));
210
 
211
+ $this->getResponse()->setHeader('Content-Type', 'application/xml');
212
  $params = Mage::app()->getRequest()->getParams();
213
  if (!isset($params['store'])) {
214
  $params['store'] = null;
231
  }
232
 
233
  $writer = new XMLWriter();
234
+ $writer->openMemory();
235
  $writer->startDocument('1.0', 'UTF-8');
236
  $writer->setIndent(true);
237
  $writer->setIndentString("\t");
242
 
243
  $writer->endElement();
244
  $writer->endDocument();
245
+ $this->getResponse()->appendBody($writer->outputMemory());
246
  }
247
 
248
 
249
  public function productlistAction() {
250
  set_error_handler(array($this, 'errorHandler'));
251
 
252
+ $this->getResponse()->setHeader('Content-Type', 'application/xml');
253
  $params = Mage::app()->getRequest()->getParams();
254
  if (!isset($params['store'])) {
255
  $params['store'] = Mage::app()->getDefaultStoreView()->getId();
259
  $this->generateProductList();
260
 
261
  $writer = new XMLWriter();
262
+ $writer->openMemory();
263
  $writer->startDocument('1.0', 'UTF-8');
264
  $writer->setIndent(true);
265
  $writer->setIndentString("\t");
266
 
267
  $writer->writeComment('Peak: '.memory_get_peak_usage());
268
+
269
  $writer->startElement('productlist');
270
  foreach ($this->skus as $id => $product) {
271
  $writer->startElement('product');
274
  $writer->writeAttribute('type', $product['type']);
275
  $writer->writeAttribute('status', (int) ($product['status'] == 1) );
276
  $writer->endElement();
277
+ $this->getResponse()->appendBody($writer->outputMemory());
278
  }
279
  $writer->endElement();
280
 
281
  $writer->endDocument();
282
+ $this->getResponse()->appendBody($writer->outputMemory());
283
  }
284
 
285
 
307
  }
308
 
309
  // XML
310
+ $this->getResponse()->setHeader('Content-Type', 'application/xml');
311
  $writer = new XMLWriter();
312
+ $writer->openMemory();
313
  $writer->startDocument('1.0', 'UTF-8');
314
  $writer->setIndent(true);
315
  $writer->setIndentString("\t");
318
  }
319
  $this->writeProduct($writer, $p);
320
  $writer->endDocument();
321
+ $this->getResponse()->appendBody($writer->outputMemory());
322
  }
323
 
324
 
365
  }
366
 
367
  $products[$product->getId()] = $p;
 
368
  }
369
 
370
  // Fill in parentsku where parentid is defined
391
  }
392
 
393
  // XML
394
+ $this->getResponse()->setHeader('Content-Type', 'application/xml');
395
  $writer = new XMLWriter();
396
+ $writer->openMemory();
397
  $writer->startDocument('1.0', 'UTF-8');
398
  $writer->setIndent(true);
399
  $writer->setIndentString("\t");
408
 
409
  foreach ($products as $p) {
410
  $this->writeProduct($writer, $p);
411
+ $this->getResponse()->appendBody($writer->outputMemory());
412
  }
413
 
414
  $writer->endElement();
415
  $writer->endDocument();
416
+ $this->getResponse()->appendBody($writer->outputMemory());
 
417
  }
418
 
419
 
app/code/community/Atosho/Integration/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Atosho_Integration>
5
- <version>1.1.3</version>
6
  </Atosho_Integration>
7
  </modules>
8
  <frontend>
2
  <config>
3
  <modules>
4
  <Atosho_Integration>
5
+ <version>1.1.4</version>
6
  </Atosho_Integration>
7
  </modules>
8
  <frontend>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Atosho</name>
4
- <version>1.1.3</version>
5
  <stability>stable</stability>
6
- <license>OSL-3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Atosho.com product and order integration</summary>
10
  <description>Exposes product catalog to Atosho in the form of an XML feed. Creates a new payment method called 'Atosho Payment' which indicates that an order has been paid through Atosho.</description>
11
  <notes>Minor fixes</notes>
12
  <authors><author><name>Atosho</name><user>auto-converted</user><email>magento@atosho.com</email></author></authors>
13
- <date>2012-07-02</date>
14
- <time>11:33:46</time>
15
- <contents><target name="mageetc"><dir name="modules"><file name="Atosho_All.xml" hash="80137c2c28f206ab9a22ffe1f9dbb58b"/></dir></target><target name="magecommunity"><dir name="Atosho"><dir name="Integration"><dir name="Model"><dir name="Mysql4"><file name="Setup.php" hash="814ccf08196d33a81a8a70485b7c6a2c"/></dir></dir><dir name="controllers"><file name="FeedController.php" hash="0dc4799c2419594f66b6ecc8e2a4283e"/></dir><dir name="etc"><file name="config.xml" hash="c3ba89eb7cd99ed5f146e8314be03f50"/></dir><dir name="sql"><dir name="atosho_integration_setup"><file name="mysql4-install-1.0.2.php" hash="23d224fabbe3979273ce398a2af5243d"/></dir></dir></dir><dir name="AtoshoPayment"><dir name="Model"><file name="AtoshoPayment.php" hash="7d9afd8abc45ca252ccf36ed7f70c27f"/></dir><dir name="etc"><file name="config.xml" hash="30b5190de1b9b2cb1d3759995ca7c2ff"/><file name="system.xml" hash="ca3e25cb7ceef0da772eb88f91dd32cc"/></dir></dir><dir name="Shipping"><dir name="Model"><dir name="Carrier"><file name="Atosho.php" hash="dcd80ea031ec160eadadac847e80973b"/></dir></dir><dir name="etc"><file name="config.xml" hash="6770b1b833aa1454da307015fdbe5216"/><file name="system.xml" hash="96c2ade90fd06ab5bc3ef787a2af029a"/></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Atosho</name>
4
+ <version>1.1.4</version>
5
  <stability>stable</stability>
6
+ <license/>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Atosho.com product and order integration</summary>
10
  <description>Exposes product catalog to Atosho in the form of an XML feed. Creates a new payment method called 'Atosho Payment' which indicates that an order has been paid through Atosho.</description>
11
  <notes>Minor fixes</notes>
12
  <authors><author><name>Atosho</name><user>auto-converted</user><email>magento@atosho.com</email></author></authors>
13
+ <date>2013-10-10</date>
14
+ <time>13:23:32</time>
15
+ <contents><target name="mageetc"><dir name="modules"><file name="Atosho_All.xml" hash="80137c2c28f206ab9a22ffe1f9dbb58b"/></dir></target><target name="magecommunity"><dir name="Atosho"><dir name="Integration"><dir name="Model"><dir name="Mysql4"><file name="Setup.php" hash="814ccf08196d33a81a8a70485b7c6a2c"/></dir></dir><dir name="controllers"><file name="FeedController.php" hash="4dc6aa3b6e3f188d1f69a43d91c7ec51"/></dir><dir name="etc"><file name="config.xml" hash="3274c50275836ad6f982c5d3490da9cc"/></dir><dir name="sql"><dir name="atosho_integration_setup"><file name="mysql4-install-1.0.2.php" hash="23d224fabbe3979273ce398a2af5243d"/></dir></dir></dir><dir name="AtoshoPayment"><dir name="Model"><file name="AtoshoPayment.php" hash="7d9afd8abc45ca252ccf36ed7f70c27f"/></dir><dir name="etc"><file name="config.xml" hash="30b5190de1b9b2cb1d3759995ca7c2ff"/><file name="system.xml" hash="6e8a5d350fb7108eb9f9f9820ff81fd3"/></dir></dir><dir name="Shipping"><dir name="Model"><dir name="Carrier"><file name="Atosho.php" hash="dcd80ea031ec160eadadac847e80973b"/></dir></dir><dir name="etc"><file name="config.xml" hash="6770b1b833aa1454da307015fdbe5216"/><file name="system.xml" hash="96c2ade90fd06ab5bc3ef787a2af029a"/></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>