This commit is contained in:
paoloar77
2024-06-13 14:48:57 +02:00
parent 7600fbf2dc
commit 066953c7c3

View File

@@ -338,7 +338,9 @@ function libriInPrevendita()
$prodotto = Product::where('sku', $sku)->first(); $prodotto = Product::where('sku', $sku)->first();
if ($prodotto['stock_quantity'] <= 0) { $qtyinstock = intval($prodotto['stock_quantity']);
if ($qtyinstock <= 0) {
$colore = 'red'; $colore = 'red';
} else { } else {
$colore = 'green'; $colore = 'green';
@@ -352,9 +354,9 @@ function libriInPrevendita()
' Data Pubblicazione:' . date('d-m-Y', strtotime($article->DataPubblicazione)) . $sep . ' Data Pubblicazione:' . date('d-m-Y', strtotime($article->DataPubblicazione)) . $sep .
$article->DescrizioneStatoProdotto . ' (' . $article->DescrizioneFormato . ')' . $sep . $article->DescrizioneStatoProdotto . ' (' . $article->DescrizioneFormato . ')' . $sep .
'[Qta = <span style="">' . $article->QtaDisponibile . '</span>]' . $sep . '[Qta = <span style="">' . $article->QtaDisponibile . '</span>]' . $sep .
'[In Stock = <span style="color:' . $colore . '; font-weight: bold;">' . $prodotto['stock_quantity'] . '</span>]' . $sep; '[In Stock = <span style="color:' . $colore . '; font-weight: bold;">' . $qtyinstock . '</span>]' . $sep;
if ($prodotto['stock_quantity'] > 0) { if ($qtyinstock > 0) {
$myview .= '<a href="' . $article->permalink . '/apimacro/public/aggiornapreorder/' . $article->IdArticolo . '/1" target="_blank">Imposta in PRE-ORDINE!</a>' . $sep; $myview .= '<a href="' . $article->permalink . '/apimacro/public/aggiornapreorder/' . $article->IdArticolo . '/1" target="_blank">Imposta in PRE-ORDINE!</a>' . $sep;
} }