Shopify Builds>Primitives>Cart permalinks

Cart permalinks

Definition

A cart permalink is a URL that changes the cart and then sends the shopper somewhere. One shape builds a cart from variant and quantity pairs in the address, another empties it, and either can chain onward to checkout. No JavaScript is involved, which makes it the plainest way to put a whole purchase decision inside a link.

Documented at shopify.dev, the cart object.

How We've Used It

We reach for permalinks when the buying decision belongs to a link rather than a form. A campaign module that has to guarantee a clean cart at checkout chains a clear, an add and a jump to checkout in one click, with no app and no Function involved and nothing left over from an earlier visit. The same chain is the no-JavaScript fallback behind a hero button that would otherwise add with a fetch. The trade is bluntness: a permalink rewrites the cart without asking, so it belongs on a single-item, single-intent path and nowhere near a normal product page.

Builds Using It

One gated build uses it; its page follows.

Related Entities