docs(cart): define the continue_url destination and format - #801
Open
YanisMtcr wants to merge 1 commit into
Open
docs(cart): define the continue_url destination and format#801YanisMtcr wants to merge 1 commit into
YanisMtcr wants to merge 1 commit into
Conversation
The cart page asks businesses to provide continue_url but leaves its destination as a TODO from Universal-Commerce-Protocol#73. The permalink spec already lets the business resolve into a cart or a checkout; this adds a Continue URL section that keeps that choice open, requires the cart contents to survive the handoff, and points at the checkout page for the format.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
The cart page says businesses SHOULD provide
continue_url, and the schema describes it as "URL for cart handoff and session recovery", but nothing says where the URL should lead or what it has to preserve. The requirements list still carriesTODO: discuss continue_url destination - cart vs checkoutfrom #73, where two readings met: for some implementers the URL is the checkout URL, for others the business decides the intended use (convert to checkout, or keep building the cart).The checkout page answers the same questions for checkout in its Continue URL section (availability, format, server-side state or permalink); the cart page has no equivalent. And the permalink specification already lets a business merge items into an existing cart, create a new cart, or stage a checkout, so the destination question has an answer elsewhere in the spec: the business chooses.
This came up while implementing the cart capability: a cart session is served by the business's UCP endpoint, which does not always share state with the storefront, and a
continue_urlpointing at the storefront's own cart page lands the buyer on an empty basket.What this PR changes
shopping/cart/index.md- adds a## Continue URLsection after Cart-to-Checkout Conversion. Destination: the business chooses (cart page, checkout entry, embedded flow); whatever it picks MUST present the cart's currentline_items, quantities and selected variants included, without the buyer re-adding them; items no longer available follow the permalink redirect resolution rules. Format: absolute HTTPS URL that MUST carry or reference the cart contents, using either approach the checkout page already describes by reference (server-side cart state or a stateless permalink), rather than restating them.Normative addition, scoped to the field: two MUSTs on
continue_url(absolute HTTPS, contents preserved). Both mirror what the checkout page already requires for its owncontinue_url. No schema change.Overlaps with nothing open: #740 (cart terminal status) edits the same requirements list but leaves this bullet as is, and #486 (return after handoff) is checkout-side.
Category (Required)
ucp-schematool (resolver, linter, validator). (Requires Maintainer approval)Related Issues
None.
Checklist
!for breaking changes).