User Fields


Posted on Monday, May 9th, 2011


In the ‘My Account’ section of the theme there are a number of hard coded custom fields such as address,city etc which are not usually apart of WordPress, here ill discuss quickly how to edit these.

Default user fields for WordPress can be seen here: http://codex.wordpress.org/Author_Templates

The PremiumPress custom member data is all stored in an long string with values seperated with “**” within the “jabber” field since this field is rarely used by WP users any more.

 

Normal WordPress usage would be;

 
print $userdata->jabber; <-- will print a string

PremiumPress usage;

 
$data = explode("**",$userdata->jabber);
 
print_r($data); <-- prints an array

 

Save order;

 
$_POST['form']['jabber']  = $_POST['address']['country']."**";
$_POST['form']['jabber'] .= $_POST['address']['state']."**";
$_POST['form']['jabber'] .= $_POST['address']['address']."**";
$_POST['form']['jabber'] .= $_POST['address']['city']."**";
$_POST['form']['jabber'] .= $_POST['address']['zip']."**";
$_POST['form']['jabber'] .= $_POST['address']['phone'];

 

Files to edit if you want to change/edit/add;

 

tpl-myaccount.php

template_**/_tpl_myaccount.php

 

** = the theme your using for example: directorypress

 


  1. comment says:
    Posted August 30, 2011 at 11:48 pm | Permalink

    Hi Mark, can you do a tutorial on creating custom product fields for ShopperPress for us.

    Thinking this should be easy to do on a store, but I have no clue how to do it, or which file(s) to edit. I just want to be able to add simple text inputs so customers can fill in, but seem only able to create dropdown fields?

    This should be a pretty important requirement for shopping carts I would have thought.

    Thanks for your time, cheers, Ian