Include links to invoices on customer account page

Customer account page in your Shopify store displays a summary of a visitor's customer account. 

This page includes a list of recent orders made by a customer. You can add a link to invoice for each order listed on this page.

The link will redirect a customer to an online version of their invoice where they can download or print it. This page also allows a customer to pay their unpaid invoices with their credit card.

To add invoice links to the customer account page:

  1. Go to the page Online Store → Themes in your Shopify admin.
  2. Click the Actions button, then click Edit code.
  3. Select customers/account.liquid in the left sidebar. 
  4. Insert the following code snippet inside the table body listing order details.

<!-- Link to print or download invoice for order on the Customer Account page. Used by Sufio for Shopify (http://www.sufio.com/shopify). -->
<td>
  <span class="invoice">
    <a target="_blank" href="{{ shop.url }}/apps/sufio/invoice/?id={{ order.id }}&number={{ order.order_number }}">Invoice</a>
  </span>
</td>

You can also use the same code snippet to add an invoice link to the order details page (customer/order.liquid template file).

If you want the link to let your customer directly download a PDF version of their invoice, use the following code snippet:

<!-- Link to download a PDF invoice for order on the Customer Account page. Used by Sufio for Shopify (http://www.sufio.com/shopify). -->
<td>
  <span class="invoice">
    <a target="_blank" href="{{ shop.url }}/apps/sufio/invoice/download/?id={{ order.id }}&number={{ order.order_number }}">Invoice</a>
  </span>
</td>

Please note that the PDF version does not allow the customer to pay their invoice online through a Pay Invoice button.