This commit is contained in:
paoloar77
2024-09-05 17:40:41 +02:00
parent 6ebca7102d
commit 754842e004

View File

@@ -885,23 +885,27 @@ function getRigaArticoloByArt($article, $ind, $sep)
$prodotto = Product::where('sku', $sku)->first();
$qtyinstock = intval($prodotto['stock_quantity']);
$prezzo = $prodotto['sale_price'];
if (!$prezzo) {
$prezzo = $prodotto['price'];
}
if ($prodotto) {
if ($qtyinstock <= 0) {
$colore = 'red';
} else {
$colore = 'green';
}
$qtyinstock = intval($prodotto['stock_quantity']);
$prezzo = $prodotto['sale_price'];
if (!$prezzo) {
$prezzo = $prodotto['price'];
}
if ($qtyinstock <= 0) {
$colore = 'red';
} else {
$colore = 'green';
}
$permalink = $prodotto['permalink'];
}
// echo '[' . $ind . ']' . $sep . $mydatestr . $sep . $article->IdArticolo . $sep . $article->Titolo . $sep . $article->DescrizioneStatoProdotto . $sep . $article->DescrizioneFormato . ' [Quantita = ' . $article->QtaDisponibile . ']';
$myview = '[' . $ind . ']' . $sep .
'<a href="' . $article->permalink . '?id=' . $article->IdArticolo . '" target="_blank">' . $article->IdArticolo . '</a>' . $sep .
'<a href="' . $prodotto['permalink'] . '" target="_blank"><span style="color:' . $colore . '; font-weight: bold;"> ' . $article->Titolo . '</span></a>' . $sep .
'<a href="' . $permalink . '" target="_blank"><span style="color:' . $colore . '; font-weight: bold;"> ' . $article->Titolo . '</span></a>' . $sep .
' Pubb:' . formatDateToItalian($article->DataPubblicazione) . $sep .
$article->DescrizioneStatoProdotto . ' (' . $article->DescrizioneFormato . ')' . $sep .
'[Qta = <span style="">' . $article->QtaDisponibile . '</span>]' . $sep .