I am trying to notify the user for their expired products. This works well. but i am not being able to display the product name in alert which is the variable $product->name
.
<?php foreach($productsofuser as $product):?>
<?php if($product->status="Expired")
{
?><script>alert('Product expired!');</script><?php
}
?>
<?php endforeach;?>