From f650ba93ea82e4136add41a258ebffd6e2c89325 Mon Sep 17 00:00:00 2001 From: Eugene Chetverikov Date: Wed, 24 Nov 2021 12:31:36 +0200 Subject: [PATCH] BB-17191: Consents are accepted prematurely during single page checkout (#31072) - added customer user should be able to withdraw consent on single page checkout - fixed consents block randomly freezes after reload when consent checkbox is already checked - added clearing of customerConsents attribute for logged customer users after saving accepted consents - added decline consents button was marked with btn--info class --- .../Resources/config/oro/workflows.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Oro/Bundle/AlternativeCheckoutBundle/Resources/config/oro/workflows.yml b/src/Oro/Bundle/AlternativeCheckoutBundle/Resources/config/oro/workflows.yml index 8478da8..f303243 100644 --- a/src/Oro/Bundle/AlternativeCheckoutBundle/Resources/config/oro/workflows.yml +++ b/src/Oro/Bundle/AlternativeCheckoutBundle/Resources/config/oro/workflows.yml @@ -817,6 +817,13 @@ workflows: actions: - '@save_accepted_consents': acceptedConsents: $customerConsents + - '@tree': + conditions: + '@and': #For logged customer user only + - '@not_empty': $checkout.customerUser + - '@equal': [$checkout.customerUser.isGuest, false] + actions: + - '@assign_value': [$customerConsents, null] - '@generate_uuid': $state_token continue_to_shipping_address_definition: @@ -871,6 +878,13 @@ workflows: data.billing_address_has_shipping: $.billing_address_has_shipping - '@save_accepted_consents': acceptedConsents: $customerConsents + - '@tree': + conditions: + '@and': #For logged customer user only + - '@not_empty': $checkout.customerUser + - '@equal': [$checkout.customerUser.isGuest, false] + actions: + - '@assign_value': [$customerConsents, null] # Disables state checking in inner transition to continue_to_shipping_method. - '@generate_uuid': $state_token - '@tree':