Adding cart attributes to notification emails.

Topic summary

A user is struggling to display cart attributes in Shopify notification emails, specifically trying to access an attribute named ‘numéro_de_commande_interne’ (internal order number).

Attempted syntax variations:

  • attributes.numéro_de_commande_interne (based on Shopify documentation)
  • attributes['numéro_de_commande_interne']
  • order.attributes['numéro_de_commande_interne']
  • cart.attributes['numéro_de_commande_interne']

The user included code snippets showing their email template implementation using Liquid syntax with conditional statements to check if the attribute exists before displaying it.

Current status: The issue remains unresolved with no responses yet. The user is seeking help to identify the correct syntax for accessing cart attributes in notification email templates.

Summarized with AI on November 24. AI used: claude-sonnet-4-5-20250929.

I’m having a hard time adding cart attributes to my notification emails.


  
    

In my emails Ive tried combinations of

‘attributes.numéro_de_commande_interne’ (as my understanding this is the correct way described by the shopify documentation.

‘attributes[‘numéro_de_commande_interne’]’

‘order.attributes[‘numéro_de_commande_interne’]’

‘cart.attributes[‘numéro_de_commande_interne’]’

Here is the email side:

{% if cart.attributes['numéro_de_commande_interne'] %}
            
             #### Internal Order Number
        {{ cart.attributes['numéro_de_commande_interne'] }}
            
           {% endif %}

If anyone can help that would be greatly appreciated.

1 Like