if ($i < count($_SESSION["gids"])) //increase current product's quantity { if (!CONF_SHOW_ADD2CART_INSTOCK) if (($is - $_SESSION["counts"][$i] - $pcount)<0) {echo "-1"; return 0;} $_SESSION["counts"][$i]+ = $pcount; }