Hello @CreativeMind202 ,
I’m sorry for that. Here is another solution you can try to follow to display a PDF file as a download link on the customer order frontend page:
- Go to Online Store → Themes → Actions → Edit code
- Go to Templates → order.liquid
- Search for the section where the customer order details are displayed, typically within a {% for line_item in order.line_items %} loop. It might look something like this:
{% for line_item in order.line_items %}
{% endfor %}
- Add the following code to create the download link for the PDF file:
{% if line_item.properties.pdf_file %}
Download PDF
{% endif %}
- Save changes
Hope this can work. Let us know if you can make it or not.
Ali Reviews team.