Integrate PDF link with the legacy customer accounts
This guide requires technical skills in editing Shopify theme code. If you are not comfortable with making these changes, please contact our support team for assistance.
What are legacy customer accounts?
Shopify has updated its customer account functionality and now recommends using the New customer accounts. Our app is fully compatible with and also recommends using this new system for the best experience.
This guide is intended for stores that are still using the legacy version. For new customer accounts version, please check this article.
Open the theme code editor
To get started, you need to access your theme editor
Create a new snippet
You will now create a new snippet file snippets/doran-op-link.liquid that contains the logic for displaying the PDF link.
{%- unless template_id == blank or order_id == blank -%}
<a
href="https://{{ shop.permanent_domain }}/apps/op_doran/print/{{ template_id }}/{{ order_id }}"
style="padding: 12px 24px; background-color: #000000; color: white; border: none; border-radius: 5px; font-size: 16px; font-weight: bold; cursor: pointer;"
>
Download Invoice
</a>
{%- endunless -%}Render the snippet
After creating the snippet, you need to include it on the customer order page so the link becomes visible to your customers.
{%- render "doran-op-link", template_id: "[Template ID]", order_id: order.id -%}The code above includes a placeholder variable, [Template ID], which you must replace with your actual Template ID. Please read this article to copy it.
Export daily orders
Learn how to automatically receive daily emails containing PDF documents for your orders. This feature helps you streamline your daily bookkeeping and archival processes by sending invoices and other documents directly to your inbox.
Lifetime Deals
If you see this article, congratulations, you are one of the first 100 lucky people to use our app.