Merge pull request #86 from RETROTEC-AG/pr/#7_Shopify-interface-does-not-work

shopify interface does not work
This commit is contained in:
OpenXE-ERP 2023-07-19 18:13:17 +02:00 committed by GitHub
commit 869c888947
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 14 deletions

View File

@ -99596,6 +99596,17 @@
"Extra": "", "Extra": "",
"Privileges": "select,insert,update,references", "Privileges": "select,insert,update,references",
"Comment": "" "Comment": ""
},
{
"Field": "getestet",
"Type": "int(11)",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": "0",
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
} }
], ],
"keys": [ "keys": [

View File

@ -610,7 +610,7 @@ class Shopexport
'SELECT `id` 'SELECT `id`
FROM `shopexport` FROM `shopexport`
WHERE `aktiv` = 1 AND `autosendarticle` = 1 AND `artikelexport` = 1 WHERE `aktiv` = 1 AND `autosendarticle` = 1 AND `artikelexport` = 1
AND (`autosendarticle_last` IS NULL OR DATE_ADD(`autosendarticle_last` INTERVAL %d MINUTE) <= NOW())', AND (`autosendarticle_last` IS NULL OR DATE_ADD(`autosendarticle_last`, INTERVAL %d MINUTE) <= NOW())',
$minutes $minutes
) )
); );

View File

@ -396,7 +396,7 @@ class Shopimporter_Shopify extends ShopimporterBase
$this->adapter->call("products/".$result['data']['product']['id']."/metafields.json", 'POST', array('metafield' => [ $this->adapter->call("products/".$result['data']['product']['id']."/metafields.json", 'POST', array('metafield' => [
'key' => 'sync_status', 'key' => 'sync_status',
'value' => 1, 'value' => 1,
'value_type' => 'integer', 'type' => 'number_integer',
'namespace' => 'xentral', 'namespace' => 'xentral',
])); ]));
if($result['data']['product']['id'] == $nummer) { if($result['data']['product']['id'] == $nummer) {
@ -429,7 +429,7 @@ class Shopimporter_Shopify extends ShopimporterBase
$this->adapter->call("variants/".$resultv['variant']['id']."/metafields.json", 'POST', array('metafield' => [ $this->adapter->call("variants/".$resultv['variant']['id']."/metafields.json", 'POST', array('metafield' => [
'key' => 'sync_status', 'key' => 'sync_status',
'value' => 1, 'value' => 1,
'value_type' => 'integer', 'type' => 'number_integer',
'namespace' => 'xentral', 'namespace' => 'xentral',
])); ]));
$data['nummer'] = $resultv['data']['variant']['sku']; $data['nummer'] = $resultv['data']['variant']['sku'];
@ -690,7 +690,7 @@ class Shopimporter_Shopify extends ShopimporterBase
$inventoryitemid = $resultv['data']['variant']['inventory_item_id']; $inventoryitemid = $resultv['data']['variant']['inventory_item_id'];
$resulti = $this->adapter->call("inventory_levels.json?inventory_item_ids=$inventoryitemid&location_ids=$locationid"); $resulti = $this->adapter->call("inventory_levels.json?inventory_item_ids=$inventoryitemid&location_ids=$locationid");
$vorhanden = $resulti['data']['inventory_levels'][0]['available']; $vorhanden = $resulti['data']['inventory_levels'][0]['available'];
$adjust = $lageranzahl - $vorhanden; $adjust = floatval($lageranzahl) - floatval($vorhanden);
if($adjust != 0){ if($adjust != 0){
$data = array("location_id" => $locationid, $data = array("location_id" => $locationid,
"inventory_item_id"=> $inventoryitemid, "inventory_item_id"=> $inventoryitemid,
@ -1015,12 +1015,12 @@ class Shopimporter_Shopify extends ShopimporterBase
$dataproduct['product']['variants'][0]['metafields'] = array(array( $dataproduct['product']['variants'][0]['metafields'] = array(array(
"key" => "harmonized_system_code", "key" => "harmonized_system_code",
"value"=> $zolltarifnummer, "value"=> $zolltarifnummer,
"value_type"=> "string", "type"=> "text",
"namespace"=> "global"), "namespace"=> "global"),
[ [
'key' => 'sync_status', 'key' => 'sync_status',
'value' => 1, 'value' => 1,
'value_type' => 'integer', 'type' => 'number_integer',
'namespace' => 'xentral', 'namespace' => 'xentral',
]); ]);
if($pseudopreis != ''){ if($pseudopreis != ''){
@ -1185,12 +1185,12 @@ class Shopimporter_Shopify extends ShopimporterBase
$veigenschaften[] = array( $veigenschaften[] = array(
"key" => "harmonized_system_code", "key" => "harmonized_system_code",
"value"=> $value['zolltarifnummer'], "value"=> $value['zolltarifnummer'],
"value_type"=> "string", "type"=> "text",
"namespace"=> "global"); "namespace"=> "global");
$veigenschaften[] = [ $veigenschaften[] = [
'key' => 'sync_status', 'key' => 'sync_status',
'value' => 1, 'value' => 1,
'value_type' => 'integer', 'type' => 'number_integer',
'namespace' => 'xentral', 'namespace' => 'xentral',
]; ];
@ -3334,7 +3334,7 @@ class Shopimporter_Shopify extends ShopimporterBase
$this->adapter->call('orders/' . $auftrag . '/metafields.json', 'POST', array('metafield' => [ $this->adapter->call('orders/' . $auftrag . '/metafields.json', 'POST', array('metafield' => [
'key' => 'sync_status', 'key' => 'sync_status',
'value' => 1, 'value' => 1,
'value_type' => 'integer', 'type' => 'number_integer',
'namespace' => 'xentral', 'namespace' => 'xentral',
])); ]));
return 'ok'; return 'ok';
@ -3367,7 +3367,7 @@ class Shopimporter_Shopify extends ShopimporterBase
$this->adapter->call('orders/' . $auftrag . '/metafields.json', 'POST', array('metafield' => [ $this->adapter->call('orders/' . $auftrag . '/metafields.json', 'POST', array('metafield' => [
'key' => 'sync_status', 'key' => 'sync_status',
'value' => 3, 'value' => 3,
'value_type' => 'integer', 'type' => 'number_integer',
'namespace' => 'xentral', 'namespace' => 'xentral',
])); ]));
} }
@ -3420,7 +3420,7 @@ class Shopimporter_Shopify extends ShopimporterBase
$this->adapter->call('orders/' . $auftrag . '/metafields.json', 'POST', array('metafield' => [ $this->adapter->call('orders/' . $auftrag . '/metafields.json', 'POST', array('metafield' => [
'key' => 'sync_status', 'key' => 'sync_status',
'value' => 2, 'value' => 2,
'value_type' => 'integer', 'type' => 'number_integer',
'namespace' => 'xentral', 'namespace' => 'xentral',
])); ]));
}else{ }else{