-
Notifications
You must be signed in to change notification settings - Fork 212
@W-21109850: Continue as Guest skips entering phone number #3626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
syadupathi-sf
merged 13 commits into
1cc_bugs
from
dannyphan2000.W-21109850.continue-as-guest-fix
Feb 3, 2026
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
e116bc2
One click checkout
syadupathi-sf bb0eab8
changes to fix install, tests and lint - needs to be reviewed
syadupathi-sf a7c1d94
revert the test change in pwa-kit-runtime
syadupathi-sf 56bb9a4
@W-20892497 Show Phone number in Contact Info summary (#3576)
syadupathi-sf 96af92e
@W-20892592 Remove gift messaging for multi shipment (#3579)
syadupathi-sf 96364ae
@W-20892530 @W-20892577 Billing Address Validation and Using contact …
syadupathi-sf eeb198e
Fix SDK tests (#3593)
syadupathi-sf 131eb6c
@ W-20540715 Address 1CC feature branch review comments (#3619)
syadupathi-sf 35f2265
passwordless mode updates
syadupathi-sf f7faf3d
@W-21109850: Continue as Guest skips entering phone number
dannyphan2000 bbf8ec8
fix import
dannyphan2000 b63ed11
translations
syadupathi-sf ec3294f
fix user not found error
syadupathi-sf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -112,7 +112,7 @@ const ContactInfo = ({isSocialEnabled = false, idps = [], onRegisteredUserChoseG | |
| const [isCheckingEmail, setIsCheckingEmail] = useState(false) | ||
| const [isSubmitting, setIsSubmitting] = useState(false) | ||
| const [isBlurChecking, setIsBlurChecking] = useState(false) | ||
| const [, setRegisteredUserChoseGuest] = useState(false) | ||
| const [registeredUserChoseGuest, setRegisteredUserChoseGuest] = useState(false) | ||
| const [emailError, setEmailError] = useState('') | ||
|
|
||
| // Auto-focus the email field when the component mounts | ||
|
|
@@ -244,8 +244,15 @@ const ContactInfo = ({isSocialEnabled = false, idps = [], onRegisteredUserChoseG | |
| lastEmailSentRef.current = normalizedEmail | ||
| return {isRegistered: true} | ||
| } catch (error) { | ||
| const message = formatMessage(getPasswordlessErrorMessage(error.message)) | ||
| setError(message) | ||
| const errMsg = error?.message || '' | ||
| const isUserNotFound = | ||
| /user not found|email not found|unknown user|no account|no user|error getting user info/i.test( | ||
| errMsg | ||
| ) | ||
| if (!isUserNotFound) { | ||
| const message = formatMessage(getPasswordlessErrorMessage(errMsg)) | ||
| setError(message) | ||
| } | ||
| // Keep continue button visible if email is valid (for unregistered users) | ||
| if (isValidEmail(email)) { | ||
| setShowContinueButton(true) | ||
|
|
@@ -272,37 +279,10 @@ const ContactInfo = ({isSocialEnabled = false, idps = [], onRegisteredUserChoseG | |
| } | ||
|
|
||
| // Handle checkout as guest from OTP modal | ||
| const handleCheckoutAsGuest = async () => { | ||
| try { | ||
| const email = form.getValues('email') | ||
| const phone = form.getValues('phone') | ||
| // Update basket with guest email | ||
| await updateCustomerForBasket.mutateAsync({ | ||
| parameters: {basketId: basket.basketId}, | ||
| body: {email: email} | ||
| }) | ||
|
|
||
| // Save phone number to basket billing address for guest shoppers | ||
| if (phone) { | ||
| await updateBillingAddressForBasket.mutateAsync({ | ||
| parameters: {basketId: basket.basketId}, | ||
| body: { | ||
| ...basket?.billingAddress, | ||
| phone: phone | ||
| } | ||
| }) | ||
| } | ||
|
|
||
| // Set the flag that "Checkout as Guest" was clicked | ||
| setRegisteredUserChoseGuest(true) | ||
| if (onRegisteredUserChoseGuest) { | ||
| onRegisteredUserChoseGuest(true) | ||
| } | ||
|
|
||
| // Proceed to next step (shipping address) | ||
| goToNextStep() | ||
| } catch (error) { | ||
| setError(error.message) | ||
| const handleCheckoutAsGuest = () => { | ||
| setRegisteredUserChoseGuest(true) | ||
| if (onRegisteredUserChoseGuest) { | ||
| onRegisteredUserChoseGuest(true) | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -472,7 +452,7 @@ const ContactInfo = ({isSocialEnabled = false, idps = [], onRegisteredUserChoseG | |
| return | ||
| } | ||
|
|
||
| if (!result.isRegistered) { | ||
| if (!result.isRegistered || registeredUserChoseGuest) { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All the information are saved to basket upon Continue to Shipping Address (ie submit the form) just like a guest shopper |
||
| // Guest shoppers must provide phone number before proceeding | ||
| const phone = (formData.phone || '').trim() | ||
| if (!phone) { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only closing the modal for now (and set state)