Skip to content

Commit

Permalink
BB-17191: Consents are accepted prematurely during single page checko…
Browse files Browse the repository at this point in the history
…ut (#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
  • Loading branch information
EugeneC authored Nov 24, 2021
1 parent cbd6c34 commit f650ba9
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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':
Expand Down

2 comments on commit f650ba9

@JAAFALI
Copy link

@JAAFALI JAAFALI commented on f650ba9 Mar 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
no thing happened when installed o orocommerce 5.0
composer require oro/commerce-demo-checkouts:5.0
php bin/console oro:platform:update --env=prod

I can't find it on workflow list.

@chrisaligent
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, no thing happened when installed o orocommerce 5.0 composer require oro/commerce-demo-checkouts:5.0 php bin/console oro:platform:update --env=prod

I can't find it on workflow list.

There may be some missing steps, see: #1

php bin/console oro:workflow:definition:load --env=prod
php bin/console oro:translation:load --env=prod

Please sign in to comment.