diff --git a/core/lib/Thelia/Config/Resources/config.xml b/core/lib/Thelia/Config/Resources/config.xml index 25c59abd2..6e001e18a 100644 --- a/core/lib/Thelia/Config/Resources/config.xml +++ b/core/lib/Thelia/Config/Resources/config.xml @@ -175,5 +175,9 @@ + + + + diff --git a/core/lib/Thelia/Controller/Admin/ExportController.php b/core/lib/Thelia/Controller/Admin/ExportController.php index 767216795..7c04b7a7e 100644 --- a/core/lib/Thelia/Controller/Admin/ExportController.php +++ b/core/lib/Thelia/Controller/Admin/ExportController.php @@ -261,7 +261,7 @@ class ExportController extends BaseAdminController $loop = new ExportLoop($this->container); $loop->initializeArgs([ - "export" => $export->getId() + "id" => $export->getId() ]); $query = $loop->buildModelCriteria(); diff --git a/core/lib/Thelia/Controller/Admin/ImportController.php b/core/lib/Thelia/Controller/Admin/ImportController.php index 6b718b16d..5bbb69107 100644 --- a/core/lib/Thelia/Controller/Admin/ImportController.php +++ b/core/lib/Thelia/Controller/Admin/ImportController.php @@ -326,7 +326,7 @@ class ImportController extends BaseAdminController $loop = new ImportLoop($this->container); $loop->initializeArgs([ - "export" => $import->getId() + "id" => $id ]); $query = $loop->buildModelCriteria(); diff --git a/core/lib/Thelia/Core/FileFormat/Formatting/Formatter/CSVFormatter.php b/core/lib/Thelia/Core/FileFormat/Formatting/Formatter/CSVFormatter.php index 004cab8a0..f0b759c1e 100644 --- a/core/lib/Thelia/Core/FileFormat/Formatting/Formatter/CSVFormatter.php +++ b/core/lib/Thelia/Core/FileFormat/Formatting/Formatter/CSVFormatter.php @@ -78,6 +78,7 @@ class CSVFormatter extends AbstractFormatter public function encode(FormatterData $data) { $string = ""; + $firstRow = $data->getRow(); $delimiterLength = strlen($this->delimiter); $lineReturnLength = strlen($this->lineReturn); diff --git a/core/lib/Thelia/Core/FileFormat/Formatting/FormatterData.php b/core/lib/Thelia/Core/FileFormat/Formatting/FormatterData.php index 992713ef3..48da31789 100644 --- a/core/lib/Thelia/Core/FileFormat/Formatting/FormatterData.php +++ b/core/lib/Thelia/Core/FileFormat/Formatting/FormatterData.php @@ -184,7 +184,7 @@ class FormatterData * @return array|bool * @throws \OutOfBoundsException */ - public function getRow($index = 0) + public function getRow($index = 0, $reverseAliases = false) { if (empty($this->data)) { return false; @@ -199,7 +199,11 @@ class FormatterData ); } - $row = $this->reverseAliases($this->data[$index], $this->aliases); + $row = $this->data[$index]; + + if ($reverseAliases === true) { + $row = $this->reverseAliases($row, $this->aliases); + } return $row; }