Prestashop: Improve article import

This commit is contained in:
Andreas Palm 2023-07-25 00:02:25 +02:00
parent 1f27f9a5f5
commit cb2b75a3ca
2 changed files with 7 additions and 1 deletions

View File

@ -633,6 +633,9 @@ class Remote
$arr['name_de'] = $ret['name']; $arr['name_de'] = $ret['name'];
$arr['uebersicht_de'] = isset($ret['uebersicht_de'])?$ret['uebersicht_de']:''; $arr['uebersicht_de'] = isset($ret['uebersicht_de'])?$ret['uebersicht_de']:'';
$arr['kurztext_de'] = isset($ret['kurztext_de'])?$ret['kurztext_de']:''; $arr['kurztext_de'] = isset($ret['kurztext_de'])?$ret['kurztext_de']:'';
$arr['name_en'] = $ret['name_en'];
$arr['uebersicht_en'] = isset($ret['uebersicht_en'])?$ret['uebersicht_en']:'';
$arr['kurztext_en'] = isset($ret['kurztext_en'])?$ret['kurztext_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

@ -346,6 +346,7 @@ class Shopimporter_Presta extends ShopimporterBase
$product = $this->prestaRequest('GET', "products/$productid"); $product = $this->prestaRequest('GET', "products/$productid");
$res = []; $res = [];
$res['nummer'] = strval($product->product->reference); $res['nummer'] = strval($product->product->reference);
$res['shoparticleid'] = intval($productid);
$res['artikelnummerausshop'] = strval($product->product->reference); $res['artikelnummerausshop'] = strval($product->product->reference);
$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);
@ -354,6 +355,8 @@ class Shopimporter_Presta extends ShopimporterBase
$res['name_en'] = $names['en']; $res['name_en'] = $names['en'];
$res['uebersicht_de'] = $descriptions['de']; $res['uebersicht_de'] = $descriptions['de'];
$res['uebersicht_en'] = $descriptions['en']; $res['uebersicht_en'] = $descriptions['en'];
$res['kurztext_de'] = $shortdescriptions['de'];
$res['kurztext_en'] = $shortdescriptions['en'];
$res['preis_netto'] = strval($product->product->price); $res['preis_netto'] = strval($product->product->price);
$res['hersteller'] = strval($product->product->manufacturer_name); $res['hersteller'] = strval($product->product->manufacturer_name);
$res['ean'] = strval($product->product->ean13); $res['ean'] = strval($product->product->ean13);