How to Extract "Codice Fiscale" and "PEC" Fields for Italian Buyers in Liquid

How to Extract "Codice Fiscale" and "PEC" Fields for Italian Buyers in Liquid

CesareTeruzzi
Visitor
2 0 0

I need to display two fields, Codice Fiscale and PEC, which are included as Additional Information on the Order page (and are required during the checkout process), within the template used by the "Order Print" app.

 

I’ve tried searching for them under order.attributes and within the order.customer object without success! Has anyone managed to extract/show these two data fields in any way?

 

In the order page the 2 fields are showed as "Additional Information"

And requested inside checkout (at bottom)

2025-02-16 12_10_31-Checkout - Surfingsea.png2025-02-16 12_10_55-Surfingsea · Orders · #1026 · Shopify.png

Replies 2 (2)

pawankumar
Shopify Partner
700 102 123

Hi @CesareTeruzzi 
Try attributes directly instead of order.attributes
Please like and accept the solution if it work for you

Thanks!

- Need a Shopify developer? Chat on WhatsApp +91-9467121281
- Coffee Tip: Buymeacoffee  | Email: thepkpawankumar@gmail.com
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
Best regards,
Pawan
CesareTeruzzi
Visitor
2 0 0

Hi @pawankumar and thanks for the prompt response!

Unfortunately, I still haven't been able to extract these two pieces of data to display them in the order printout—it's absurd... I don't understand these restrictions/limitations imposed by Shopify on the Basic plan when these are fundamental e-commerce features, like registration/login/cart/checkout modules. 🤯

 

I had considered solving the problem by requesting Shopify to remove these two fields (how I can request this change? I've read that other italians have requested the same with success) and creating two custom fields (metafields) to be used during user registration (making it mandatory to purchase—although this option discourages many guests from buying) in case the selected country is 'Italy'... and then using these fields by retrieving them in the order printout.


I really don't like this possible solution... If anyone has managed to solve it in a simpler way, please share your solution, thanks!