From 64241842f6d77546084bcf94c9d898be908d5e51 Mon Sep 17 00:00:00 2001 From: Roland Rusch Date: Wed, 19 Jul 2023 16:24:25 +0200 Subject: [PATCH 1/4] #7 Shopify interface does not work --- www/pages/shopexport.php | 2 +- www/pages/shopimporter_shopify.php | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/www/pages/shopexport.php b/www/pages/shopexport.php index 715b428d..494681d3 100644 --- a/www/pages/shopexport.php +++ b/www/pages/shopexport.php @@ -610,7 +610,7 @@ class Shopexport 'SELECT `id` FROM `shopexport` 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 ) ); diff --git a/www/pages/shopimporter_shopify.php b/www/pages/shopimporter_shopify.php index c0d99704..0c93ea08 100644 --- a/www/pages/shopimporter_shopify.php +++ b/www/pages/shopimporter_shopify.php @@ -1,4 +1,4 @@ - +*/ +?> adapter->call("products/".$result['data']['product']['id']."/metafields.json", 'POST', array('metafield' => [ 'key' => 'sync_status', 'value' => 1, - 'value_type' => 'integer', + 'type' => 'number_integer', 'namespace' => 'xentral', ])); 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' => [ 'key' => 'sync_status', 'value' => 1, - 'value_type' => 'integer', + 'type' => 'number_integer', 'namespace' => 'xentral', ])); $data['nummer'] = $resultv['data']['variant']['sku']; @@ -1015,12 +1015,12 @@ class Shopimporter_Shopify extends ShopimporterBase $dataproduct['product']['variants'][0]['metafields'] = array(array( "key" => "harmonized_system_code", "value"=> $zolltarifnummer, - "value_type"=> "string", + "type"=> "text", "namespace"=> "global"), [ 'key' => 'sync_status', 'value' => 1, - 'value_type' => 'integer', + 'type' => 'number_integer', 'namespace' => 'xentral', ]); if($pseudopreis != ''){ @@ -1185,12 +1185,12 @@ class Shopimporter_Shopify extends ShopimporterBase $veigenschaften[] = array( "key" => "harmonized_system_code", "value"=> $value['zolltarifnummer'], - "value_type"=> "string", + "type"=> "text", "namespace"=> "global"); $veigenschaften[] = [ 'key' => 'sync_status', 'value' => 1, - 'value_type' => 'integer', + 'type' => 'number_integer', 'namespace' => 'xentral', ]; @@ -3334,7 +3334,7 @@ class Shopimporter_Shopify extends ShopimporterBase $this->adapter->call('orders/' . $auftrag . '/metafields.json', 'POST', array('metafield' => [ 'key' => 'sync_status', 'value' => 1, - 'value_type' => 'integer', + 'type' => 'number_integer', 'namespace' => 'xentral', ])); return 'ok'; @@ -3367,7 +3367,7 @@ class Shopimporter_Shopify extends ShopimporterBase $this->adapter->call('orders/' . $auftrag . '/metafields.json', 'POST', array('metafield' => [ 'key' => 'sync_status', 'value' => 3, - 'value_type' => 'integer', + 'type' => 'number_integer', 'namespace' => 'xentral', ])); } @@ -3420,7 +3420,7 @@ class Shopimporter_Shopify extends ShopimporterBase $this->adapter->call('orders/' . $auftrag . '/metafields.json', 'POST', array('metafield' => [ 'key' => 'sync_status', 'value' => 2, - 'value_type' => 'integer', + 'type' => 'number_integer', 'namespace' => 'xentral', ])); }else{ From 08579804a8cfad198406329aaa78f635335dfaae Mon Sep 17 00:00:00 2001 From: Roland Rusch Date: Wed, 19 Jul 2023 16:49:55 +0200 Subject: [PATCH 2/4] #7 Shopify interface does not work --- upgrade/data/db_schema.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/upgrade/data/db_schema.json b/upgrade/data/db_schema.json index c852d351..0e4fc82f 100644 --- a/upgrade/data/db_schema.json +++ b/upgrade/data/db_schema.json @@ -99596,6 +99596,17 @@ "Extra": "", "Privileges": "select,insert,update,references", "Comment": "" + }, + { + "Field": "getestet", + "Type": "int(11)", + "Collation": null, + "Null": "NO", + "Key": "", + "Default": "0", + "Extra": "", + "Privileges": "select,insert,update,references", + "Comment": "" } ], "keys": [ From 51b70aed0df3de76be37821187ba99f16c030078 Mon Sep 17 00:00:00 2001 From: Roland Rusch Date: Wed, 19 Jul 2023 16:50:55 +0200 Subject: [PATCH 3/4] #7 Shopify interface does not work --- www/pages/shopimporter_shopify.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/pages/shopimporter_shopify.php b/www/pages/shopimporter_shopify.php index 0c93ea08..39ad7f3c 100644 --- a/www/pages/shopimporter_shopify.php +++ b/www/pages/shopimporter_shopify.php @@ -690,7 +690,7 @@ class Shopimporter_Shopify extends ShopimporterBase $inventoryitemid = $resultv['data']['variant']['inventory_item_id']; $resulti = $this->adapter->call("inventory_levels.json?inventory_item_ids=$inventoryitemid&location_ids=$locationid"); $vorhanden = $resulti['data']['inventory_levels'][0]['available']; - $adjust = $lageranzahl - $vorhanden; + $adjust = floatval($lageranzahl) - floatval($vorhanden);; if($adjust != 0){ $data = array("location_id" => $locationid, "inventory_item_id"=> $inventoryitemid, From ab4e9f001e371ac8323c23d468e38a92eab7da6f Mon Sep 17 00:00:00 2001 From: Roland Rusch Date: Wed, 19 Jul 2023 16:51:32 +0200 Subject: [PATCH 4/4] #7 Shopify interface does not work --- www/pages/shopimporter_shopify.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/pages/shopimporter_shopify.php b/www/pages/shopimporter_shopify.php index 39ad7f3c..1cb29d45 100644 --- a/www/pages/shopimporter_shopify.php +++ b/www/pages/shopimporter_shopify.php @@ -690,7 +690,7 @@ class Shopimporter_Shopify extends ShopimporterBase $inventoryitemid = $resultv['data']['variant']['inventory_item_id']; $resulti = $this->adapter->call("inventory_levels.json?inventory_item_ids=$inventoryitemid&location_ids=$locationid"); $vorhanden = $resulti['data']['inventory_levels'][0]['available']; - $adjust = floatval($lageranzahl) - floatval($vorhanden);; + $adjust = floatval($lageranzahl) - floatval($vorhanden); if($adjust != 0){ $data = array("location_id" => $locationid, "inventory_item_id"=> $inventoryitemid,