);
if(empty($_SESSION["shopping_cart"])) {
$_SESSION["shopping_cart"] = $tovars;
$status = "<div class='box'>Product is added to your cart!</div>";
}else{
$array_keys = array_keys($_SESSION["shopping_cart"]);
if(in_array($idcat,$array_keys)) {
$status = "<div class='box' style='color:red;'>
Product is already added to your cart!</div>";
} else {
$_SESSION["shopping_cart"] = array_merge(
$_SESSION["shopping_cart"],
$tovars
);
$status = "<div class='box'>Product is added to your cart!</div>";
}
}
}