It would be nice to pull in address default preferences during the checkout, when people are entering new addresses that may be preferred.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gcb created an issue. See original summary.

gcb’s picture

gcb’s picture

Status: Active » Needs review
jsacksick’s picture

Status: Needs review » Needs work
+++ b/commerce_addressbook.module
@@ -394,6 +394,15 @@ function commerce_addressbook_form_alter(&$form, &$form_state, $form_id) {
+          '#title' => 'Set this as my default ' . $checkout_pane['title'],

This should be wrapped in a t(), something like t('Set this as my default @profile_type, array('@profile_type' => ....);
Profile type should be loaded first (if that's not already the case via commerce_customer_profile_type_load(), see commerce_customer.checkout_pane.inc for an example).

Furthermore, this should only appear if the user already has a default address, otherwise, this would be useless (the first address will be automatically set as the default).

gcb’s picture

Also it didn't work if your addressbook was empty before completing form. That and the translation issue are fixed. The other conditional seems not particularly important: how is the perception of control a problem in this case?

gcb’s picture

Status: Needs work » Needs review