Quote:
|
Originally Posted by evilhomer So are you going to share the solution with us Louie ??  |
the solution was to create the
function add_item_to_cart($id,$pdid,$quantity) {
$cart_id = $id.$pdid; //
this the line that got me mixed up - was looking into the wrong direction
//echo $cart_id;
//die();
// set cookie and store value in session
setstp();
session_regenerate_id(TRUE);
$_SESSION["cart"][$cart_id][0] = $id; //$item["productid"];
$_SESSION["cart"][$cart_id][1] = $quantity;//$quantity
$_SESSION["cart"][$cart_id][2] = $pdid; //$productdetailid
header ("location:viewcart.php");//redirect after product added to cart
//}
}