Skip to content

fix(checkout): guest signup leaves no order history and breaks later … - #5

Merged
Sakib-invento merged 1 commit into
version-16from
develop
Oct 12, 2026
Merged

Sakib-invento merged 1 commit into
version-16from
develop

Conversation

@Sakib-invento

Copy link
Copy Markdown
Collaborator

…orders

Guest checkout's place_order() created the new Customer without a Portal User row, so the storefront order-history page (which finds the Customer via Portal User, not Contact) showed no orders for a customer who had just signed up - not even their own first one. create_party() now adds the Portal User row, matching what the standalone /register flow already did.

Separately, Frappe auto-creates a Contact for every new User via a background job that can race storekit's own Contact creation during checkout, leaving two Contact rows for one email - one linked to the new Customer, one not. get_party() had no way to prefer the right one, so a later visit could land on the unlinked Contact and silently spin up a second, empty Customer whose address didn't match the one saved at signup - surfacing as "Something went wrong" on the next order. Added _resolve_contact_for_email() to prefer a linked Contact over an unlinked one, and used it in get_party(), create_contact() and _get_cart_quotation().

Release 1.1.1.

…orders

Guest checkout's place_order() created the new Customer without a Portal
User row, so the storefront order-history page (which finds the Customer
via Portal User, not Contact) showed no orders for a customer who had
just signed up - not even their own first one. create_party() now adds
the Portal User row, matching what the standalone /register flow already
did.

Separately, Frappe auto-creates a Contact for every new User via a
background job that can race storekit's own Contact creation during
checkout, leaving two Contact rows for one email - one linked to the new
Customer, one not. get_party() had no way to prefer the right one, so a
later visit could land on the unlinked Contact and silently spin up a
second, empty Customer whose address didn't match the one saved at
signup - surfacing as "Something went wrong" on the next order. Added
_resolve_contact_for_email() to prefer a linked Contact over an unlinked
one, and used it in get_party(), create_contact() and
_get_cart_quotation().

Release 1.1.1.
@Sakib-invento
Sakib-invento merged commit d268814 into version-16 Oct 12, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant