Selling digital products in Posterly

You can setup your store to support digital downloadable products with Posterly

The following lines of code can be used to show customers a download button for downloadable products. Simply copy the code below into the Additional scripts field in Settings → Checkout → Additional scripts in Shopify admin:

{% for line_item in line_items %}
	{% if  line_item.properties['id'] %}
		{% if line_item.variant.title contains 'Digital Download' %}
			<a href="https://cdn.posterlyapp.io/images/{{ line_item.properties['id'] | replace: "#", "" }}.jpg" class="btn" style="margin-top: 30px;" target="_blank" download>
				<span class="btn__content">Download Your Product</span>
			</a>
		{% endif %}
	{% endif %}
{% endfor %}

Simply replace the Digital Download text with the title of the custom product type you want to be downloadable. You can also change the Download Your Product text to fit your stores language.

The code above will display the button below on your shops thank you page, for each downloadable product.


Didn't find an answer?

Contact Us
Getting Started
Product Features
Custom Input Fields
Design Elements
Customization