diff --git a/core/lib/Thelia/ImportExport/Export/ExportHandler.php b/core/lib/Thelia/ImportExport/Export/ExportHandler.php index aa117249b..e051cbf57 100644 --- a/core/lib/Thelia/ImportExport/Export/ExportHandler.php +++ b/core/lib/Thelia/ImportExport/Export/ExportHandler.php @@ -219,7 +219,10 @@ abstract class ExportHandler extends AbstractHandler $path = $model->getUploadDir() . DS . $model->getFile(); if (is_file($path) && is_readable($path)) { - $paths[$model->getTitle() . DS . $model->getFile()] = $path; + $parent = $model->getParentFileModel(); + + $name = constant($parent::TABLE_MAP . "::TABLE_NAME"); + $paths[$name . DS . $model->getFile()] = $path; } } diff --git a/core/lib/Thelia/Tests/ImportExport/Export/CustomerExportTest.php b/core/lib/Thelia/Tests/ImportExport/Export/CustomerExportTest.php index 82db41f6c..55fb66ab2 100644 --- a/core/lib/Thelia/Tests/ImportExport/Export/CustomerExportTest.php +++ b/core/lib/Thelia/Tests/ImportExport/Export/CustomerExportTest.php @@ -183,10 +183,8 @@ class CustomerExportTest extends \PHPUnit_Framework_TestCase sort($rowKeys); $this->assertEquals($rowKeys, $keys); - - ++$i; } while ( - isset($rawData[$i]["ref"]) && + isset($rawData[++$i]["ref"]) && $rawData[$i-1]["ref"] === $rawData[$i]["ref"] && ++$max );