i would recommend against the code i gave you before, since i believe the alert will still come up when there is an error with adding the product
instead in include/cart_process.php (or cart.php for 4.0.x), after
Code:
if ($productid && $amount) {
if ($amount < $added_product["min_amount"]) {
$return["redirect_to"] = "error_message.php?access_denied&id=31";
return $return;
}
put
echo "<script>alert('Product has been added.')</script>";