This commit is contained in:
paoloar77
2024-06-17 15:58:00 +02:00
parent 60ec6d512e
commit 97ebf5331e

View File

@@ -358,6 +358,10 @@ function libriInPrevendita()
$prodotto = Product::where('sku', $sku)->first();
$qtyinstock = intval($prodotto['stock_quantity']);
$prezzo = $prodotto['sale_price'];
if (!$prezzo) {
$prezzo = $prodotto['price'];
}
if ($qtyinstock <= 0) {
$colore = 'red';
@@ -373,6 +377,7 @@ function libriInPrevendita()
' Data Pubblicazione:' . date('d-m-Y', strtotime($article->DataPubblicazione)) . $sep .
$article->DescrizioneStatoProdotto . ' (' . $article->DescrizioneFormato . ')' . $sep .
'[Qta = <span style="">' . $article->QtaDisponibile . '</span>]' . $sep .
' [€ ' .$prezzo . $sep . ' ]' .
'[In Stock = <span style="color:' . $colore . '; font-weight: bold;">' . $qtyinstock . '</span>]' . $sep;
if ($qtyinstock < 0) {