aa
This commit is contained in:
@@ -977,8 +977,9 @@ class ArticleFormatter
|
|||||||
$stockInfo = self::getStockInfo($product);
|
$stockInfo = self::getStockInfo($product);
|
||||||
$preorderInfo = self::getPreorderInfo($product);
|
$preorderInfo = self::getPreorderInfo($product);
|
||||||
|
|
||||||
// echo "PREORDERINFO ";
|
echo "PREORDERINFO " . $article->IdArticolo;
|
||||||
// dd($preorderInfo);
|
|
||||||
|
dd($preorderInfo);
|
||||||
|
|
||||||
return self::formatArticleRow(
|
return self::formatArticleRow(
|
||||||
$article,
|
$article,
|
||||||
@@ -1146,14 +1147,13 @@ class ArticleFormatter
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
// Se il campo specificato non è presente, restituisce null
|
// Se il campo specificato non è presente, restituisce null
|
||||||
if (!isset($product->meta_data) || !is_array($product->meta_data)) {
|
if (!isset($product['meta_data']) || !is_array($product['meta_data'])) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cerca nella meta_data il valore corrispondente alla chiave specificata
|
foreach ($product['meta_data'] as $item) {
|
||||||
foreach ($product->meta_data as $meta) {
|
if (isset($item->key) && $item->key === $field) {
|
||||||
if (isset($meta->key) && $meta->key === $field) {
|
return $item->value;
|
||||||
return $meta->value; // Accedi come oggetto
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user