I have three custom fields that are used to store members address, city, state, and zip. I would like to transfer data from those custom fields into amember address fields, so then they can be used to pass the address to PayPal. How can this be accomplished because within the database it stores it in one field called "data" Thanks for any advice (either 1) transfer address info from field to field or b) allow my custom address fields to be passed to PayPal.
You can do this using this php script: PHP: <?include "/path/to/amember/config.inc.php";$q = $db->query("select member_id,data from amember_members");while(list($id, $data) = mysql_fetch_row($q)){$u = $db->get_user($id);$data = unserialize($data);$u['street'] = $data['YOURSTREETFIELDNAME'];$u['country'] = $data['YOURCOUNTRYFIELDNAME'];$u['zip'] = $data['YOURZIPFIELDNAME'];$u['city'] = $data['YOURCITYFIELDNAME'];$u['state'] = $data['YOURSTATEFIELDNAME'];$db->update_user($id, $u);} ?> Please backup database first.
OK, I was able to execute it. Everything went fine except it didn't carry over the state and country. How can I set all member's state and country to be the same in the database for the two built in amember address fields? It should be VA for state and US for country for all current members. Thank you!