Welcome to Eight Docs

How can I display the subscription plan interval within the cart?

You can choose to display the subscription plan interval (e.g. Per week, save 20%. Maximum of 6 months), by injecting a line of code into your theme files.

 

Note: If you are not comfortable altering code files, please contact our helpful support team for assistance.

 

When the snippet is present within the cart-template file, the subscription plan interval appears as a line item within the cart:

 

Screenshot+2021-06-03+at+09.53.24.png

 

 
Note: The following steps are general guidance - the exact code varies depending on which theme you are using.

Step 1: Locate the Cart Items Within Your Code Files

 

1. Within your cart-template file, searching the following snippet and make a note of its line:

{% for item in cart.items %}
 
2. Next, search for the following snippet and make a note of its line.
{{ item.product.title }}
 

Step 2: Locate the Cart Items Within Your Code Files

 

Between the two lines that you have located, paste the following snippet into your theme's code:

 

line_item.selling_plan_allocation.selling_plan.name

 

Example (using the theme Flow):

Screenshot+2021-06-03+at+14.36.35__1_.png

 

 

Was this article helpful?