1
I need to put an unavailable product message on my system, which takes the available status of db (YES or NO) I made an IF that changes the image of the product when the status is NOT but I want a message if the user click on it saying that it is unavailable..
Products are pulled as bank list and everyone already has a confirmation Alert when a user clicks, but need it to change the message if the item is unavailable
Here’s what I got: Show the products like this:
<a href="cadastra.php?cod=<?php echo $id_pro ?>&nome=<?php echo $nomepro ?>&preco=<?php echo $precopro ?> class="btn twitter" onclick="return confirm('<?php echo $nomepro ?> - CONFIRMA O PEDIDO?')">
<h3 class="heading-title"><?php echo $nomepro ?>  R$<?php echo $precopro ?></h3> </a>
IF changing the image when unavailable is so:
$sqlp = mysql_query("SELECT * FROM produtos WHERE id_categoria='11'");
while($verp = mysql_fetch_array($sqlp)){
$disponivel = $verp['disponivel'];
$id_pro = $verp['cod'];
$nomepro = $verp['nome'];
$descpro = $verp['descricao'];
$precopro = $verp['preco'];
if($disponivel == SIM){
$img = "../imagens/disponivel.png";
}else{
$img = "../imagens/indisponivel.png";
}
I am using jquery (without knowing) if anyone has any ideas, Thank you!