Using ecivicrm instead of the address module, the addresses are not stored for anonymous purchases due to a missing line in ecivicrm.module at line 302:

  else {
    /* Don't use the addressbook if the user can buy anonymously */
    $form['mail'] = array(
      '#type' => 'textfield', 
      '#title' => t('E-mail address'), 
      '#default_value' => $edit['mail'], 
      '#size' => 30, 
      '#maxlength' => 64, 
      '#required' => true,
      '#description' => t('Please double-check to make sure you email address is correct.')
    );
    $form['address']['billing'] = store_address_form($txn->address['billing']);
    $form['address']['billing']['firstname']['#required'] = TRUE;
    $form['address']['billing']['lastname']['#required'] = TRUE;
    if ($txn->shippable) {
      $form['address']['billing']['#type'] = 'fieldset';
      $form['address']['billing']['#title'] = t('Billing address');
      $form['address']['shipping'] = store_address_form($txn->address['shipping']);
      $form['address']['shipping']['#type'] = 'fieldset';
      $form['address']['shipping']['#title'] = t('Shipping address');
    }
  }
  return $form;

should be

  else {
    /* Don't use the addressbook if the user can buy anonymously */
    $form['mail'] = array(
      '#type' => 'textfield', 
      '#title' => t('E-mail address'), 
      '#default_value' => $edit['mail'], 
      '#size' => 30, 
      '#maxlength' => 64, 
      '#required' => true,
      '#description' => t('Please double-check to make sure you email address is correct.')
    );
    $form['address']['billing'] = store_address_form($txn->address['billing']);
    $form['address']['billing']['firstname']['#required'] = TRUE;
    $form['address']['billing']['lastname']['#required'] = TRUE;
    if ($txn->shippable) {
      $form['address']['billing']['#type'] = 'fieldset';
      $form['address']['billing']['#title'] = t('Billing address');
      $form['address']['shipping'] = store_address_form($txn->address['shipping']);
      $form['address']['shipping']['#type'] = 'fieldset';
      $form['address']['shipping']['#title'] = t('Shipping address');
    }
    $form['address']['#tree'] = TRUE;
  }
  return $form;

as in address.module

Comments

brmassa’s picture

Status: Needs review » Closed (fixed)

Pierre-Yves,

im closing this issue coz this too old and the modules have been changed. feel free to reopen it in case the bug persist. (please test against ec4)

regards,

massa