cronjob artikeluebertragen format

This commit is contained in:
OpenXE 2024-06-26 17:01:40 +02:00
parent 35add7d292
commit 7d18234567
2 changed files with 124 additions and 148 deletions

View File

@ -1,24 +1,5 @@
<?php
/*
include(dirname(__FILE__)."/../conf/main.conf.php");
include(dirname(__FILE__)."/../phpwf/plugins/class.mysql.php");
include(dirname(__FILE__)."/../www/lib/imap.inc.php");
include(dirname(__FILE__)."/../www/lib/class.erpapi.php");
include(dirname(__FILE__)."/../www/lib/class.erpapi_custom.php");
include(dirname(__FILE__)."/../www/lib/class.remote.php");
include(dirname(__FILE__)."/../www/lib/class.httpclient.php");
include(dirname(__FILE__)."/../www/lib/class.aes.php");
class app_t {
var $DB;
var $erp;
var $user;
var $remote;
}
*/
//ENDE
if (file_exists(dirname(__DIR__) . '/www/lib/class.erpapi_custom.php') && !class_exists('erpAPICustom')) {
include_once dirname(__DIR__) . '/www/lib/class.erpapi_custom.php';
}
@ -35,9 +16,7 @@ if(!isset($app->erp) || !$app->erp) {
} else {
$erp = new erpAPI($app);
}
//$remote = new Remote($app);
$app->erp = $erp;
//$app->remote= $remote;
}
if (empty($app->remote)) {
if (is_file(dirname(__DIR__) . '/www/lib/class.remote_custom.php')) {
@ -45,8 +24,7 @@ if(empty($app->remote)) {
require_once dirname(__DIR__) . '/www/lib/class.remote_custom.php';
}
$app->remote = new RemoteCustom($app);
}
else {
} else {
$app->remote = new Remote($app);
}
}
@ -156,8 +134,7 @@ while($check > 0) {
try {
$app->remote->RemoteSendArticleList($row['shop'], array($row['artikel']));
$app->erp->LagerSync($row['artikel'], true);
}
catch (Execption $exception) {
} catch (Execption $exception) {
$app->erp->LogFile($app->DB->real_escape_string($exception->getMessage()));
}
$app->DB->Delete(
@ -186,7 +163,6 @@ while($check > 0) {
return;
}
//sleep(20); // das performance nicht total spinnt
$check = $app->DB->Select('SELECT COUNT(`id`) FROM `shopexport_artikeluebertragen`');
}
$app->DB->Update(
@ -194,5 +170,3 @@ $app->DB->Update(
SET `letzteausfuerhung`= NOW(), `mutex` = 0,`mutexcounter`=0
WHERE `parameter` = 'artikeluebertragen'"
);

View File

@ -808,6 +808,8 @@ class Shopimporter_Mirakl extends ShopimporterBase {
$number_of_articles = 0;
$this->Log('Produktexport Start', print_r($csv,true));
// Build CSV
$csv_header = "";
$newline = "";