This commit is contained in:
paoloar77
2024-08-23 00:33:17 +02:00
parent 42c0a51b7f
commit 03eea7a609

View File

@@ -965,6 +965,9 @@ function setProductFromGM($article, $initlog, ProductLogger &$passproductLogger)
}
$datepubbl = DateTime::createFromFormat('Y-m-d H:i:s.u', $article->DataPubblicazione);
$datepubbl_ts = "";
$datepubblstr = "";
if ($datepubbl !== false) {
$datepubbl_ts = $datepubbl->getTimestamp();
$datepubblstr = $datepubbl->format('d/m/Y');
@@ -990,38 +993,38 @@ function setProductFromGM($article, $initlog, ProductLogger &$passproductLogger)
],
'meta_data' => [
[
$article->Ean13 ? [
'key' => 'ISBN',
'value' => $article->Ean13
],
[
] : [],
$article->Misure ? [
'key' => 'misure',
'value' => $article->Misure
],
[
] : [],
$article->DescrizioneFormato ? [
'key' => 'formato',
'value' => $article->DescrizioneFormato
],
[
] : [],
$article->Pagine ? [
'key' => 'pagine',
'value' => $article->Pagine
],
[
] : [],
$article->Edizione ? [
'key' => 'edizione',
'value' => $article->Edizione
],
[
] : [],
$article->Ristampa ? [
'key' => 'ristampa',
'value' => $article->Ristampa
],
[
] : [],
$datepubbl_ts ? [
'key' => 'DataPubblicazione',
'value' => $datepubbl_ts
],
[
] : [],
$datepubblstr ? [
'key' => 'DataPubbStr',
'value' => $datepubblstr
],
] : [],
]
];