Prestashop: import meta infos

This commit is contained in:
Andreas Palm 2023-07-26 18:47:44 +02:00
parent 1a94af6b0b
commit 7df897d9d7
2 changed files with 19 additions and 4 deletions

View File

@ -631,11 +631,17 @@ class Remote
} }
$arr['projekt'] = $shopexportArr['projekt']; $arr['projekt'] = $shopexportArr['projekt'];
$arr['name_de'] = $ret['name']; $arr['name_de'] = $ret['name'];
$arr['uebersicht_de'] = isset($ret['uebersicht_de'])?$ret['uebersicht_de']:''; $arr['uebersicht_de'] = $ret['uebersicht_de'] ?? '';
$arr['kurztext_de'] = isset($ret['kurztext_de'])?$ret['kurztext_de']:''; $arr['kurztext_de'] = $ret['kurztext_de'] ?? '';
$arr['name_en'] = $ret['name_en']; $arr['name_en'] = $ret['name_en'];
$arr['uebersicht_en'] = isset($ret['uebersicht_en'])?$ret['uebersicht_en']:''; $arr['uebersicht_en'] = $ret['uebersicht_en'] ?? '';
$arr['kurztext_en'] = isset($ret['kurztext_en'])?$ret['kurztext_en']:''; $arr['kurztext_en'] = $ret['kurztext_en'] ?? '';
$arr['metakeywords_de'] = $ret['metakeywords_de'] ?? '';
$arr['metakeywords_en'] = $ret['metakeywords_en'] ?? '';
$arr['metatitle_de'] = $ret['metatitle_de'] ?? '';
$arr['metatitle_en'] = $ret['metatitle_en'] ?? '';
$arr['metadescription_de'] = $ret['metadescription_de'] ?? '';
$arr['metadescription_en'] = $ret['metadescription_en'] ?? '';
//$arr['anabregs_text'] = isset($ret['uebersicht_de'])?$ret['uebersicht_de']:''; //$arr['anabregs_text'] = isset($ret['uebersicht_de'])?$ret['uebersicht_de']:'';
if(isset($ret['ean']) && $ret['ean'] != '') if(isset($ret['ean']) && $ret['ean'] != '')
{ {

View File

@ -371,6 +371,9 @@ class Shopimporter_Presta extends ShopimporterBase
$names = $this->toMultilangArray($product->product->name->language); $names = $this->toMultilangArray($product->product->name->language);
$descriptions = $this->toMultilangArray($product->product->description->language); $descriptions = $this->toMultilangArray($product->product->description->language);
$shortdescriptions = $this->toMultilangArray($product->product->description_short->language); $shortdescriptions = $this->toMultilangArray($product->product->description_short->language);
$metadescriptions = $this->toMultilangArray($product->product->meta_description->language);
$metakeywords = $this->toMultilangArray($product->product->meta_keywords->language);
$metatitles = $this->toMultilangArray($product->product->meta_title->language);
$res['name'] = $names['de']; $res['name'] = $names['de'];
$res['name_en'] = $names['en']; $res['name_en'] = $names['en'];
$res['uebersicht_de'] = $descriptions['de']; $res['uebersicht_de'] = $descriptions['de'];
@ -378,6 +381,12 @@ class Shopimporter_Presta extends ShopimporterBase
$res['kurztext_de'] = strip_tags($shortdescriptions['de']); $res['kurztext_de'] = strip_tags($shortdescriptions['de']);
$res['kurztext_en'] = strip_tags($shortdescriptions['en']); $res['kurztext_en'] = strip_tags($shortdescriptions['en']);
$res['hersteller'] = strval($product->product->manufacturer_name); $res['hersteller'] = strval($product->product->manufacturer_name);
$res['metakeywords_de'] = $metakeywords['de'];
$res['metakeywords_en'] = $metakeywords['en'];
$res['metatitle_de'] = $metatitles['de'];
$res['metatitle_en'] = $metatitles['en'];
$res['metadescription_de'] = $metadescriptions['de'];
$res['metadescription_en'] = $metadescriptions['en'];
$images = []; $images = [];
foreach ($product->product->associations->images->image as $img) { foreach ($product->product->associations->images->image as $img) {