The Subscription upgrade block is a sub-block that nests inside Cart items. It prompts shoppers to switch an eligible one-time line item to a subscription right from the cart, turning a one-time purchase into recurring revenue at the point of decision, and lets shoppers who are already subscribed change or cancel their plan on that line.
Behavior
- Only appears on eligible lines. The block reads the product’s selling plans and renders nothing on a line whose product has no subscription plans.
- Never offered on reward gifts. Subscribing to an auto-granted free gift would strip its reward status, so the prompt is suppressed on those lines.
- On a one-time line, it shows the upgrade call-to-action.
- On an already-subscribed line, it shows a plan selector plus the “downgrade to one-time” option.
Settings
Placement and limits
- Parent: nests inside Cart items only.
- Maximum: 1 per cart.
- Not added by default. Not locked, so you can remove or hide it.
Custom template
Supports a custom template from its Code tab, which replaces this block’s built-in markup with your JSX. These are the props it receives. This block renders one of two states, andview.state tells you which. view is never null inside a custom template: when a line has no plans, the block renders nothing and your template isn’t called.
Each entry in
view.plans is { id: number, name: string, discountPercent: number }.
Use
onChange for a <select> and selectPlan for buttons. onChange already handles the oneTimeValue sentinel; if you wire your own handler to a <select>, you have to compare against oneTimeValue and call selectPlan(null) yourself.