SAP / spartacus

Spartacus is a lean, Angular-based JavaScript storefront for SAP Commerce Cloud that communicates exclusively through the Commerce REST API.
Apache License 2.0
744 stars 389 forks source link

Add create account form to the order confirmation #1178

Closed LTiger14 closed 5 years ago

LTiger14 commented 5 years ago

After confirming the order, the user lands on the order confirmation page. If the user is a guest, the page should display an account creation from at the top of the regular page as mocked by UX. To create a user, the same API as the regular registration is use (POST /users). The only fields to provide are: guid (the guid field from the order) and password. After the registration the user is should be logged in.

Mocks: https://98qkkl.axshare.com/#g=1&p=d_order_confirmation_2

Note this ticket does not require the fancy password rules verification box from the mocks. This should reuse the password and confirm password from the registration form.

Acceptance criteria

hackergil commented 5 years ago

Currently there is no OCC endpoint to upgrade the user to a registered user. To be addressed on this ticket

https://jira.hybris.com/browse/RAY-404

/users endpoint can create a new user, but the order won't be linked to it. Proper way to do it is by upgrading the current account to a user account.

LTiger14 commented 5 years ago

Got a response from team Stingrays. There is no other endpoint that supports this feature so we can use the deprecated one. This issue is unblocked.

LTiger14 commented 5 years ago

To promote the guest user to actual user use: /users data: guid & password as x-www-form-url-encoded

giancorderoortiz commented 5 years ago

Unable to advance to order confirmation. See https://github.com/SAP/cloud-commerce-spartacus-storefront/issues/4458 (Intermittent issue)

giancorderoortiz commented 5 years ago

Styling pending. See https://github.com/SAP/cloud-commerce-spartacus-storefront/issues/4449

giancorderoortiz commented 5 years ago

Functionality confirmed. 🆗 Able to do guest checkout with different addresses.