
scherzi a parte se la quantità di un articolo diventa ad esempio -5 ho notato che l'indicazione diventa "yellow" e non più "red" come per 0, la riga del red deve diventare per caso:
red = ($prod_quantity <= 0 );
?
Moderatore: mod Generali
Codice: Seleziona tutto
$minus = ($prod_quantity <= 0);
Codice: Seleziona tutto
case $minus:
$img = tep_image(DIR_WS_ICONS . 'icon_status_red.gif', 'Non disponibile').'<br>ND' ;
break;
Codice: Seleziona tutto
<?php if (PRODUCT_LIST_QUANTITY == 1){
$prod_quantity = $product_info['products_quantity'];
$minus = ($prod_quantity <= 0);
$red = ($prod_quantity == NULL);
$yellow = ($prod_quantity <= 10);
$green = ($prod_quantity > 10);?>
<tr>
<td class="main"><br><?php
switch ($prod_quantity) {
case $minus:
$img = '<FONT COLOR=#ff0000><b>non disponibile</b></FONT>';
break;
case $red:
$img = '<FONT COLOR=#ff0000><b>non disponibile</b></FONT>';
break;
case $yellow :
$img = '<FONT COLOR=#ff9900><b>scarsa</b></FONT>';
break;
case $green :
$img = '<FONT COLOR=#009900><b>ampia</b></FONT>';
break;
}
echo "Disponibilità in magazzino: " .$img ;
?>
</td>
</tr>
<?php
}
?>
http://www.oscommerceitalia.com/modules ... opic&t=327100asa ha scritto:scusami, non ho capito dove sta questa tua contrib???