Display subscription frequency on the cart page

You may want to display the subscription frequency below each product on the cart page.

This guide explains how you can display the subscription frequency on the cart page using the cart.liquid.file in your Shopify theme.

πŸ“˜

Platform

  • Shopify Checkout Integration

Updating the Shopify Theme files

🚧

Note:

If you do not have access to the selling_plan_allocation attribute of the line_item object, contact the support team for your specific theme.

To display subscription frequency on the cart page:

  1. Click Online Store in the Shopify Admin and select Themes.
  2. Locate the theme and click Actions and select Edit code.
  3. Open the cart.liquid file.
  4. Locate the selling_plan_allocation attribute of the line_item object.
  5. Paste the following block of code under the selling_plan_allocation:
<p class="selling-plan">{{ line_item.selling_plan_allocation.selling_plan.name }}</p>

Example

{% if line_item.selling_plan_allocation %}
  <p class="selling-plan">{{ line_item.selling_plan_allocation.selling_plan.name }}</p>
{% endif %}

Need Help? Contact Us