Show Subscription Frequency On Cart Page

Warning: This feature will require advanced HTML and Shopify liquid knowledge.

This guide will assist you in showing the subscription frequency below the each product title on the cart page. Here is an example of a regular cart page before we make the change:

Go to Shopify Dashboard > Online Store > Themes > Edit HTML/CSS to view the files.

Open the template called the cart.liquid and search the part of the code that runs the properties of each product in the cart. Look like this:

Between the {% endunless %} and {% endfor %} (lines 72 & 73) you have to add the following piece of code.

{% assign recurringchecked = "false" %} 
{% for p in item.properties  %}   
{% if p.first == 'shipping_interval_frequency' %}
	{% assign frequency = p.last %}
	{% assign recurringchecked = "true" %} 
{% endif %}
{% if p.first == 'shipping_interval_unit_type' %}
	{% if frequency == '1'%}
		{% if p.last == 'Days' %}
			{% assign frequency_unit = 'Day' %}
		{% elsif p.last == 'Months'%}
			{% assign frequency_unit = 'Month' %}
		{% elsif p.last == 'Weeks'%}
			{% assign frequency_unit = 'Week' %}
		{% endif %}
	{% else %}
		{% assign frequency_unit = p.last %}
	{% endif %}
{% endif %}
{% endfor %}

Then you have to add above the last {% endif %} (line 75) to show the text:

{% if recurringchecked == "true" %}
<span> Recurring Delivery every {{frequency}} {{frequency_unit}}. Change or cancel anytime </span><br>
{% endif %}

Here is the final result reflected on the cart page:

If you encounter any issue getting this to function as described, contact us for assistance. 

Still stuck? How can we help? Still stuck? How can we help?