What is "optional" about autocreated guest checkout?

Created on 2 August 2023, 11 months ago
Updated 24 June 2024, 3 days ago

When "Guest Checkout" is enabled, an anonymous end user will see "Proceed to checkout. You can optionally create an account at the end.". The word "optionally" here, however, seems useless, in multiple ways. Either the description needs to be dynamically updated based on admin configuration, or it needs to be removed entirely.

  • If the admin has enabled "Create a new account for an anonymous order", then the account WILL be created, whether the user wants it to be or not. There is nothing optional about it.
  • If the admin has enabled "Assign an anonymous order to a pre-existing user", then the user won't have the ability to themselves choose whether to optionally create an account or not. The matching is gonna happen whether the user wants to or not.
πŸ› Bug report
Status

Active

Version

2.0

Component

User experience

Created by

πŸ‡ΊπŸ‡ΈUnited States Morbus Iff

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

Comments & Activities

  • Issue created by @Morbus Iff
  • πŸ‡ΊπŸ‡ΈUnited States Morbus Iff
  • πŸ‡³πŸ‡¬Nigeria chike Nigeria

    I too am wondering what is 'optional' about an account that will surely be created without the user doing anything about it.

    I have been searching through the variables on the form and don't seem to see a way to override the text. Is there a way please? I want to set "Proceed to checkout, an account will be created for you at the end. You will be notified via email about your new account."

  • πŸ‡³πŸ‡¬Nigeria chike Nigeria

    For anyone else looking to override this text, you can put this on a custom module or .theme file,

    /**
     * Implements hook_form_alter().
     */
    
    function custommodule_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
              //Override 'Proceed as guest' text
              $form['login']['guest']['text']['#markup'] = t('<p>Proceed to checkout, an account will be created for you at the end. You will be notified via email about your new account.</p><p>You can also proceed as guest if you have an existing account and your new order will be added to your account.</p>');
    }
    
Production build 0.69.0 2024