These blocks read Shopify’s
selling_plan_allocation on cart lines, so they work in any theme that renders the cart in Liquid, with or without the Methods app block on the page.Add the blocks to your cart template
1
Open the cart template
On Themes, open your theme’s … > Edit code menu, then open the file that renders cart lines, for example
main-cart-items.liquid.2
Add the recurring total
Paste the total recurring payment block below the cart item loop.
3
Add the plan details
Paste the line item plan details block inside the
{% for item in cart.items %} loop.4
Save and test
Add a membership or subscription product to the cart and confirm the amounts match the plan.
Total recurring payment
Sums the recurring price adjustment of every selling plan line in the cart.Below the cart item loop
Line item plan details
Shows the plan name, first payment, and recurring payment for one cart line.Inside the cart item loop
Considerations
- Placement. The plan details block must sit inside the
{% for item in cart.items %}loop. - Formatting. If prices look 100 times too small or too large, remove the
| divided_by: 100filter. Whether it’s needed depends on how your theme formats prices. - Non-plan products. Lines without a selling plan are skipped.
- Labels. Keep the labels plain, such as “First payment” and “Recurring payment”, so customers and screen readers can tell the charges apart.
Related documentation
Plans setup
Create the membership plans and the plan products customers subscribe to.
Product setup
Turn on the Membership method and set credit costs on products.