Hi,
The module Legal is really great for T&C acceptance and versioning but it breaks the Drupal Commerce Checkout flow.
User is asked to login or register before checkout, the account is created then the T&C confirmation form is displayed, after submitting, the user is redirected to is account page instead of the checkout flow next step.
This is a problem for the customer who has to go back to his cart and restart the checkout process
Is it on the Legal module side that the problem must be solved or on the Commerce module side?

Issue fork legal-3261075

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

yom created an issue. See original summary.

jsacksick’s picture

Project: Commerce Core » Legal
Version: 8.x-2.x-dev » 2.0.x-dev
Component: User experience » Code
yom’s picture

Hi,
Here is a patch that detects if the previous login/register page is from the Guest login or register Commerce checkout pane, in this case it redirects to the "order information' checkout step instead of the user account page.

Mark Abrams’s picture

Hi

Thanks for the patch! It fixed the Drupal Commerce Checkout flow.

However, there is a problem with the login when user has to login and accept changes to terms.

if ($user_cart_id =""){

should be

if ($user_cart_id ==""){
aleix’s picture

Assigned: yom » Unassigned
Status: Active » Needs review
StatusFileSize
new1.7 KB

So I am adding this patch again with change of #4, to use in composer-patches.

anybody’s picture

Priority: Normal » Major

Increasing priority, as this breaks functionality.

anybody’s picture

anybody’s picture

Version: 2.0.x-dev » 3.0.x-dev
john franklin’s picture

@aleix, does the patch in #2897486: Don't log out users who do not accept the T&C work for Commerce Checkout?

aleix’s picture

@john-frnklin I am sorry but I am on vacation now, in September I'll start a commerce implementation in a working site, I'll check it out then. I keep the mail notification flagged to keep in mind.