Looking to edit the order of the fields or even introducing new fields on the customer profile. You can do this by following this guide.

The initial order of the fields is set in the “init.php” script ($default_address_book_fields array). Further the fields are cached in DB and file system, probably thus changing the order has not worked.

Once the order is changed in the “init.php” script, you should clear the DB cache -> “DELETE FROM xcart_config WHERE name = ‘address_book_fields’;” and further clear the cache via -> “cleanup.php”. After that the updated fields order will be used in the front end.

To add a new field

If you need to add a company field to the address book

Edit init.php and modify the $default_address_book_fields by adding a new company decalartion to the array like so

$default_address_book_fields = array(
        'company'     => array(
            'avail'     => array('A' => 'N', 'P' => 'N', 'B' => 'N', 'C' => 'Y', 'H' => 'Y'),
            'required'  => array('A' => 'N', 'P' => 'N', 'B' => 'N', 'C' => 'Y', 'H' => 'Y')
        ),
        'title' => array (
            'avail'     => array('A' => 'N', 'P' => 'N', 'B' => 'N', 'C' => 'N', 'H' => 'N'),
            'required'  => array('A' => 'N', 'P' => 'N', 'B' => 'N', 'C' => 'N', 'H' => 'N')
        ),

Then run the following SQL which will reset all your settings in the User profiles backend section. So you will need to remember what your settings are in advance, so you can change them after running this SQL.

DELETE FROM xcart_config WHERE name = 'address_book_fields';

You will then need to edit the xcart_address_book and add a company field before title varchar 255 and xcart_orders tables b_company and s_company to include the new company fields.