Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I want to create orders programatically in my custom form.
I would like to have addressbook form fields in this form too.
I noticed, that address fields are added in hook_form_alter, but there are many conditions and added variables, which doesn't exists in my custom form (checkout ID, existing customer profile).
Is it possible to display address fields in my custom form and attach address directly to one order?
Comments
Comment #1
jsacksick CreditAttribution: jsacksick commentedI'm not sure this issue is in the correct issue queue because the addressbook module only adds a select list...
The code that does that is located in the commerce_customer.checkout_pane.inc file in commerce/modules/customer/includes.
Especially those two lines :