Hi,
I have three attributes fields (first name, last name and email) for a webinar product class and I'm trying to write a basic module to automatically transfer the data from those fields to a website called GoToWebinar on completion of the order.
I've set up the integration with GoToWebinar with dummy data and it works fine, but I'm having trouble getting the actual data for these attributes out of the data column in uc_order_products. Here's what I've got in the field...
-------------------------
a:3:{s:10:"attributes";a:3:{s:10:"First name";a:1:{i:0;s:6:"Ennio";}s:9:"Last name";a:1:{i:0;s:4:"Morricone";}s:5:"Email";a:1:{i:0;s:28:"ennio.morricone@gmail.com";}}s:9:"shippable";s:1:"0";s:6:"module";s:10:"uc_product";}
-------------------------
Does anyone know the cleanest way of grabbing the values for the three attributes so I can use and manipulate each one separately. I know I need to unserialize it - which gives me the following...
-------------------------
array(3) { ["attributes"]=> array(3) { ["First name"]=> array(1) { [0]=> string(6) "Ennio" } ["Last name"]=> array(1) { [0]=> string(4) "Morricone" } ["Email"]=> array(1) { [0]=> string(28) "ennio.morricone@gmail.com" } } ["shippable"]=> string(1) "0" ["module"]=> string(10) "uc_product" }
-------------------------
...but then I get stuck. (apologies - I know the basics of arrays, but I'm a PHP newbie and my very thin knowledge isn't quite cutting it here!).
Big thanks in advance.
