How to add line item properties to cart in Narrative theme?

Topic summary

Problem: custom personalization fields on product pages aren’t appearing in cart/checkout/order (Narrative theme).

Key guidance and fixes:

  • Use Shopify line item properties with inputs named as name=“properties[Your Property Name]” so values pass to cart/checkout.
  • Ensure inputs are inside the product form (…). In Narrative, the form is often included via a snippet (e.g., {% include ‘product-form’ %}); placing fields outside the form prevents submission.
  • A contributor tested moving the input into the form on the store and confirmed it then worked.
  • Correct resource shared: Shopify UI Elements Generator for line item properties (previous cart attribute code was incorrect for this use case).

Ongoing issues/updates:

  • Some users struggled to locate the actual form because it lives in a snippet rather than directly in product.liquid.
  • A later participant reported line item properties returning null despite placing fields within the form and shared product/cart code; no confirmed fix yet.
  • Another user on the Unsen theme noted HTML required validation isn’t enforced (fields can be empty) and asked how to link Add to Cart to validation; no resolution provided.

Notes: Code placement and snippet structure are central to understanding and resolving the issue.

Summarized with AI on January 4. AI used: gpt-5.

The following code in your product template isn’t inside your form, take the following.


  
  

and paste inside the form tags, after the following.


If it's not between <form> </form> it won't be submitted to the cart. I've just tested this on your store and it has worked.

the Liquid you have to change is on your product page where you previously posted the line item field