Fix bugs and add Product prices export
modifié: core/lib/Thelia/Config/Resources/export.xml modifié: core/lib/Thelia/Controller/Admin/ImportController.php modifié: core/lib/Thelia/Core/DependencyInjection/Loader/XmlFileLoader.php modifié: core/lib/Thelia/Core/DependencyInjection/Loader/schema/dic/config/thelia-1.0.xsd nouveau fichier: core/lib/Thelia/ImportExport/Export/Type/ProductPricesExport.php modifié: core/lib/Thelia/Tests/Controller/ImportControllerTest.php
This commit is contained in:
@@ -106,11 +106,14 @@ class ImportController extends BaseAdminController
|
||||
*/
|
||||
$archiveBuilder = $archiveBuilder->loadArchive($file->getPathname());
|
||||
|
||||
$content = $this->getFileContentInArchive(
|
||||
$contentAndFormat = $this->getFileContentInArchive(
|
||||
$archiveBuilder,
|
||||
$formatterManager,
|
||||
$tools["types"]
|
||||
);
|
||||
|
||||
$formatter = $contentAndFormat["formatter"];
|
||||
$content = $contentAndFormat["content"];
|
||||
} elseif ($formatter !== null) {
|
||||
/**
|
||||
* If the file isn't an archive
|
||||
@@ -195,7 +198,10 @@ class ImportController extends BaseAdminController
|
||||
);
|
||||
}
|
||||
|
||||
return $content;
|
||||
return array(
|
||||
"formatter" => $formatter,
|
||||
"content" => $content,
|
||||
);
|
||||
}
|
||||
|
||||
public function retrieveFormatTools(
|
||||
@@ -302,7 +308,7 @@ class ImportController extends BaseAdminController
|
||||
}
|
||||
|
||||
return $this->getTranslator()->trans(
|
||||
"Import successfully done, %numb row(s) have been imported",
|
||||
"Import successfully done, %numb row(s) have been changed",
|
||||
[
|
||||
"%numb" => $handler->getImportedRows(),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user