Showing tax IDs on invoices from Shopify
To collect and validate tax IDs on your Shopify’s checkout form, you need a Shopify Plus plan.
Otherwise, you can collect tax IDs from the customer registration or the cart pages, so that Quaderno can display these later on your invoices.
Collecting tax IDs on the customer registration page
You can add a new tax ID field to the customer registration form. This will allow your customers to enter their VAT registration numbers when they set up their customer accounts in your store.
This new field should be added to the customer registration file in your theme. Please note, the snippet would only work on customers/register.liquid. Tax IDs will be stored as part of customer notes and Quaderno will automatically include them on your invoices.
To add the VAT number field to the customer registration page:
- In your Shopify admin, go to Online Store > Themes.
- Click the … button, then click Edit HTML/CSS.
- Select customers/register.liquid in the left sidebar.
- Insert the following code snippet inside the < form > .
<!-- Shopify Customer Registration -- Capture VAT numbers from customers. Used by quaderno.io. -->
<label for="vat_number">VAT Number</label>
<input id="vat_number" type="text" name="customer[note][vat_number]" />
And this is the result. We’ll show the customer’s VAT number on all their purchases:
Collecting tax IDs on the cart page
The field to capture tax IDs can be also placed on the cart page so customers can enter their numbers just before the checkout.
In order to do so, you need to add the following code snippet to the cart file in your theme. Tax IDs will be stored as cart attributes and Quaderno will automatically include them on your invoices.
To add the Tax ID field to the cart page:
- In your Shopify admin, go to Online Store > Themes.
- Click the … button, then click Edit HTML/CSS.
- Select cart-template.liquid in the left sidebar.
- Insert the following code snippet inside the < form >.
<!-- Shopify Shopping Cart -- Capture Tax IDs from customers. Used by quaderno.io -->
<label for="vat_number">VAT Number</label>
<input type="text" id="vat_number" name="attributes[vat_number]" value="{{ cart.attributes['vat_number'] }}">
This is the result. We’ll now collect the customer’s Tax ID from the cart page: