Skip to main content
When using membership or subscription plans, you can show more detail in the cart, including each product’s plan name, first payment, recurring payment, and the total recurring amount for all items. This helps customers understand what they’ll be charged now and on a recurring basis.

Add Liquid to your cart template

Add the following Liquid blocks to your cart template or snippet (for example, main-cart-items.liquid) to show recurring payment information.
1

Open your cart template

In your Shopify theme editor, open the file where your cart line items are rendered.
2

Add the total recurring payment block

Paste the first block below the cart items to show the total monthly recurring payment.
3

Add the plan details block

Paste the second block inside your cart item loop to show details for each plan.
4

Save and test

Add a membership or subscription product to your cart and confirm the correct payment amounts display.

Total recurring payment

Add this block below your cart item loop to calculate and display the total recurring payment for all items in the cart.
{%- assign total_recurring_payment = 0 -%}
{%- for item in cart.items -%}
  {%- if item.selling_plan_allocation and item.selling_plan_allocation.selling_plan -%}
    {%- assign adjustments = item.selling_plan_allocation.selling_plan.price_adjustments -%}
    {%- for adjustment in adjustments -%}
      {%- if adjustment.order_count == null -%}
        {%- assign recurring_payment = adjustment.value | divided_by: 100 -%}
        {%- assign total_recurring_payment = total_recurring_payment | plus: recurring_payment -%}
      {%- endif -%}
    {%- endfor -%}
  {%- endif -%}
{%- endfor -%}

<p>Monthly recurring payment: {{ total_recurring_payment | money }}</p>

Line item plan details

Add this block inside your cart item loop to show each product’s plan name, first payment, and recurring payment.
{%- if item.selling_plan_allocation and item.selling_plan_allocation.selling_plan -%}
  <div class="cart__item--details">
    <p>Plan: {{ item.selling_plan_allocation.selling_plan.name }}</p>

    {%- assign adjustments = item.selling_plan_allocation.selling_plan.price_adjustments -%}
    {%- for adjustment in adjustments -%}
      {%- if adjustment.order_count == 1 -%}
        <p>First payment: {{ adjustment.value | divided_by: 100 | money }}</p>
      {%- elsif adjustment.order_count == null -%}
        <p>Recurring payment: {{ adjustment.value | divided_by: 100 | money }}</p>
      {%- endif -%}
    {%- endfor -%}
  </div>
{%- endif -%}

Notes

  • Placement: The plan details block must sit inside the {% for item in cart.items %} loop.
  • Formatting: If your prices appear incorrect, remove the | divided_by: 100 filter — this depends on how your theme handles price formatting.
  • Non-plan products: Items without selling plans are automatically skipped.
  • Accessibility: Use clear labels like “First payment” and “Recurring payment” so customers and screen readers can easily understand the charges.
I