Include your customers' Codice Fiscale

If your online store sells to consumers in Italy, it is essential that you include your customers' Codice Fiscale on all the invoices that you create.

If your online store sells to consumers in Italy, you must include your customers' Codice Fiscale on all invoices that you create.

Codice Fiscale is used in Italy to identify consumers in much the same way as a Social Security number in the US or a National Insurance number in the UK.

Sufio allows you to capture your customers' Codice Fiscale and automatically include them on your invoices.

Since Shopify does not allow you to add additional fields to the checkout form, you can capture your customers' Codice Fiscale on different pages in your online store.

Customer registration page

You can add a new Codice Fiscale field to the customer registration form on your Shopify store. This will allow your customers to enter their Codice Fiscale when setting up their customer accounts in your online store.

Codice Fiscale will be stored as part of customer notes, and Sufio will automatically include them on your invoices.

To add the Codice Fiscale input field to the customer registration form:

  1. In your Shopify admin, go to the Online Store → Themes page.
  2. Click the Actions button, then click Edit code.
  3. Select customers/register.liquid in the left sidebar. You can also use the upper search bar for a faster search.
  4. Insert the following code snippet inside the <form>. A good place for the code is just before the Email field.
<!-- Capture Codice Fiscale on the Customer Registration page. Used by Sufio (sufio.com/shopify). -->
<label for="company_no">Codice Fiscale</label>
<input id="company_no" type="text" name="customer[note][Codice Fiscale]" placeholder="Codice Fiscale" />

Cart page

Alternatively, you can capture the Codice Fiscale on the cart page. Your customers will then be able to enter it just before the checkout process.

Codice Fiscale will be stored as a cart attribute, and Sufio will automatically include it on your invoices.

To add the Codice Fiscale input field to the cart page:

  1. In your Shopify admin, go to the Online Store → Themes page.
  2. Click the Actions button, then click Edit code.
  3. Select cart.liquid (or cart-template.liquid) in the left sidebar. You can also use the upper search bar for a faster search.
  4. Insert the code snippet inside the <form>. A good place for the code is just before the Check out button.
<!-- Capture Codice Fiscale on the Cart page. Used by Sufio (sufio.com/shopify). -->

<div class="company-number">
  <label for="company_no">Codice Fiscale</label>
  <input type="text" id="company_no" name="attributes[Company Number]" value="{{ cart.attributes['Company Number'] }}">
</div>

Note

If your store uses cart drawer (also called ajax cart), this code snippet needs to be added to a different file than cart.liquid. In most cases, it needs to be added to ajax-cart-template.liquid file.

Need help?

Do you need help with customizing your Shopify store theme? Please contact our experienced support team. We'll be happy to assist!