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