Is it possible to add more fields for if other information is needed? Such as a fax number?

CommentFileSizeAuthor
#3 uc_addresses_xtra_fields.patch18.5 KBDaniel Norton

Comments

freixas’s picture

Assigned: Unassigned » freixas
Status: Active » Closed (won't fix)

Is it possible? Yes.

Is it easy? No, not as far as I know. The work really needs to begin with Ubercart, not the uc_addresses module.

mikepadiernos’s picture

I found that out the hard way and hard-coded the single "fax" field throughout ubercart. Thanks though.

Daniel Norton’s picture

Issue tags: +patch, +workaround, +additional fields
StatusFileSize
new18.5 KB

The attached patch to uc_addresses-6.x-1.0-rc1 and ubercart core (uc_store) 6.x-2.2 adds two address fields:

  • phone2 - Alternate phone number, and
  • job_title - Addressee's job title

After installing this patch, you must run update.php.

You will probably want to modify the variable uc_address_fields and one or more country format variables, such as uc_address_format_840 so that you can see the new fields.

I made the minimal changes necessary to the core (uc_store), so these fields won't actually show up anywhere except in the user profile unless you have custom code that pulls them out.

You could theme these two additional fields to look like any free text field you want. To serve my immediate needs, my custom code and theme hooks displays the alternate phone number as a fax number, which provides a solution to the original question.