Commerce Checkout Flow Behavior

Created on 22 September 2024, 7 months ago

Problem/Motivation

I have created a custom checkout flow, enabled the email_registration flow and moved the new pane up to the login step. When I disable "Guest checkout" and "Register on login" via the regular Login step it won't show the form action to move to the next step.
If I do them same with email_registration enabled, it will show the form action labelled "Continue to custom step" and allows to circumvent the login.

Here is my code out of the CustomCheckoutFlow-Class:

public function getSteps() {
    return [
        'login' => [
          'label' => $this->t('Login'),
          'previous_label' => $this->t('Return to login'),
          'has_sidebar' => FALSE,
          'weight' => -10,
        ],
        'custom_step' => [
          'label' => $this->t('Custom Step'),
          'previous_label' => $this->t('Return to login'),
          'next_label' => $this->t('Continue to custom step'),
          'has_sidebar' => TRUE,
          'weight' => 0
        ],
      ] + parent::getSteps();
}

A quick solution is to just remove 'next_label' from the custom_step-array:

  'custom_step' => [
          'label' => $this->t('Custom Step'),
          'previous_label' => $this->t('Return to login'),
       
          'has_sidebar' => TRUE,
          'weight' => 0
        ]

but on the regular "login"-pane this is not needed, the form actions are not shown either way. I had a look in the email_registration Commerce-code where the pane is built but there nothing touches these form_actions.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇦🇹Austria roromedia Linz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024