Providing downloadable products
From Spiffy Stores Knowledge Base
Revision as of 15:12, 23 July 2024 by Admin (talk | contribs) (→Step 2 - Update your Order Confirmation email template)
You are able to modify your templates to support downloadable products or digital products. There are a few steps to setting up this process, which are detailed below.
If the process is a little difficult for you, we are able to update your templates for you for a one-off fee of $70 AUD. To request this, please email us providing us with the following information;
- Your store name
- Let us know the type of downloadable products you are planning to sell
- Ensure your email states that you approve the $70.00 charge
Contents
Part 1 - Setting up your templates for downloadable products
Before you can set up your products, you need to make sure that your customers can download them. Follow the instructions below to modify your templates to allow downloads.
Step 1 - Edit your customer template to provide a download link
If your store's theme includes customer templates, you can add in the ability for customers to download the product after they have logged in.
To do so, follow the steps below:
- Go to the Design & Assets -> Theme editor section of your store's Toolbox.
- Scroll down to the Additional Theme Templates - Customers section, and click on the Order.liquid template to edit it.
- Scroll down to where you see the line
{{ line_item.title | link_to: line_item.product.url, 'View Product', target: '_blank' }}
- Paste the following code immediately after, and click save
{% if line_item.sku contains "-download" and order.financial_status == "paid" %}{% capture download_file %}{{ shop.url }}/files/{{ line_item.product.id }}-{{ line_item.sku | downcase }}.zip{% endcapture %}<br><a href="{{ download_file }}" target="_blank" class="button">Download</a>{% endif %}
If you are using the Simple Theme, use the following instructions:
- Go to the Design & Assets -> Theme editor section of your store's Toolbox.
- Scroll down to the Additional Theme Templates - Customers section, and click on the Order.liquid template to edit it.
- Scroll down to where you see the line
<a href="{{ line_item.url }}" target="_blank">{{ item_title[0] | remove: '<span>' | remove: '<br>' | remove: '</span>' }}</a>
- Paste the following code immediately after, and click save
{% if line_item.sku contains "-download" and order.financial_status == "paid" %}{% capture download_file %}{{ shop.url }}/files/{{ line_item.product.id }}-{{ line_item.sku | downcase }}.zip{% endcapture %}<br><a href="{{ download_file }}" target="_blank" class="button">Download</a>{% endif %}
Step 2 - Update your Order Confirmation email template
You may need to update your Order Confirmation email template, if you also want to provide a link in their confirmation email when they have ordered.
You only need to do this if you are using a customized email template.
- Go to the Design & Assets -> Email templates section of your store's Toolbox.
- Click on your Order Confirmation email template.
- Click Reload Template Defaults. This will load in a clean default version of your template.
- Tick the Custom Templates are Enabled box
- Reapply any customizations that you had previously made to the template and click Save
Part 2 - Creating your downloadable products
Now that your templates are set up, you can now continue with the relatively easy process of creating your downloadable products. Follow the instructions below for each downloadable product.
Step 1 - Create your product page
When you have created your product, make a note of it's Product ID, as you will need to name your file using this.
Finding out your Product ID
Your product ID is an internal number than cannot be seen in your storefront by your customers.
Once you have saved your product, your product ID can be seen when editing the product in the URL of your product. It is the last part of the URL of the page. In the example below, the product ID is 12052.
https://yourstore.spiffystores.com/admin/products/12052
Give your product variation a unique SKU
On the product edit page, ensure that the product variation has a unique SKU. For the purposes of this tutorial, the SKU we have set is sbw246-download. The last part of the SKU should always be "-download" so that we can provide a link to download the file in the order confirmation email or customer template.
Step 2 - Create a zip file for your customer to download
On your computer, create a zip file for you customer to download. In this tutorial, it should be named 12052-sbw246-download.zip
{{ product.id }}-{{ variant.sku }}.zip
Once you have done this, go to the Design & Assets -> Uploaded files section of your store's Toolbox and upload your zip file. Once you have uploaded your zip file, you should make sure the file name is correct by clicking on it. Note: regardless of whether your SKU is uppercase, your file name should be all in lowercase.