View Single Post
  #75  
Old 11-01-2012, 11:04 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Additional fields for address book

Quote:
Originally Posted by GreatLakesVacuum
I actually tried this at first... but it is at the very bottom, not at all where Company belongs... it should be FIRST. So it didn't really seem much better than a custom one that would be basically in the same spot and not require removal of Fax (and manually cleaning up all the fax numbers people have entered)
For most businesses Company is best left at the end in my opinion, putting it at the top would only be good for b2b.

Re-ordering the fields is not easy to figure out, but in theory it should be simple to do. It looks like the fields are defined in two places, once in init.php and again in the database under xcart_config>address_book_fields.

Initially I don't believe any values are stored in the db at all, but once you have used the Settings> user profiles page in the admin it stores the value in the db. Theoretically you could change the order of the fields by altering the order in init.php.

If you already have a value stored in the xcart_config table it will override this setting, and since it is serialized it is harder for humans to read and adjust. So I would just delete this entry from the db. Once the field order is loaded from init.php, it should store the value correctly in the db for later adjustment of what is active/required. So if you want to use fax as company, you can just move it to the top of the list.

Keep in mind that I have not tested this at all, don't try this on your live shop until you have tested all the implications on your dev site.

Hope that helps,
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote