FarApp_Connector - Version 1.1.8

Version Notes

Small fix to resolve image naming issues

Download this release

Release Info

Developer FarApp
Extension FarApp_Connector
Version 1.1.8
Comparing to
See all releases


Code changes from version 1.1.7 to 1.1.8

app/code/community/FarApp/Connector/Model/Import/Entity/.Product.php.swp ADDED
Binary file
app/code/community/FarApp/Connector/Model/Import/Entity/Product.php CHANGED
@@ -71,16 +71,18 @@ class FarApp_Connector_Model_Import_Entity_Product extends Mage_ImportExport_Mod
71
 
72
  protected function _uploadMediaFiles($fileName)
73
  {
74
- $fullTempPath = $this->_getUploader()->getTmpDir() . DS . basename($fileName);
75
- $fullDestPath = $this->_getUploader()->correctFileNameCase(Mage_Core_Model_File_Uploader::getDispretionPath(basename($fileName)) . DS . basename($fileName));
76
- if (!is_file($fullTempPath) && !is_file($fullDestPath)) {
77
- if (strpos($fileName, 'http') === 0 && strpos($fileName, '://') !== false) {
 
 
78
  try {
79
  $dir = $this->_getUploader()->getTmpDir();
80
  if (!is_dir($dir)) {
81
  mkdir($dir);
82
  }
83
- $fileHandle = fopen($dir . DS . basename($fileName), 'w+');
84
  $ch = curl_init($fileName);
85
  curl_setopt($ch, CURLOPT_TIMEOUT, 50);
86
  curl_setopt($ch, CURLOPT_FILE, $fileHandle);
@@ -92,10 +94,10 @@ class FarApp_Connector_Model_Import_Entity_Product extends Mage_ImportExport_Mod
92
  return '';
93
  }
94
  }
95
- return parent::_uploadMediaFiles(basename($fileName));
96
  }
97
  else {
98
- return $fullDestPath;
99
  }
100
  }
101
 
71
 
72
  protected function _uploadMediaFiles($fileName)
73
  {
74
+ $correctedBaseName = Mage_Core_Model_File_Uploader::getCorrectFileName(basename($fileName));
75
+ $fullTempPath = $this->_getUploader()->getTmpDir() . DS . $correctedBaseName;
76
+ $destPath = $this->_getUploader()->correctFileNameCase(Mage_Core_Model_File_Uploader::getDispretionPath(basename($fileName)) . DS . $correctedBaseName);
77
+ $fullDestPath = $this->_getUploader()->getDestDir() . DS . $destPath;
78
+ if (!is_file($fullDestPath)) {
79
+ if (!is_file($fullTempPath) && strpos($fileName, 'http') === 0 && strpos($fileName, '://') !== false) {
80
  try {
81
  $dir = $this->_getUploader()->getTmpDir();
82
  if (!is_dir($dir)) {
83
  mkdir($dir);
84
  }
85
+ $fileHandle = fopen($fullTempPath, 'w+');
86
  $ch = curl_init($fileName);
87
  curl_setopt($ch, CURLOPT_TIMEOUT, 50);
88
  curl_setopt($ch, CURLOPT_FILE, $fileHandle);
94
  return '';
95
  }
96
  }
97
+ return parent::_uploadMediaFiles($correctedBaseName);
98
  }
99
  else {
100
+ return $destPath;
101
  }
102
  }
103
 
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>FarApp_Connector</name>
4
- <version>1.1.7</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.farapp.com/p/farapp-subscription-form">Commercial</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Connector to sync product data from FarApp to Magento. FarApp currently supports NetSuite and other backends.</summary>
10
  <description>FarApp is a cloud-based solution for posting product data to storefronts, retrieving orders from storefront and posting fulfillments to storefronts. We support various backends including NetSuite, X-Cart, 3D-Cart, and more. This connector allows full product data posting to Magento from FarApp. It has the the extra benefits of allowing FarApp to dynamically push new product data, automatically creating new attribute options and importing external images (features not provided by Magento).</description>
11
- <notes>Small fix to resolve image name case-sensitivity issue</notes>
12
  <authors><author><name>FarApp</name><user>FarApp</user><email>support@farapp.com</email></author></authors>
13
- <date>2015-01-08</date>
14
- <time>18:08:44</time>
15
- <contents><target name="magecommunity"><dir name="FarApp"><dir name="Connector"><dir name="Model"><dir name="Export"><dir name="Adapter"><file name="Abstract.php" hash="765dc8fbab996f17b9f049cc8aa906a0"/><file name="Array.php" hash="6ca62c702dcb9512ec429563ac1ce1a2"/></dir><dir name="Entity"><file name="Order.php" hash="14a2f735cf8fc5e8f2bcd6682a1e56b1"/></dir></dir><file name="Export.php" hash="01643ef101731c6d98bbc523642f95a0"/><dir name="Import"><dir name="Entity"><file name="Customer.php" hash="376978f635c73605d428037cca8cf594"/><file name="Order.php" hash="38579396825a1bd3ad59de84278085f6"/><file name="Product.php" hash="33b910a089d558f60d1814a12d30f327"/><file name="minVersion2.php" hash="8df670fd68516ba1629304ae8ab6c812"/></dir></dir><file name="Import.php" hash="5f226d5505bf8e258a4e61f43b09b25a"/><dir name="Order"><dir name="Invoice"><file name="Api.php" hash="f133255dae51ab9c44c71ca9cc702d0a"/></dir></dir></dir><dir name="controllers"><file name="ExportController.php" hash="c994585c4535fc8b402160960092be95"/><file name="ImportController.php" hash="ec66abaf46073b9491889a199d665992"/><file name="IndexController.php" hash="93918848d3ce7f6ad05688f89a730e75"/></dir><dir name="etc"><file name="api.xml" hash="25b50336e5bfbd139eeb81bbf321dd78"/><file name="config.xml" hash="aa3818f527556d30f43e33d60f527731"/><file name="wsdl.xml" hash="831bf87f9939132a9d9be6327d1b6a8e"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="FarApp_Connector.xml" hash="ff3fe315c70239229cb5ff3a49d40967"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.0.0</min><max>5.6.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.6.0.0</min><max>1.9.0.1</max></package></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>FarApp_Connector</name>
4
+ <version>1.1.8</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.farapp.com/p/farapp-subscription-form">Commercial</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Connector to sync product data from FarApp to Magento. FarApp currently supports NetSuite and other backends.</summary>
10
  <description>FarApp is a cloud-based solution for posting product data to storefronts, retrieving orders from storefront and posting fulfillments to storefronts. We support various backends including NetSuite, X-Cart, 3D-Cart, and more. This connector allows full product data posting to Magento from FarApp. It has the the extra benefits of allowing FarApp to dynamically push new product data, automatically creating new attribute options and importing external images (features not provided by Magento).</description>
11
+ <notes>Small fix to resolve image naming issues</notes>
12
  <authors><author><name>FarApp</name><user>FarApp</user><email>support@farapp.com</email></author></authors>
13
+ <date>2015-01-13</date>
14
+ <time>19:36:07</time>
15
+ <contents><target name="magecommunity"><dir name="FarApp"><dir name="Connector"><dir name="Model"><dir name="Export"><dir name="Adapter"><file name="Abstract.php" hash="765dc8fbab996f17b9f049cc8aa906a0"/><file name="Array.php" hash="6ca62c702dcb9512ec429563ac1ce1a2"/></dir><dir name="Entity"><file name="Order.php" hash="14a2f735cf8fc5e8f2bcd6682a1e56b1"/></dir></dir><file name="Export.php" hash="01643ef101731c6d98bbc523642f95a0"/><dir name="Import"><dir name="Entity"><file name="Customer.php" hash="376978f635c73605d428037cca8cf594"/><file name="Order.php" hash="38579396825a1bd3ad59de84278085f6"/><file name="Product.php" hash="4d99fbda283b0b96be7db7574ee715fe"/><file name="minVersion2.php" hash="8df670fd68516ba1629304ae8ab6c812"/><file name=".Product.php.swp" hash="5c77f3dbe8a6ac1d7563044bcac4d549"/></dir></dir><file name="Import.php" hash="5f226d5505bf8e258a4e61f43b09b25a"/><dir name="Order"><dir name="Invoice"><file name="Api.php" hash="f133255dae51ab9c44c71ca9cc702d0a"/></dir></dir></dir><dir name="controllers"><file name="ExportController.php" hash="c994585c4535fc8b402160960092be95"/><file name="ImportController.php" hash="ec66abaf46073b9491889a199d665992"/><file name="IndexController.php" hash="93918848d3ce7f6ad05688f89a730e75"/></dir><dir name="etc"><file name="api.xml" hash="25b50336e5bfbd139eeb81bbf321dd78"/><file name="config.xml" hash="aa3818f527556d30f43e33d60f527731"/><file name="wsdl.xml" hash="831bf87f9939132a9d9be6327d1b6a8e"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="FarApp_Connector.xml" hash="ff3fe315c70239229cb5ff3a49d40967"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.0.0</min><max>5.6.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.6.0.0</min><max>1.9.0.1</max></package></required></dependencies>
18
  </package>