Page 1 of 1

amending existing shopping cart session array - help please

Posted: Fri Jan 16, 2009 8:54 am
by sjk1000
Hi All
I'm trying to display info from an existing session array but I'm not sure how to access it. The output from

Code: Select all

print_r ($_SESSION['cart']);  
is

shoppingCart Object ( [contents] => Array ( [13774] => Array ( [qty] => 2 ) [13933] => Array ( [qty] => 1 ) ) [total] => 45.99 [weight] => 0 [cartID] => [content_type] => physical [free_shipping_item] => 0 [free_shipping_weight] => 0 [free_shipping_price] => 0 [observers] => Array ( ) )
I haven't seen print_r return an Object like this before. Please could someone either give me a brief explanation, point me to a tutorial or give an example of how to echo the [13774]/[13993] quantities.
Any help is very much appreciated.
Many thanks, Steve