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) {