modifié:         core/lib/Thelia/Config/Resources/export.xml
	modifié:         core/lib/Thelia/Core/FileFormat/Formatting/AbstractFormatter.php
	modifié:         core/lib/Thelia/Core/FileFormat/Formatting/Formatter/CSVFormatter.php
This commit is contained in:
Benjamin Perche
2014-07-23 14:46:28 +02:00
parent 77db0d7408
commit 44e07f1940
3 changed files with 5 additions and 5 deletions

View File

@@ -37,7 +37,7 @@
<description>Export the prices of the products excluding taxes</description> <description>Export the prices of the products excluding taxes</description>
</export_descriptive> </export_descriptive>
</export> </export>
<export id="thelia.export.product_seo" class="Thelia\ImportExport\Export\Type\ProductSEOExport" category_id="thelia.export.products"> <export id="thelia.export.product_seo" class="Thelia\ImportExport\Export\Type\ProductSEOExport" category_id="thelia.export.products">
<export_descriptive locale="en_US"> <export_descriptive locale="en_US">
<title>Product SEO information</title> <title>Product SEO information</title>

View File

@@ -31,7 +31,7 @@ abstract class AbstractFormatter implements FormatInterface, FormatterInterface
protected $logger; protected $logger;
/** @var array */ /** @var array */
protected $order; protected $order;
public function __construct() public function __construct()
{ {
@@ -54,7 +54,7 @@ abstract class AbstractFormatter implements FormatInterface, FormatterInterface
public function checkOrders(array $values) public function checkOrders(array $values)
{ {
foreach($this->order as $order) { foreach ($this->order as $order) {
if (!array_key_exists($order, $values)) { if (!array_key_exists($order, $values)) {
throw new \ErrorException( throw new \ErrorException(
$this->translator->trans( $this->translator->trans(

View File

@@ -131,9 +131,9 @@ class CSVFormatter extends AbstractFormatter
protected function formatField($value) protected function formatField($value)
{ {
if($value === null) { if ($value === null) {
$value = ""; $value = "";
} else if (!is_scalar($value)) { } elseif (!is_scalar($value)) {
$value = serialize($value); $value = serialize($value);
} }