class ShoppingCart{
public function __construct(){
// Check and see if shopping cart already exists, if it doesn't, set the array to the variable
if($_SESSION['cart'] == null){
$_SESSION['cart'] = array();
$_SESSION['cart']['totPrice'] = 0;
$_SESSION['cart']['totKorting']['totaal'] = 0;
$_SESSION['cart']['totKorting'][6] = 0;
$_SESSION['cart']['totKorting'][19] = 0;
}
if($_SESSION['userinfo'] == null){
$_SESSION['userinfo'] = array();
}
}
......... |