VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: kariem112 on June 12, 2013, 21:42:46 PM

Title: Get value from cartsession with unserialize
Post by: kariem112 on June 12, 2013, 21:42:46 PM
I need to do a cart modification. I can print out the unserialized cart data with:

<?php  print_r(unserialize($_SESSION['__vm']['vmcart'])); ?>

The output starts with:
stdClass Object ( [products] => Array ( [531] => stdClass Object ( [attr1] => [attr2] => S [attr_stock] => 3 [attr1_title] => [attr2_title] => Maat

Now I want to put attr1, attr2 and attr1_title and attr2_title each in different variables..  How would I be able to do that?