I'm not entirely sure what I may or may not have done here but I have a simple installation with no custom code (apart from one custom module which is for managing groups content and nothing to do with Commerce) and have enabled Stripe and the example payment modules and created 2 payment gateways.

I have the "Login or continue as guest" set to Guest = no but Registration = yes.

When the user clicks checkout they are taken to the unified login / register form and on the next screen (Order information) where the address details form should be there is an "Edit" button (see attached screen grab). I have seen that somebody else has had a similar issue (also with Commerce Stripe installed) but they did not want to collect address information and so all they had to do was disable address / billing info collection on the stripe payment gateway settings.

Anybody had the same issue and how can I have the address form on the payment pane again?

Comments

vaccinemedia created an issue. See original summary.

vaccinemedia’s picture

On totally removing all traces of commerce and re-installing the modules again I managed to have the address form showing on the payment information pane. However, this involved removing all existing product variations, products etc which due to the amount of fields, display config, content entry isn't really viable and will take days to do and basically mean starting the whole shop from scratch. I've looked at the class of the edit button and the only instance I can find of it is in this function:

if ($this->shouldRender($inline_form, $form_state)) {
      $view_builder = $this->entityTypeManager->getViewBuilder('profile');
      $inline_form['rendered'] = $view_builder->view($this->entity);
      $inline_form['edit_button'] = [
        '#type' => 'button',
        '#name' => $inline_form['#profile_scope'] . '_edit',
        '#value' => $this->t('Edit'),
        '#ajax' => [
          'callback' => [get_called_class(), 'ajaxRefresh'],
          'wrapper' => $inline_form['#id'],
        ],
        '#limit_validation_errors' => [$inline_form['#parents']],
        '#attributes' => [
          'class' => ['address-book-edit-button'],
        ],
      ];
    }
bojanz’s picture

Your order already has a profile created, and Commerce thinks that the profile is complete, because $profile->validate() returns no errors.
The address is obviously empty, so the address field was either removed or had its individual properties hidden.

Create a fresh install in parallel (of https://github.com/drupalcommerce/demo-project for example) and compare the Customer profile type on admin/config/people/profile-types, look at the field, form display, view display. See if there are any differences that might affect the logic.

vaccinemedia’s picture

After a lot of installing / uninstalling I have narrowed it down to the Commerce Auto SKU module. Simply uninstalling this module and then refreshing my test browser finally got the billing address / customer profile form showing at checkout after submitting the user registration form on the unified login / register form. I do not know exactly how this module is affecting the checkout but this issue needs moving over to that module if possible to be looked into further.

steveoriol’s picture

Same issue here, by uninstalling the module "commerce_autosku", the address forms ( billing and shipping) come back...

bojanz’s picture

Title: Customer profile form / address not showing on payment pane shows Edit button instead » [AutoSKU incompatibility] Customer profile form not showing on payment pane, shows Edit button instead

Retitling.

I wonder if it's caused by this: https://git.drupalcode.org/project/commerce_autosku/blob/8.x-2.x/commerc...
You could try commenting out line 99 and clearing cache to confirm.

steveoriol’s picture

Hello bojanz,
Yes, I confirm that by commenting the line 99 (and clearing cache), it works.

bojanz’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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