News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Get value from cartsession with unserialize

Started by kariem112, June 12, 2013, 21:42:46 PM

Previous topic - Next topic

kariem112

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?