Version Notes
- Refactored both products feed force download and datafeed to return attached file
Download this release
Release Info
Developer | inoutput.io |
Extension | Fruugo_Integration |
Version | 1.0.4 |
Comparing to | |
See all releases |
Code changes from version 1.0.3 to 1.0.4
- app/code/community/Fruugo/Integration/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/Block/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/Block/Catalog/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/Block/Catalog/Product/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/Block/Sales/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/Block/Sales/Order/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/Block/Sales/Order/View/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/Helper/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/Model/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/Model/Adminhtml/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/Model/Adminhtml/System/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/Model/Adminhtml/System/Config/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/Model/Adminhtml/System/Config/Backend/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/controllers/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/controllers/ProductsController.php +36 -16
- app/code/community/Fruugo/Integration/data/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/design/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/design/adminhtml/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/design/adminhtml/default/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/design/adminhtml/default/default/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/design/adminhtml/default/default/template/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/design/adminhtml/default/default/template/integration/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/design/adminhtml/default/default/template/integration/catalog/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/design/adminhtml/default/default/template/integration/catalog/product/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/design/adminhtml/default/default/template/integration/sales/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/design/adminhtml/default/default/template/integration/sales/order/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/design/adminhtml/default/default/template/integration/sales/order/view/.DS_Store +0 -0
- app/code/community/Fruugo/Integration/etc/config.xml +1 -1
- app/design/adminhtml/default/default/template/integration/.DS_Store +0 -0
- app/design/adminhtml/default/default/template/integration/catalog/.DS_Store +0 -0
- app/design/adminhtml/default/default/template/integration/catalog/product/.DS_Store +0 -0
- app/design/adminhtml/default/default/template/integration/sales/.DS_Store +0 -0
- app/design/adminhtml/default/default/template/integration/sales/order/.DS_Store +0 -0
- app/design/adminhtml/default/default/template/integration/sales/order/view/.DS_Store +0 -0
- package.xml +6 -6
app/code/community/Fruugo/Integration/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/Block/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/Block/Catalog/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/Block/Catalog/Product/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/Block/Sales/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/Block/Sales/Order/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/Block/Sales/Order/View/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/Helper/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/Model/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/Model/Adminhtml/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/Model/Adminhtml/System/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/Model/Adminhtml/System/Config/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/Model/Adminhtml/System/Config/Backend/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/controllers/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/controllers/ProductsController.php
CHANGED
@@ -29,29 +29,49 @@ class Fruugo_Integration_ProductsController extends Mage_Core_Controller_Front_A
|
|
29 |
{
|
30 |
$productsFeedGenerator = new Fruugo_Integration_ProductsFeedGenerator();
|
31 |
$productsXml = $productsFeedGenerator->generateProdcutsFeed(false);
|
32 |
-
$
|
33 |
-
$
|
34 |
-
fwrite($productsFeedFile, $productsXml->asXML());
|
35 |
-
fclose($productsFeedFile);
|
36 |
-
$this->getResponse()->setHeader('Content-type', 'text/xml');
|
37 |
-
$this->getResponse()->setBody($productsXml->asXML());
|
38 |
}
|
39 |
|
40 |
public function dataFeedAction()
|
41 |
{
|
42 |
$productsFeedGenerator = new Fruugo_Integration_ProductsFeedGenerator();
|
43 |
$cachedFile = $productsFeedGenerator->generateProdcutsFeed(true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
-
$
|
46 |
-
|
47 |
-
|
48 |
-
->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true)
|
49 |
-
->setHeader('Content-type', 'application/force-download')
|
50 |
-
->setHeader('Content-Length', filesize($cachedFile))
|
51 |
-
->setHeader('Content-Disposition', 'filename=' . basename($cachedFile));
|
52 |
-
$this->getResponse()->clearBody();
|
53 |
-
$this->getResponse()->sendHeaders();
|
54 |
-
readfile($cachedFile);
|
55 |
exit;
|
56 |
}
|
57 |
|
29 |
{
|
30 |
$productsFeedGenerator = new Fruugo_Integration_ProductsFeedGenerator();
|
31 |
$productsXml = $productsFeedGenerator->generateProdcutsFeed(false);
|
32 |
+
$this->writeProductsFile($productsXml->asXML());
|
33 |
+
$this->streamXmlFile($productsXml->asXML());
|
|
|
|
|
|
|
|
|
34 |
}
|
35 |
|
36 |
public function dataFeedAction()
|
37 |
{
|
38 |
$productsFeedGenerator = new Fruugo_Integration_ProductsFeedGenerator();
|
39 |
$cachedFile = $productsFeedGenerator->generateProdcutsFeed(true);
|
40 |
+
if (file_exists($cachedFile)) {
|
41 |
+
$productsXmlStr = file_get_contents($cachedFile);
|
42 |
+
$this->streamXmlFile($productsXmlStr);
|
43 |
+
} else {
|
44 |
+
$this->indexAction();
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
private function writeProductsFile($productsXmlStr)
|
49 |
+
{
|
50 |
+
$outputDir = Mage::getModuleDir('', 'Fruugo_Integration') . '/controllers/products.xml';
|
51 |
+
$productsFeedFile = fopen($outputDir, "w");
|
52 |
+
fwrite($productsFeedFile, $productsXmlStr);
|
53 |
+
fclose($productsFeedFile);
|
54 |
+
}
|
55 |
+
|
56 |
+
private function streamXmlFile($productsXmlStr)
|
57 |
+
{
|
58 |
+
if (function_exists('mb_strlen')) {
|
59 |
+
$filesize = mb_strlen($productsXmlStr, '8bit');
|
60 |
+
} else {
|
61 |
+
$filesize = strlen($productsXmlStr);
|
62 |
+
}
|
63 |
+
|
64 |
+
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
65 |
+
header('Content-Description: File Transfer');
|
66 |
+
header('Content-type: text/xml');
|
67 |
+
header('Expires: 0');
|
68 |
+
header('Pragma: public');
|
69 |
+
header('Content-Disposition: attachment; filename=products.xml');
|
70 |
+
header('Content-Length: ' . $filesize);
|
71 |
|
72 |
+
$file = fopen('php://output', 'w');
|
73 |
+
fwrite($file, $productsXmlStr);
|
74 |
+
fclose($file);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
exit;
|
76 |
}
|
77 |
|
app/code/community/Fruugo/Integration/data/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/design/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/design/adminhtml/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/design/adminhtml/default/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/design/adminhtml/default/default/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/design/adminhtml/default/default/template/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/design/adminhtml/default/default/template/integration/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/design/adminhtml/default/default/template/integration/catalog/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/design/adminhtml/default/default/template/integration/catalog/product/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/design/adminhtml/default/default/template/integration/sales/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/design/adminhtml/default/default/template/integration/sales/order/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/design/adminhtml/default/default/template/integration/sales/order/view/.DS_Store
DELETED
Binary file
|
app/code/community/Fruugo/Integration/etc/config.xml
CHANGED
@@ -24,7 +24,7 @@
|
|
24 |
<config>
|
25 |
<modules>
|
26 |
<Fruugo_Integration>
|
27 |
-
<version>1.0.
|
28 |
</Fruugo_Integration>
|
29 |
</modules>
|
30 |
<global>
|
24 |
<config>
|
25 |
<modules>
|
26 |
<Fruugo_Integration>
|
27 |
+
<version>1.0.4</version> <!-- Version number of your module -->
|
28 |
</Fruugo_Integration>
|
29 |
</modules>
|
30 |
<global>
|
app/design/adminhtml/default/default/template/integration/.DS_Store
DELETED
Binary file
|
app/design/adminhtml/default/default/template/integration/catalog/.DS_Store
DELETED
Binary file
|
app/design/adminhtml/default/default/template/integration/catalog/product/.DS_Store
DELETED
Binary file
|
app/design/adminhtml/default/default/template/integration/sales/.DS_Store
DELETED
Binary file
|
app/design/adminhtml/default/default/template/integration/sales/order/.DS_Store
DELETED
Binary file
|
app/design/adminhtml/default/default/template/integration/sales/order/view/.DS_Store
DELETED
Binary file
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Fruugo_Integration</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.gnu.org/licenses/">GNU</license>
|
7 |
<channel>community</channel>
|
@@ -14,11 +14,11 @@ This plugin mainly performs two tasks:
|
|
14 |
- Generate products xml feed from Magento periodically on a specified frequency.
|
15 |

|
16 |
- Read from Fruugo Rrders API periodically on a specified frequency, and notifies Magento order events to Fruugo Orders API.</description>
|
17 |
-
<notes>-
|
18 |
<authors><author><name>inoutput.io</name><user>inoutput</user><email>support@inoutput.io</email></author><author><name>fruugo.com</name><user>Fruugo</user><email>support@fruugo.com</email></author></authors>
|
19 |
-
<date>2015-09
|
20 |
-
<time>06:
|
21 |
-
<contents><target name="magecommunity"><dir name="Fruugo"><dir name="Integration"><dir name="Block"><dir name="Catalog"><dir name="Product"><file name="Tab.php" hash="412d5a38c07f78fd56e3509809038008"
|
22 |
<compatible/>
|
23 |
-
<dependencies><required><php><min>5.4.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.
|
24 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Fruugo_Integration</name>
|
4 |
+
<version>1.0.4</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.gnu.org/licenses/">GNU</license>
|
7 |
<channel>community</channel>
|
14 |
- Generate products xml feed from Magento periodically on a specified frequency.
|
15 |

|
16 |
- Read from Fruugo Rrders API periodically on a specified frequency, and notifies Magento order events to Fruugo Orders API.</description>
|
17 |
+
<notes>- Refactored both products feed force download and datafeed to return attached file</notes>
|
18 |
<authors><author><name>inoutput.io</name><user>inoutput</user><email>support@inoutput.io</email></author><author><name>fruugo.com</name><user>Fruugo</user><email>support@fruugo.com</email></author></authors>
|
19 |
+
<date>2015-10-09</date>
|
20 |
+
<time>00:06:24</time>
|
21 |
+
<contents><target name="magecommunity"><dir name="Fruugo"><dir name="Integration"><dir name="Block"><dir name="Catalog"><dir name="Product"><file name="Tab.php" hash="412d5a38c07f78fd56e3509809038008"/></dir></dir><file name="Refreshcountriesbutton.php" hash="5a7e3af708dd470725981ec187b2c07d"/><dir name="Sales"><dir name="Order"><dir name="View"><file name="Tabs.php" hash="d98faeeede3c06d5f28f8f9731438314"/></dir></dir></dir></dir><dir name="Helper"><file name="ConfigLoader.php" hash="f930d687b44fe0a3a9e70383e0500a7c"/><file name="Data.php" hash="866fe8e1ea50749218d6efcab8454f28"/><file name="Defines.php" hash="a97616fe105332db06292c68eabecdf1"/><file name="FruugoCountriesSeeder.php" hash="68949469a1b1ce6a605fccd132e9e3c0"/><file name="Logger.php" hash="ac482415c8c1bc6643c81779f3d580c7"/><file name="OrdersFeedProcessor.php" hash="9e78e9e84c14f54d137c1da3c7502166"/><file name="ProductsFeedGenerator.php" hash="925303775a6a70f68e9b3467b9a4861b"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Backend"><file name="OrderCron.php" hash="8187697b999171b8940be7e5306a3bc7"/><file name="ProductCron.php" hash="a8bdd62ad14cdb85d9ef0ae2b85cecad"/></dir><dir name="Source"><file name="Hour.php" hash="fab1337425532af32cf8642b8b244930"/><file name="ProductDescriptionType.php" hash="578f3cec24605d376d4014cf1e38d8cd"/></dir></dir></dir></dir><file name="Countries.php" hash="a23378525c616fd87c5589933aec48c6"/><file name="CronJobObserver.php" hash="e8ddc80c37a3ef2b4ce025879f04e7c0"/><file name="Observer.php" hash="1e16ebea05d59b472cc9f279965cd17e"/><file name="Payment.php" hash="4e7d2d72e7662ea71c178d85c9b9bd6c"/><dir name="Resource"><dir name="Countries"><file name="Collection.php" hash="618a95f1535d4c63724a2f7eaebf6c2b"/></dir><file name="Countries.php" hash="dc3da7aec3c3472a4ccd73e2b2f255f0"/><dir name="Shipment"><file name="Collection.php" hash="66d038f890e36403f9ffb2e283e88daf"/></dir><file name="Shipment.php" hash="d8c13444ba5089cf606241f2c7c9a87d"/></dir><file name="Shipment.php" hash="23b1c0b4bc4e29cb137c9b3819723a63"/></dir><dir name="controllers"><file name="OrdersController.php" hash="a2d9d2f4c916c376f146cfccecb4110d"/><file name="PackinglistController.php" hash="d76ac40e81f51635a073fb20492883f8"/><file name="ProductsController.php" hash="7b120e3ef0152ddc40821ef082786db4"/><file name=".gitignore" hash="acd4f929fc2eebc0a25a1b7a06b4f56f"/></dir><dir name="data"><dir name="fruugo_attributes_setup"><file name="data-install-0.1.1.php" hash="73a6210fdb6c5a2edfa0222a6a239e9a"/></dir></dir><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="integration.xml" hash="3f173b27f9f483c00b33b713c0bad737"/></dir><dir name="template"><dir name="integration"><dir name="catalog"><dir name="product"><file name="fruugo-allowed-countries.phtml" hash="066098b4583e6bd3882c01645bd9ed1d"/></dir></dir><dir name="sales"><dir name="order"><dir name="view"><dir name="tab"><file name="packinglist.phtml" hash="9ec64369d5c23043976b08573f3435dd"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="31cc0f7999569eb84c03c5165def1a1f"/><file name="system.xml" hash="23f4aed73b504d8b2d9dcca61af44fa6"/></dir><file name="fruugo_countries.json" hash="b4406193557bcce77104c2e669be65a5"/><dir name="sql"><dir name="fruugo_attributes_setup"><file name="install-0.1.1.php" hash="326629d7305e3c3b20aaf8d97de1f17b"/></dir></dir><file name=".gitignore" hash="f0cb20b35e2469e9e9617f658ed452a5"/></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="integration.xml" hash="3f173b27f9f483c00b33b713c0bad737"/></dir><dir name="template"><dir name="integration"><dir name="catalog"><dir name="product"><file name="fruugo-allowed-countries.phtml" hash="066098b4583e6bd3882c01645bd9ed1d"/></dir></dir><dir name="sales"><dir name="order"><dir name="view"><dir name="tab"><file name="packinglist.phtml" hash="9ec64369d5c23043976b08573f3435dd"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Fruugo_Integration.xml" hash="b01dcb5088d487517bd87af216d6d7c8"/></dir></target></contents>
|
22 |
<compatible/>
|
23 |
+
<dependencies><required><php><min>5.4.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.7</min><max/></package></required></dependencies>
|
24 |
</package>
|