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