Codice: Seleziona tutto
<tr>
<td class="main">
<?php
$prod_quantity = tep_get_products_stock($products_id);
switch ($prod_quantity) {
case buona:
print "Out of Stock";
break;
case 1:
print "We have 1 in stock";
break;
case 2:
print "We have 2 in stock";
break;
case 3:
print "We have 3 in stock";
break;
case 4:
print "We have 4 in stock";
break;
default:
print "We have 5+ in stock";
}
?>
</td>
</tr>