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:
- Click Online Store in the Shopify Admin and select Themes.
- Locate the theme and click Actions and select Edit code.
- Open the
cart.liquid
file. - Locate the
selling_plan_allocation
attribute of the line_item object. - 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 %}
Updated about 23 hours ago