aa
This commit is contained in:
@@ -10,6 +10,11 @@ function showarray($array)
|
||||
echo '<pre>' . json_encode($array, JSON_PRETTY_PRINT) . '</pre>';
|
||||
};
|
||||
|
||||
function getarraystr($array)
|
||||
{
|
||||
return '<pre>' . json_encode($array, JSON_PRETTY_PRINT) . '</pre>';
|
||||
};
|
||||
|
||||
function isKeyPresent($array, $key)
|
||||
{
|
||||
foreach ($array as $item) {
|
||||
@@ -216,13 +221,13 @@ function loadArticleByIdArticle($id, $checkprevendita = false)
|
||||
}
|
||||
|
||||
$ris = 'Articles:' . PHP_EOL;
|
||||
$ris .= '<pre>' . print_r($articles, true) . '</pre>'; // Utilizzo di print_r con <pre> per formattare
|
||||
$ris .= getarraystr($articles); // Converte solo i dati specificati in JSON
|
||||
|
||||
$product = Product::where('sku', $id)->first();
|
||||
|
||||
$ris .= 'Product:' . PHP_EOL;
|
||||
$ris .= '<pre>' . print_r($product, true) . '</pre>'; // Utilizzo di print_r con <pre> per formattare
|
||||
|
||||
$ris .= 'Product:'. PHP_EOL;
|
||||
$ris .= getarraystr($product);
|
||||
|
||||
return $ris;
|
||||
|
||||
} catch (\Exception $e) {
|
||||
|
||||
Reference in New Issue
Block a user