mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2025-03-03 13:29:24 +01:00
Improvements and Standardization of Article-Shopexport
Improvements Shopware6 Article-Shopexport
This commit is contained in:
parent
f5565f54a2
commit
4caab3ba0e
10
classes/Modules/Onlineshop/Data/ArticleExportResult.php
Normal file
10
classes/Modules/Onlineshop/Data/ArticleExportResult.php
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Xentral\Modules\Onlineshop\Data;
|
||||||
|
|
||||||
|
class ArticleExportResult {
|
||||||
|
public int $articleId = 0;
|
||||||
|
public bool $success = false;
|
||||||
|
public ?string $message = null;
|
||||||
|
public ?string $extArticleId = null;
|
||||||
|
}
|
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Xentral\Components\Logger\Logger;
|
use Xentral\Components\Logger\Logger;
|
||||||
|
use Xentral\Modules\Onlineshop\Data\ArticleExportResult;
|
||||||
|
|
||||||
/** @var Logger $logger */
|
/** @var Logger $logger */
|
||||||
$logger = $app->Container->get('Logger');
|
$logger = $app->Container->get('Logger');
|
||||||
@ -244,11 +245,12 @@ foreach ($shops_to_transmit as $shop_to_transmit) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// See description of return format in function class.remote.php -> RemoteSendArticleList()
|
// See description of return format in function class.remote.php -> RemoteSendArticleList()
|
||||||
foreach ($result['articlelist'] as $article) {
|
/** @var ArticleExportResult $articleResult */
|
||||||
|
foreach ($result as $articleResult) {
|
||||||
$app->DB->Delete(
|
$app->DB->Delete(
|
||||||
sprintf(
|
sprintf(
|
||||||
'DELETE FROM `shopexport_artikeluebertragen` WHERE `artikel`= %d AND `shop` = %d',
|
'DELETE FROM `shopexport_artikeluebertragen` WHERE `artikel`= %d AND `shop` = %d',
|
||||||
$article['artikel'],
|
$articleResult->articleId,
|
||||||
$shop_to_transmit['shop']
|
$shop_to_transmit['shop']
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
<?php
|
<?php
|
||||||
use Xentral\Components\MailClient\Client\MimeMessageFormatterInterface;
|
use Xentral\Components\MailClient\Client\MimeMessageFormatterInterface;
|
||||||
use Xentral\Core\LegacyConfig\ConfigLoader;
|
use Xentral\Core\LegacyConfig\ConfigLoader;
|
||||||
|
use Xentral\Modules\Onlineshop\Data\ArticleExportResult;
|
||||||
use Xentral\Modules\SystemMailClient\MailClientConfigProvider;
|
use Xentral\Modules\SystemMailClient\MailClientConfigProvider;
|
||||||
use Xentral\Modules\SystemMailClient\MailClientProvider;
|
use Xentral\Modules\SystemMailClient\MailClientProvider;
|
||||||
use Xentral\Modules\SystemMailer\Data\EmailBackupAccount;
|
use Xentral\Modules\SystemMailer\Data\EmailBackupAccount;
|
||||||
@ -20721,7 +20722,7 @@ function ChargenMHDAuslagern($artikel, $menge, $lagerplatztyp, $lpid,$typ,$wert,
|
|||||||
|
|
||||||
$this->LogFile('*** UPDATE '.$lagerartikel[$ij]['nummer'].' '.$lagerartikel[$ij]['name_de'].' Shop: '.$shop.' Lagernd: '.$verkaufbare_menge.' Korrektur: '.round((float) ($verkaufbare_menge_korrektur - $verkaufbare_menge),7).' Pseudolager: '.round((float) $pseudolager,8).' Result: '.(is_array($result)?$result['status']:$result), $result);
|
$this->LogFile('*** UPDATE '.$lagerartikel[$ij]['nummer'].' '.$lagerartikel[$ij]['name_de'].' Shop: '.$shop.' Lagernd: '.$verkaufbare_menge.' Korrektur: '.round((float) ($verkaufbare_menge_korrektur - $verkaufbare_menge),7).' Pseudolager: '.round((float) $pseudolager,8).' Result: '.(is_array($result)?$result['status']:$result), $result);
|
||||||
|
|
||||||
if ((is_array($result)?$result['status'] == 1:false) || $result === 1) {
|
if ((is_array($result) && $result instanceof ArticleExportResult ? $result->success : false) || $result === 1) {
|
||||||
$cacheQuantity = (int) $verkaufbare_menge_korrektur + (int) $pseudolager;
|
$cacheQuantity = (int) $verkaufbare_menge_korrektur + (int) $pseudolager;
|
||||||
$this->app->DB->Update(
|
$this->app->DB->Update(
|
||||||
"UPDATE `artikel` SET `cache_lagerplatzinhaltmenge` = '{$cacheQuantity}'
|
"UPDATE `artikel` SET `cache_lagerplatzinhaltmenge` = '{$cacheQuantity}'
|
||||||
@ -23015,7 +23016,7 @@ function ChargenMHDAuslagern($artikel, $menge, $lagerplatztyp, $lpid,$typ,$wert,
|
|||||||
}
|
}
|
||||||
$ansprechpartner = str_replace('<','<',$ansprechpartner);
|
$ansprechpartner = str_replace('<','<',$ansprechpartner);
|
||||||
$ansprechpartner = str_replace('>','>',$ansprechpartner);
|
$ansprechpartner = str_replace('>','>',$ansprechpartner);
|
||||||
list($name, $email) = explode('<', trim($ansprechpartner,'>'));
|
[$name, $email] = explode('<', trim($ansprechpartner,'>'));
|
||||||
|
|
||||||
$betreff = str_replace('\"','"',$betreff);
|
$betreff = str_replace('\"','"',$betreff);
|
||||||
$betreff = str_replace("\'","'",$betreff);
|
$betreff = str_replace("\'","'",$betreff);
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Xentral\Modules\Onlineshop\Data\ArticleExportResult;
|
||||||
use Xentral\Modules\Onlineshop\Data\OrderStatus;
|
use Xentral\Modules\Onlineshop\Data\OrderStatus;
|
||||||
use Xentral\Modules\Onlineshop\Data\OrderStatusUpdateRequest;
|
use Xentral\Modules\Onlineshop\Data\OrderStatusUpdateRequest;
|
||||||
use Xentral\Modules\Onlineshop\Data\Shipment;
|
use Xentral\Modules\Onlineshop\Data\Shipment;
|
||||||
@ -1941,7 +1942,7 @@ class Remote {
|
|||||||
if (!empty($artikelexport) && !$nurlager) {
|
if (!empty($artikelexport) && !$nurlager) {
|
||||||
$result = $this->sendlist($id, $data, true);
|
$result = $this->sendlist($id, $data, true);
|
||||||
}
|
}
|
||||||
if (!empty($lagerexport)) {
|
else if (!empty($lagerexport)) {
|
||||||
$result = $this->sendlistlager($id, $data);
|
$result = $this->sendlistlager($id, $data);
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
@ -2067,7 +2068,7 @@ class Remote {
|
|||||||
if (!empty($artikelexport) && !$nurlager) {
|
if (!empty($artikelexport) && !$nurlager) {
|
||||||
$result = $this->sendlist($id, $data, true);
|
$result = $this->sendlist($id, $data, true);
|
||||||
}
|
}
|
||||||
if (!empty($lagerexport)) {
|
else if (!empty($lagerexport)) {
|
||||||
$result = $this->sendlistlager($id, $data);
|
$result = $this->sendlistlager($id, $data);
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
@ -2100,16 +2101,19 @@ class Remote {
|
|||||||
$result = $this->RemoteCommand($shop_id, 'sendlist', $data);
|
$result = $this->RemoteCommand($shop_id, 'sendlist', $data);
|
||||||
|
|
||||||
if (!empty($result) && is_array($result)) {
|
if (!empty($result) && is_array($result)) {
|
||||||
foreach ($result['articles'] as $artikelid) {
|
/** @var ArticleExportResult $articleResult */
|
||||||
|
foreach ($result as $articleResult) {
|
||||||
|
if (!$articleResult instanceof ArticleExportResult)
|
||||||
|
continue;
|
||||||
/** @var Shopexport $objShopexport */
|
/** @var Shopexport $objShopexport */
|
||||||
$objShopexport = $this->app->loadModule('shopexport');
|
$objShopexport = $this->app->loadModule('shopexport');
|
||||||
$changedHash = $objShopexport->hasArticleHashChanged($artikelid, $shop_id);
|
$changedHash = $objShopexport->hasArticleHashChanged($articleResult->articleId, $shop_id);
|
||||||
$hash = $changedHash['hash'];
|
$hash = $changedHash['hash'];
|
||||||
|
|
||||||
$checkAo = $this->app->DB->Select(
|
$checkAo = $this->app->DB->Select(
|
||||||
sprintf(
|
sprintf(
|
||||||
'SELECT id FROM artikel_onlineshops WHERE artikel = %d AND shop=%d LIMIT 1',
|
'SELECT id FROM artikel_onlineshops WHERE artikel = %d AND shop=%d LIMIT 1',
|
||||||
$artikelid, $shop_id
|
$articleResult->articleId, $shop_id
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
if (empty($checkAo)) {
|
if (empty($checkAo)) {
|
||||||
@ -2117,7 +2121,7 @@ class Remote {
|
|||||||
sprintf(
|
sprintf(
|
||||||
'INSERT INTO artikel_onlineshops (artikel, shop, aktiv, ausartikel)
|
'INSERT INTO artikel_onlineshops (artikel, shop, aktiv, ausartikel)
|
||||||
VALUES (%d, %d, 1, 1) ',
|
VALUES (%d, %d, 1, 1) ',
|
||||||
$artikelid, $shop_id
|
$articleResult->articleId, $shop_id
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -2126,32 +2130,28 @@ class Remote {
|
|||||||
"UPDATE artikel_onlineshops
|
"UPDATE artikel_onlineshops
|
||||||
SET last_article_transfer = NOW(), last_article_hash = '%s'
|
SET last_article_transfer = NOW(), last_article_hash = '%s'
|
||||||
WHERE artikel = %d AND shop = %d",
|
WHERE artikel = %d AND shop = %d",
|
||||||
$this->app->DB->real_escape_string($hash), $artikelid, $shop_id
|
$this->app->DB->real_escape_string($hash), $articleResult->articleId, $shop_id
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!empty($result) && is_array($result)) {
|
$artikelnummer = $this->app->DB->Select("SELECT nummer FROM artikel WHERE id = '$articleResult->articleId' LIMIT 1");
|
||||||
foreach ($result['new'] as $artikelid => $fremdnummer) {
|
$artikelfremdnummer = $this->app->DB->Select("SELECT nummer
|
||||||
$artikelid = (int) $artikelid;
|
FROM `artikelnummer_fremdnummern`
|
||||||
$artikelnummer = $this->app->DB->Select("SELECT nummer FROM artikel WHERE id = '$artikelid' LIMIT 1");
|
WHERE artikel = '$articleResult->articleId'
|
||||||
if ($artikelid > 0 && $artikelnummer != trim($fremdnummer) &&
|
AND shopid = '$shop_id'
|
||||||
($this->app->DB->Select("SELECT id FROM artikel WHERE id = '$artikelid' AND (shop = '$shop_id' OR shop2 = '$shop_id' OR shop3 = '$shop_id') LIMIT 1") ||
|
AND nummer != ''
|
||||||
$this->app->DB->Select("SELECT id FROM artikel_onlineshops WHERE artikel = '$artikelid' AND aktiv = 1")
|
AND (aktiv = 1 OR nummer = '".trim($this->app->DB->real_escape_string($articleResult->extArticleId))."') LIMIT 1 ");
|
||||||
) && trim($fremdnummer) !== '') {
|
if ($articleResult->articleId > 0 && $articleResult->extArticleId != null &&
|
||||||
//Nur falls Artikel zum Shop passt und keine aktive Fremdnummer exisitert.
|
trim($articleResult->extArticleId) != '' &&
|
||||||
if (!$this->app->DB->Select("SELECT id FROM `artikelnummer_fremdnummern` WHERE artikel = '$artikelid' AND shopid = '$shop_id' AND nummer <> '' AND (aktiv = 1 OR nummer = '" . trim($this->app->DB->real_escape_string($fremdnummer)) . "') LIMIT 1 ")) {
|
$artikelnummer != trim($articleResult->extArticleId) &&
|
||||||
|
empty($artikelfremdnummer)) {
|
||||||
|
//Nur falls keine aktive Fremdnummer exisitert.
|
||||||
$this->app->DB->Insert("INSERT INTO `artikelnummer_fremdnummern` (artikel, bezeichnung, nummer, shopid, bearbeiter, zeitstempel, aktiv)
|
$this->app->DB->Insert("INSERT INTO `artikelnummer_fremdnummern` (artikel, bezeichnung, nummer, shopid, bearbeiter, zeitstempel, aktiv)
|
||||||
VALUES ('$artikelid','Erstellt durch Artikelexport','" . trim($this->app->DB->real_escape_string($fremdnummer)) . "','$shop_id','" . ((isset($this->app->User) && method_exists($this->app->User, 'GetName')) ? $this->app->DB->real_escape_string($this->app->User->GetName()) : 'Cronjob') . "',now(),0)
|
VALUES ($articleResult->articleId,'Erstellt durch Artikelexport','" . trim($this->app->DB->real_escape_string($articleResult->extArticleId)) . "','$shop_id','" . ((isset($this->app->User) && method_exists($this->app->User, 'GetName')) ? $this->app->DB->real_escape_string($this->app->User->GetName()) : 'Cronjob') . "',now(),0)
|
||||||
");
|
");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isset($result['anzahl'])) {
|
|
||||||
$result['count'] = $result['anzahl'];
|
|
||||||
}//Altes Verhalten
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$isLagerExported) {
|
if (!$isLagerExported) {
|
||||||
$this->sendlistlager($shop_id, $data);
|
$this->sendlistlager($shop_id, $data);
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Xentral\Modules\Onlineshop\Data\ArticleExportResult;
|
||||||
use Xentral\Widgets\SuperSearch\Result\ResultGroup;
|
use Xentral\Widgets\SuperSearch\Result\ResultGroup;
|
||||||
use Xentral\Widgets\SuperSearch\Result\ResultItem;
|
use Xentral\Widgets\SuperSearch\Result\ResultItem;
|
||||||
|
|
||||||
@ -2873,9 +2874,9 @@ class Artikel extends GenArtikel {
|
|||||||
|
|
||||||
$remote_result = $this->app->remote->RemoteSendArticleList($shop, $artikel, $extartikelnummer);
|
$remote_result = $this->app->remote->RemoteSendArticleList($shop, $artikel, $extartikelnummer);
|
||||||
|
|
||||||
if (is_array($remote_result)) {
|
if (is_array($remote_result) && $remote_result[0] instanceof ArticleExportResult) {
|
||||||
$remote_status = $remote_result['status'];
|
$remote_status = $remote_result[0]->success;
|
||||||
$remote_message = $remote_result['message'];
|
$remote_message = $remote_result[0]->message;
|
||||||
} else if (is_numeric($remote_result)) {
|
} else if (is_numeric($remote_result)) {
|
||||||
if ($remote_result == 1) {
|
if ($remote_result == 1) {
|
||||||
$remote_status = true;
|
$remote_status = true;
|
||||||
|
@ -473,6 +473,9 @@ class Shopexport
|
|||||||
|
|
||||||
// sende artikel liste
|
// sende artikel liste
|
||||||
$tmp_anzahl = $this->app->remote->RemoteSendArticleList($id,$artikel);
|
$tmp_anzahl = $this->app->remote->RemoteSendArticleList($id,$artikel);
|
||||||
|
if (is_array($tmp_anzahl)) {
|
||||||
|
$tmp_anzahl = count(array_filter($tmp_anzahl, fn($var) => $var->success));
|
||||||
|
}
|
||||||
|
|
||||||
// dateien update
|
// dateien update
|
||||||
//$dateien = $this->app->DB->SelectArr("SELECT DISTINCT ds.datei FROM datei_stichwoerter ds, datei d WHERE d.id=ds.datei AND (ds.subjekt!='Druckbild') AND (ds.objekt='Artikel' OR ds.objekt='Kampangen') AND d.geloescht=0 AND d.firma='".$this->app->User->GetFirma()."'");
|
//$dateien = $this->app->DB->SelectArr("SELECT DISTINCT ds.datei FROM datei_stichwoerter ds, datei d WHERE d.id=ds.datei AND (ds.subjekt!='Druckbild') AND (ds.objekt='Artikel' OR ds.objekt='Kampangen') AND d.geloescht=0 AND d.firma='".$this->app->User->GetFirma()."'");
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
use Xentral\Components\Http\JsonResponse;
|
use Xentral\Components\Http\JsonResponse;
|
||||||
|
use Xentral\Modules\Onlineshop\Data\ArticleExportResult;
|
||||||
use Xentral\Modules\Onlineshop\Data\OrderStatus;
|
use Xentral\Modules\Onlineshop\Data\OrderStatus;
|
||||||
use Xentral\Modules\Onlineshop\Data\OrderStatusUpdateRequest;
|
use Xentral\Modules\Onlineshop\Data\OrderStatusUpdateRequest;
|
||||||
|
|
||||||
@ -750,10 +751,14 @@ class Shopimporter_Shopify extends ShopimporterBase
|
|||||||
$bezprodukt = $this->bezprodukt;
|
$bezprodukt = $this->bezprodukt;
|
||||||
$bezvariant = $this->bezvariant;
|
$bezvariant = $this->bezvariant;
|
||||||
$ctmp = !empty($tmp)?count($tmp):0;
|
$ctmp = !empty($tmp)?count($tmp):0;
|
||||||
|
$return = [];
|
||||||
for($i=0;$i<$ctmp;$i++)
|
for($i=0;$i<$ctmp;$i++)
|
||||||
{
|
{
|
||||||
|
$return[$i] = new ArticleExportResult();
|
||||||
|
$return[$i]->articleId = intval($tmp[$i]['artikel']);
|
||||||
if($tmp[$i]['variante'] && $tmp[$i]['variantevon'] != ''){
|
if($tmp[$i]['variante'] && $tmp[$i]['variantevon'] != ''){
|
||||||
return "error: Variantenexport ist nur über den Hauptartikel möglich.";
|
$return[$i]->message = "Variantenexport ist nur über den Hauptartikel möglich.";
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
$artikel = $tmp[$i]['artikel'];
|
$artikel = $tmp[$i]['artikel'];
|
||||||
if($artikel == 'ignore'){
|
if($artikel == 'ignore'){
|
||||||
@ -1432,9 +1437,10 @@ class Shopimporter_Shopify extends ShopimporterBase
|
|||||||
}
|
}
|
||||||
$this->translateFreeFields($productid, $freeFieldTranslations);
|
$this->translateFreeFields($productid, $freeFieldTranslations);
|
||||||
|
|
||||||
$anzahl++;
|
$return[$i]->extArticleId = $productid;
|
||||||
|
$return[$i]->success = true;
|
||||||
}
|
}
|
||||||
return $anzahl;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
use Xentral\Components\Http\JsonResponse;
|
use Xentral\Components\Http\JsonResponse;
|
||||||
|
use Xentral\Modules\Onlineshop\Data\ArticleExportResult;
|
||||||
use Xentral\Modules\Onlineshop\Data\OrderStatus;
|
use Xentral\Modules\Onlineshop\Data\OrderStatus;
|
||||||
use Xentral\Modules\Onlineshop\Data\OrderStatusUpdateRequest;
|
use Xentral\Modules\Onlineshop\Data\OrderStatusUpdateRequest;
|
||||||
|
|
||||||
@ -1112,8 +1113,10 @@ class Shopimporter_Shopware extends ShopimporterBase
|
|||||||
$crosssellingartikeluebertragen = 0;
|
$crosssellingartikeluebertragen = 0;
|
||||||
$preisgruppe = 0;
|
$preisgruppe = 0;
|
||||||
}
|
}
|
||||||
|
$return = [];
|
||||||
for($i=0;$i<$ctmp;$i++)
|
for($i=0;$i<$ctmp;$i++)
|
||||||
{
|
{
|
||||||
|
$return[$i] = new ArticleExportResult();
|
||||||
$filtergruppe = 0;
|
$filtergruppe = 0;
|
||||||
$rootcategory = 1;
|
$rootcategory = 1;
|
||||||
if(!empty($this->RootCategoryName)) {
|
if(!empty($this->RootCategoryName)) {
|
||||||
@ -1207,6 +1210,7 @@ class Shopimporter_Shopware extends ShopimporterBase
|
|||||||
|
|
||||||
//Schritt 2: Artikeleigenschaften
|
//Schritt 2: Artikeleigenschaften
|
||||||
$artikel = $tmp[$i]['artikel'];
|
$artikel = $tmp[$i]['artikel'];
|
||||||
|
$return[$i]->articleId = intval($artikel);
|
||||||
$nummer = isset($tmp[$i]['fremdnummer'])?$tmp[$i]['fremdnummer']:$tmp[$i]['nummer'];
|
$nummer = isset($tmp[$i]['fremdnummer'])?$tmp[$i]['fremdnummer']:$tmp[$i]['nummer'];
|
||||||
$inaktiv = $tmp[$i]['inaktiv'];
|
$inaktiv = $tmp[$i]['inaktiv'];
|
||||||
$name_de = $tmp[$i]['name_de'];
|
$name_de = $tmp[$i]['name_de'];
|
||||||
@ -1231,7 +1235,8 @@ class Shopimporter_Shopware extends ShopimporterBase
|
|||||||
|
|
||||||
$preis = $tmp[$i]['bruttopreis'];
|
$preis = $tmp[$i]['bruttopreis'];
|
||||||
if(!$preis){
|
if(!$preis){
|
||||||
return 'error: Im Artikel ist kein Preis hinterlegt.';
|
$return[$i]->message = 'Im Artikel ist kein Preis hinterlegt.';
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$nettopreis =$tmp[$i]['preis'];
|
$nettopreis =$tmp[$i]['preis'];
|
||||||
@ -2013,7 +2018,8 @@ class Shopimporter_Shopware extends ShopimporterBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!is_array($result)){
|
if(!is_array($result)){
|
||||||
return $result;
|
$return[$i]->message = $result;
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
//Schritt 8c: Alle Bilder anlegen und neu verlinken
|
//Schritt 8c: Alle Bilder anlegen und neu verlinken
|
||||||
$first = 1;
|
$first = 1;
|
||||||
@ -2084,7 +2090,8 @@ class Shopimporter_Shopware extends ShopimporterBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!is_array($result)){
|
if(!is_array($result)){
|
||||||
return $result;
|
$return[$i]->message = $result;
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$artikelid = $result['data']['id'];
|
$artikelid = $result['data']['id'];
|
||||||
@ -2217,13 +2224,14 @@ class Shopimporter_Shopware extends ShopimporterBase
|
|||||||
|
|
||||||
if($result['success'])
|
if($result['success'])
|
||||||
{
|
{
|
||||||
$anzahl++;
|
$return[$i]->success = true;
|
||||||
|
$return[$i]->extArticleId = $artikelid;
|
||||||
//Erstellt Thumbnailbilder für den Artikel - behauptet die Doku
|
//Erstellt Thumbnailbilder für den Artikel - behauptet die Doku
|
||||||
$result = $this->adapter->put('generateArticleImages/'.$artikelexistiert);
|
$result = $this->adapter->put('generateArticleImages/'.$artikelexistiert);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $anzahl;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function GetImagesIdsbyNummer($nummer){
|
function GetImagesIdsbyNummer($nummer){
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -14,6 +14,7 @@
|
|||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
use Xentral\Components\Http\JsonResponse;
|
use Xentral\Components\Http\JsonResponse;
|
||||||
|
use Xentral\Modules\Onlineshop\Data\ArticleExportResult;
|
||||||
use Xentral\Modules\Onlineshop\Data\OrderStatus;
|
use Xentral\Modules\Onlineshop\Data\OrderStatus;
|
||||||
use Xentral\Modules\Onlineshop\Data\OrderStatusUpdateRequest;
|
use Xentral\Modules\Onlineshop\Data\OrderStatusUpdateRequest;
|
||||||
use Xentral\Components\Logger\Logger;
|
use Xentral\Components\Logger\Logger;
|
||||||
@ -556,8 +557,11 @@ class Shopimporter_Woocommerce extends ShopimporterBase
|
|||||||
public function ImportSendList() {
|
public function ImportSendList() {
|
||||||
$tmp = $this->catchRemoteCommand('data');
|
$tmp = $this->catchRemoteCommand('data');
|
||||||
$anzahl = 0;
|
$anzahl = 0;
|
||||||
|
$return = [];
|
||||||
for($i=0;$i<(!empty($tmp)?count($tmp):0);$i++){
|
for($i=0;$i<(!empty($tmp)?count($tmp):0);$i++){
|
||||||
|
$return[$i] = new ArticleExportResult();
|
||||||
$artikel = $tmp[$i]['artikel'];
|
$artikel = $tmp[$i]['artikel'];
|
||||||
|
$return[$i]->articleId = intval($artikel);
|
||||||
$nummer = $tmp[$i]['nummer'];
|
$nummer = $tmp[$i]['nummer'];
|
||||||
if(!empty($tmp[$i]['artikelnummer_fremdnummern'][0]['nummer'])){
|
if(!empty($tmp[$i]['artikelnummer_fremdnummern'][0]['nummer'])){
|
||||||
$nummer = $tmp[$i]['artikelnummer_fremdnummern'][0]['nummer'];
|
$nummer = $tmp[$i]['artikelnummer_fremdnummern'][0]['nummer'];
|
||||||
@ -766,10 +770,10 @@ class Shopimporter_Woocommerce extends ShopimporterBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$anzahl++;
|
$return[$i]->success = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $anzahl;
|
return $return;
|
||||||
// return array($product_id,$anzahl,$nummer,$steuersatz, $preis);
|
// return array($product_id,$anzahl,$nummer,$steuersatz, $preis);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user