From 8feca4652bc0c9e41dac6b58c3c5e94750ddb104 Mon Sep 17 00:00:00 2001 From: paoloar77 Date: Sat, 15 Jun 2024 15:53:38 +0200 Subject: [PATCH] aa --- app/CustomFuncPao.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/CustomFuncPao.php b/app/CustomFuncPao.php index a9201067..7050e419 100644 --- a/app/CustomFuncPao.php +++ b/app/CustomFuncPao.php @@ -223,13 +223,17 @@ function loadArticleByIdArticle($id, $checkprevendita = false) return false; } - $ris = 'Articles:' . PHP_EOL; + $ris = 'Articles di ' . $id . ' :' . PHP_EOL; $ris .= getarraystr($articles); // Converte solo i dati specificati in JSON - $product = Product::where('sku', $id)->first(); + try { + $product = Product::where('sku', $id)->first(); - $ris .= 'Product:' . PHP_EOL; - // $ris .= getarraystr($product); + $ris .= 'Product:' . PHP_EOL; + $ris .= getarraystr($product); + } catch (\Exception $e) { + $ris .= "!!! Errore loadArticleByIdArticle Product: " . $e->getMessage(); + } return $ris; } catch (\Exception $e) {