Shopify themes, liquid, logos, and UX
Hi,
I am using the following code to display a link to download a zip file added to a meta field
{% comment %}Custom Code to Show Custom File Uploaded to the customer order{% endcomment %} <td> {% if order.metafields.custom.order_mockup_file %} <a href="{{ order.metafields.custom.order_mockup_file.file}}" download>Download Customized File</a><br> {% endif %}</td> {% comment %}END of Custom Code to Show Custom File Uploaded to the customer order{% endcomment %}
but it keeps giving me the HTML file, not the zip file?
@CreativeMind202 it's been a while since this question was posted but for anyone else looking, I think the right code would be:
{% comment %}Custom Code to Show Custom File Uploaded to the customer order{% endcomment %}
<td>{% if order.metafields.custom.order_mockup_file != blank %}
<a href="{{ order.metafields.custom.order_mockup_file | file_url }}" download>Download Customized File</a><br>
{% endif %}</td>
{% comment %}END of Custom Code to Show Custom File Uploaded to the customer order{% endcomment %}
User | RANK |
---|---|
220 | |
164 | |
65 | |
54 | |
53 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023