I have tried what you wrote.
Beginner in the world of objects here. Syntax problem
$test = $_SESSION['cart']->contents[0]['attributes'];
echo $test;
doesn't work for me. I have tried a number of combinations of syntax.
What I am looking for is to see if in this(the attribute part of the object)
{ [0]=> string(2) "96" [6]=> string(3) "299" [7]=> string(3) "300" }
there is the 6 which is an id and the 299 is a value to that id. In this you see it is there i need to check that the cart does or doesn't have any items with that attribute.
The line above comes from a var_dump of the cart session
Help Please.