AMartinez_CustomImportExport - Version 1.5.009

Version Notes

Magento 1.5 version.

Download this release

Release Info

Developer Antonio Martinez
Extension AMartinez_CustomImportExport
Version 1.5.009
Comparing to
See all releases


Code changes from version 1.5.008 to 1.5.009

app/code/community/AMartinez/CustomImportExport/Helper/Data.php CHANGED
@@ -5,7 +5,7 @@
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
- * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla@gmail.com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
+ * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla [at] gmail [dot] com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
app/code/community/AMartinez/CustomImportExport/Model/Backup.php CHANGED
@@ -5,7 +5,7 @@
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
- * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla@gmail.com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
+ * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla [at] gmail [dot] com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
app/code/community/AMartinez/CustomImportExport/Model/Export.php CHANGED
@@ -5,7 +5,7 @@
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
- * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla@gmail.com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
+ * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla [at] gmail [dot] com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
app/code/community/AMartinez/CustomImportExport/Model/Import.php CHANGED
@@ -5,7 +5,7 @@
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
- * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla@gmail.com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
+ * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla [at] gmail [dot] com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
app/code/community/AMartinez/CustomImportExport/Model/Import/Adapter.php CHANGED
@@ -5,7 +5,7 @@
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
- * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla@gmail.com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
+ * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla [at] gmail [dot] com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
app/code/community/AMartinez/CustomImportExport/Model/Import/Adapter/Csv1.php CHANGED
@@ -5,7 +5,7 @@
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
- * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla@gmail.com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
+ * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla [at] gmail [dot] com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
app/code/community/AMartinez/CustomImportExport/Model/Import/Entity/Customer.php CHANGED
@@ -5,7 +5,7 @@
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
- * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla@gmail.com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
+ * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla [at] gmail [dot] com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
app/code/community/AMartinez/CustomImportExport/Model/Import/Entity/Customer/Address.php CHANGED
@@ -5,7 +5,7 @@
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
- * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla@gmail.com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
+ * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla [at] gmail [dot] com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
app/code/community/AMartinez/CustomImportExport/Model/Import/Entity/Product.php CHANGED
@@ -5,7 +5,7 @@
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
- * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla@gmail.com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
+ * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla [at] gmail [dot] com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
app/code/community/AMartinez/CustomImportExport/Model/Import/Entity/Product/Type/Configurable.php CHANGED
@@ -5,7 +5,7 @@
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
- * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla@gmail.com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
+ * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla [at] gmail [dot] com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
app/code/community/AMartinez/CustomImportExport/Model/Import/Entity/Product/Type/Grouped.php CHANGED
@@ -5,7 +5,7 @@
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
- * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla@gmail.com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
+ * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla [at] gmail [dot] com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
app/code/community/AMartinez/CustomImportExport/Model/Import/Entity/Product/Type/Simple.php CHANGED
@@ -5,7 +5,7 @@
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
- * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla@gmail.com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
+ * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla [at] gmail [dot] com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
app/code/community/AMartinez/CustomImportExport/etc/config.xml CHANGED
@@ -6,7 +6,7 @@
6
  * @category AMartinez
7
  * @package AMartinez_CustomImportExport
8
  * @author Antonio Martinez
9
- * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla@gmail.com)
10
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
11
  */
12
  -->
6
  * @category AMartinez
7
  * @package AMartinez_CustomImportExport
8
  * @author Antonio Martinez
9
+ * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla [at] gmail [dot] com)
10
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
11
  */
12
  -->
app/code/community/AMartinez/CustomImportExport/shell/run.php CHANGED
@@ -5,7 +5,7 @@
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
- * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla@gmail.com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
@@ -64,7 +64,7 @@ class AMartinez_CustomImportExport extends Mage_Shell_Abstract
64
  while($line = fgets($h))
65
  {
66
  // first iteration, no "attr-only" line, line count has been reached
67
- if ($i == 0 || (substr($line, 0 ,1) != ',' && $i > $linecount && !($linecount === true)))
68
  {
69
  if (defined('t'))
70
  {
@@ -120,7 +120,7 @@ class AMartinez_CustomImportExport extends Mage_Shell_Abstract
120
  }
121
  unlink($file);
122
  }
123
- echo "Done (processed rows count: " . $count . ")\n";
124
  }
125
 
126
  // products export
@@ -501,7 +501,7 @@ class AMartinez_CustomImportExport extends Mage_Shell_Abstract
501
  public function usageHelp()
502
  {
503
  return <<<HELP
504
- AMartinez_CustomImportExport script (v. 1.5.008)
505
 
506
  NAME
507
  run.php
@@ -573,6 +573,9 @@ EXAMPLES
573
  php -f app/code/community/AMartinez/CustomImportExport/shell/run.php -- -e var/importexport/products.csv
574
  php -f app/code/community/AMartinez/CustomImportExport/shell/run.php -- -databasebackup -import -all
575
 
 
 
 
576
 
577
  HELP;
578
  }
5
  * @category AMartinez
6
  * @package AMartinez_CustomImportExport
7
  * @author Antonio Martinez
8
+ * @copyright Copyright (c) 2011 Antonio Martínez (toniyecla [at] gmail [dot] com)
9
  * @license http://opensource.org/licenses/osl-3.0 Open Software License (OSL 3.0)
10
  */
11
 
64
  while($line = fgets($h))
65
  {
66
  // first iteration, no "attr-only" line, line count has been reached
67
+ if ($i == 0 || (substr($line, 0 ,1) != ',' && substr($line, 0 ,2) != '""' && substr($line, 0 ,2) != "''" && $i > $linecount && !($linecount === true)))
68
  {
69
  if (defined('t'))
70
  {
120
  }
121
  unlink($file);
122
  }
123
+ echo "\nDone (processed rows count: " . $count . ")\n";
124
  }
125
 
126
  // products export
501
  public function usageHelp()
502
  {
503
  return <<<HELP
504
+ AMartinez_CustomImportExport script (v. 1.5.009)
505
 
506
  NAME
507
  run.php
573
  php -f app/code/community/AMartinez/CustomImportExport/shell/run.php -- -e var/importexport/products.csv
574
  php -f app/code/community/AMartinez/CustomImportExport/shell/run.php -- -databasebackup -import -all
575
 
576
+ CREDITS
577
+ I would be delighted to hear from you if you like this script. I also appreciate any donation you wish to contribute to the growth of this project (paypal: toniyecla [at] gmail [dot] com).
578
+
579
 
580
  HELP;
581
  }
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>AMartinez_CustomImportExport</name>
4
- <version>1.5.008</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0">OSL v3.0</license>
7
  <channel>community</channel>
@@ -71,6 +71,10 @@ OPTIONS&#xD;
71
  -flushimages&#xD;
72
  flush catalog images cache&#xD;
73
  &#xD;
 
 
 
 
74
  -p&#xD;
75
  -applyrules&#xD;
76
  recalculate catalog price rules&#xD;
@@ -84,12 +88,16 @@ EXAMPLES&#xD;
84
  php -f app/code/community/AMartinez/CustomImportExport/shell/run.php -- -all&#xD;
85
  php -f app/code/community/AMartinez/CustomImportExport/shell/run.php -- -a -i var/importexport/products.csv&#xD;
86
  php -f app/code/community/AMartinez/CustomImportExport/shell/run.php -- -e var/importexport/products.csv&#xD;
87
- php -f app/code/community/AMartinez/CustomImportExport/shell/run.php -- -databasebackup -import -all</description>
 
 
 
 
88
  <notes>Magento 1.5 version.</notes>
89
  <authors><author><name>Antonio Martinez</name><user>amartinez</user><email>toniyecla@gmail.com</email></author></authors>
90
- <date>2011-05-11</date>
91
- <time>17:57:21</time>
92
- <contents><target name="magecommunity"><dir name="AMartinez"><dir name="CustomImportExport"><dir name="Helper"><file name="Data.php" hash="0c8b64920ba9cf893513573bbbb55549"/></dir><dir name="Model"><file name="Backup.php" hash="fcdfe4eaa58adcacb0ae46c74d8698bd"/><file name="Export.php" hash="010ef7eb6564b48a721dd32b0ee4c3e8"/><dir name="Import"><dir name="Adapter"><file name="Csv1.php" hash="fa713ee0bc9034befd91eee758fc2d0a"/></dir><file name="Adapter.php" hash="6d7d568cc3dfe002763638513bc04b7f"/><dir name="Entity"><dir name="Customer"><file name="Address.php" hash="d8bead4d90523f54a451b0fc55ff1462"/></dir><file name="Customer.php" hash="d1af4445b6a38f77feaf843623658955"/><dir name="Product"><dir name="Type"><file name="Configurable.php" hash="3614bf1abe10bb500219c787c2a6ebcc"/><file name="Grouped.php" hash="b7c054303353d88e5d0c9fd303670ef5"/><file name="Simple.php" hash="48cdfdfc5c2e42b011e83483f50690c4"/></dir></dir><file name="Product.php" hash="84257daddd6a8d47bc94fa5fe81c0a2d"/></dir></dir><file name="Import.php" hash="df2c81435b1ceb01170abc64daf7d3a4"/></dir><dir name="etc"><file name="config.xml" hash="fd18e1c97a8b1dbbd2bc3122d721da57"/></dir><dir name="shell"><file name="run.php" hash="6c797300adfc556555fa36323d3da508"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="AMartinez_CustomImportExport.xml" hash="75ba4fbc265d1cf2b6ab61b8f3a3b95e"/></dir></target><target name="mage"><dir name="var"><dir name="customimportexport"><file name="test_configurable.csv" hash="d0447d047ef94f2f65a9fd375348cd39"/><file name="test_grouped.csv" hash="9c76b71b05c8e2b52efae4725f4119a4"/><file name="test_single_row_style.csv1" hash="dfcd266cb65ab97e93f9402e4f32bffb"/></dir></dir></target></contents>
93
  <compatible/>
94
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
95
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>AMartinez_CustomImportExport</name>
4
+ <version>1.5.009</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0">OSL v3.0</license>
7
  <channel>community</channel>
71
  -flushimages&#xD;
72
  flush catalog images cache&#xD;
73
  &#xD;
74
+ -l &lt;n&gt;&#xD;
75
+ -linecount &lt;n&gt;&#xD;
76
+ split import file into pieces of n lines length&#xD;
77
+ &#xD;
78
  -p&#xD;
79
  -applyrules&#xD;
80
  recalculate catalog price rules&#xD;
88
  php -f app/code/community/AMartinez/CustomImportExport/shell/run.php -- -all&#xD;
89
  php -f app/code/community/AMartinez/CustomImportExport/shell/run.php -- -a -i var/importexport/products.csv&#xD;
90
  php -f app/code/community/AMartinez/CustomImportExport/shell/run.php -- -e var/importexport/products.csv&#xD;
91
+ php -f app/code/community/AMartinez/CustomImportExport/shell/run.php -- -databasebackup -import -all&#xD;
92
+ &#xD;
93
+ CREDITS&#xD;
94
+ I would be delighted to hear from you if you like this script. I also appreciate any donation you wish to contribute to the growth of this project (paypal: toniyecla [at] gmail [dot] com).&#xD;
95
+ </description>
96
  <notes>Magento 1.5 version.</notes>
97
  <authors><author><name>Antonio Martinez</name><user>amartinez</user><email>toniyecla@gmail.com</email></author></authors>
98
+ <date>2011-05-12</date>
99
+ <time>07:19:37</time>
100
+ <contents><target name="magecommunity"><dir name="AMartinez"><dir name="CustomImportExport"><dir name="Helper"><file name="Data.php" hash="798c6c9b7adc8e5a66c8d00d7d475485"/></dir><dir name="Model"><file name="Backup.php" hash="0e673d6ab8a39f33bd1185b6627fb742"/><file name="Export.php" hash="252ef36d1b5e93e9f38e8d45dd72b030"/><dir name="Import"><dir name="Adapter"><file name="Csv1.php" hash="19d8b3a331d0e3f09391cddaeaa3b62b"/></dir><file name="Adapter.php" hash="1f6307308ffeeacaa1063c648b0893a8"/><dir name="Entity"><dir name="Customer"><file name="Address.php" hash="e06e286e132d4d2ec8548ebc66f257e1"/></dir><file name="Customer.php" hash="555a87242f1a613629c5d14bde5d23b8"/><dir name="Product"><dir name="Type"><file name="Configurable.php" hash="a2b2e51eae786e9b88985fe73bf3489a"/><file name="Grouped.php" hash="3b7276788d8471eaa45164070f326d26"/><file name="Simple.php" hash="1039c14bccd4973cfc6a3e73471e434c"/></dir></dir><file name="Product.php" hash="730c7fe0f0f7564288ede81d5b8b5789"/></dir></dir><file name="Import.php" hash="6d182eb456ea8785d0571f640efbdaac"/></dir><dir name="etc"><file name="config.xml" hash="6a502554a8eeb6e878bfacfc4a339e74"/></dir><dir name="shell"><file name="run.php" hash="77a38c5392ae74e20d6606e8ca023442"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="AMartinez_CustomImportExport.xml" hash="75ba4fbc265d1cf2b6ab61b8f3a3b95e"/></dir></target><target name="mage"><dir name="var"><dir name="customimportexport"><file name="test_configurable.csv" hash="d0447d047ef94f2f65a9fd375348cd39"/><file name="test_grouped.csv" hash="9c76b71b05c8e2b52efae4725f4119a4"/><file name="test_single_row_style.csv1" hash="dfcd266cb65ab97e93f9402e4f32bffb"/></dir></dir></target></contents>
101
  <compatible/>
102
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
103
  </package>