The Extra Fields Checkout Pane module, in its 2.x version (which is only compatible with Ubercart 2.3+), lets you add new address fields to billing and delivery, as needed.

I've gotten an integration working on my forked -dev version of the module. If I have a chance, I will try to post the patch for this feature (rolled off the regular -dev) before the day is out. If not, I'll post it once I get back from Thanksgiving.

Comments

EvanDonovan’s picture

Status: Active » Needs review
StatusFileSize
new1.87 KB

Here's the patch. If someone could test this with the Extra Fields module, and report back with their findings, then I will commit it.

megachriz’s picture

Note that there will become some changes in the uc_extra_fields_pane_load_fields_from_db() function. It's going to return field objects in the next version of Extra Fields Pane, instead of field arrays, so it is consistent with uc_extra_fields_pane_field_load() function.

EvanDonovan’s picture

Looks like the latest commit to 2.x of Extra Fields Pane did not affect this code.

EvanDonovan’s picture

Status: Needs review » Postponed

However, I am not going to commit this to the module until there is a stable 2.x release of Extra Fields Pane. This patch should work for those who need it, though.

EvanDonovan’s picture

Actually, I was wrong. I had accidentally untar'red the earlier version of Extra Fields Pane again. The latest dev has a bug in uc_extra_fields_pane_uc_checkout_pane_address() (undefined function because of the move to an include file), and also required the following change to my integration (in uc_sf_order_fieldmap_objects):

if(module_exists('uc_extra_fields_pane')) {
  $extra_fields_db = array_merge(uc_extra_fields_pane_load_fields_from_db('all'), uc_extra_fields_pane_load_fields_from_db('extra_address'));
  foreach($extra_fields_db as $field) {
    $objects['uc_order']['fields'][$field->db_name] = array('label' => $field->label, 'group' => 'Extra Fields', 'export' => '_uc_sf_order_export_extra_fields');
  }
}

I won't actually re-roll the patch until there is a stable release of Extra Fields Pane, though.

megachriz’s picture

In the latest version of Extra Fields Pane (January 12/13) there was a schema change, the column 'display' of the table 'uc_extra_fields' have been replaced with 'display_settings'. This does not affect the patch posted here.

EvanDonovan’s picture

Thanks. It'll be a while before I add this feature to the actual release of my module.

EvanDonovan’s picture

Status: Postponed » Fixed

This has been added. Any further comments should be opened as followup issues.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.