Showing tax IDs on invoices from Shopify
If you sell to businesses (B2B), you'll likely need to collect your customers' tax ID during checkout. Shopify doesn't include a dedicated field for this on the checkout page, but there are two ways to capture it so Quaderno can include it automatically on your invoices.
If you use Shopify Plus, see the alternative solution for Shopify Plus.
This method doesn't currently work with Shopify's new one-page checkout.
Option 1: Collect tax IDs on the customer registration page
This option adds a tax ID field to the account creation form. It's ideal for stores where most customers register before purchasing.
To add the tax ID field to the customer registration page, follow these steps:
- In your Shopify admin, go to
Online Store>Themes>...>Edit code. - Open the file
customers/register.liquid(in older themes it may be calledmain-register.liquid). - Locate the
<form>tag inside the file. - Insert the following code snippet just before the submit button:
<div class="field">
<label for="tax_id">Tax ID</label>
<input id="tax_id" type="text" name="customer[note][tax_id]" />
</div>
The tax ID field will now appear on your customer registration form.
Option 2: Collect tax IDs on the cart page
This option adds the tax ID field to the cart page, just before the customer proceeds to checkout. It's ideal for stores with a high volume of guest purchases, as it captures the information without requiring an account.
To add the tax ID field to the cart page, follow these steps:
- In your Shopify admin, go to
Online Store>Themes>...>Edit code. - Open the file that manages your cart. The most common names are
main-cart.liquid,cart-template.liquid, orsections/cart-template.liquid. - Locate the
<form>tag inside the file. - Insert the following code snippet inside the form, just before the checkout button:
<div class="field">
<label for="tax_id">Tax ID</label>
<input type="text" id="tax_id" name="attributes[tax_id]" value="{{ cart.attributes['tax_id'] }}">
</div>
The tax ID field will now appear on your cart page and Quaderno will read it when generating the invoice.