commerce address 添加 phone 字段 addressfield_phone

    if (!$settings || isset($settings['phone'])) {

      $format['phone_block']['phone_number']['phone_number'] = array(

        '#title' => t('Contact Phone'),

        '#size' => 15,

        '#attributes' => array('class' => array('phone-number')),

        '#type' => 'textfield',

        '#tag' => 'span',

        '#default_value' => isset($address['phone_number']) ? $address['phone_number'] : '',

        '#required' => TRUE,

      );

sites/all/modules/addressfield_phone/plugins/format/phone.inc 46行后添加红色背景的一句,强制contact phone 为必须项, 电话号码为快递必须的项.


addressfield_phone 是address 的扩展,支持在commerce feeds 中映射和导入.支持phone,分机,移动电话,传真四项. phone,telephone 则不是address的扩展,不能通过 commerce feeds 来导入.