How can I let customers personalize shirt text in three fields on Shopify?

Topic summary

Allowing buyers to enter three custom text fields (City, State, Year) on a Shopify product and have them appear in cart/checkout.

  • Suggested approach: use line item properties (custom inputs tied to a cart line item). Add three text inputs to the product template inside the product form, positioned before the Add to Cart button. These only apply on the product page.

  • Implementation issues: after adding code to product-template.liquid, the fields didn’t appear at checkout. The pasted snippet showed the inputs likely placed inside the element instead of before it, which could prevent proper rendering/submission.

  • Troubleshooting: guidance was limited without direct access. A later check claimed it worked on the live site, but behavior remained unclear to the requester.

  • Outcome: the requester ultimately installed an app to handle the custom text fields rather than pursuing a theme-code solution.

Status: effectively resolved via an app; no confirmed native-code fix was finalized. Open point: exact correct placement for the specific theme’s product form remains unverified.

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

Instead of having a dropdown option, I want to allow customers to be able to type in their choice of words. For instance, they can type in a city name. I also want to have 3 separate fields that will allow them to type in, so it’ll go something like:

City ______________

State _____________

Year _____________

The underlined area is the field where the customer will type in their desired wording.

How can I achieve this in Shopify?

@Champagne03

you can do this by using line item properties so that these values will be shown on cart and checkout with the product.


place above code into your theme files, main-product product template

do let me know if you need any further help.

thanks

I tried adding it to Product-Template.liquid under the Sections folder, but I didn’t see the fields reflected in the checkout area. Did I choose the wrong one?

@Champagne03

you need to put that in your product template inside tag where the add to cart button is available.

thanks

I found the reference to add to cart, but I’m not sure exactly “where” to put it:

{{ 'products.product.add_to_cart' | t }} {% if section.settings.enable_payment_button %} {{ form | payment_button }} {% endif %} {% endform %}

@Champagne03

yes you need to place it before the .

thanks

Unfortunately, that didn’t work. To confirm, I only need to put it in the product-template.liquid? No where else?

Here is what the code currently looks like with the new code added before button

{{ 'products.product.add_to_cart' | t }}

City

State

Year

{% if section.settings.enable_payment_button %} {{ form | payment_button }} {% endif %} {% endform %}

@Champagne03

this will be work only on product page not anywhere else.

OK - the only place I have it is on product-template.liquid (which I assume is the product page you’re referring to)

If the code is correct as I pasted above, can you think of anything I may be doing wrong?

@Champagne03 i cannot give any solution without looking into it.

What additional information would you need? My website is: https://getnaughtee.com/

and the page I’m testing the code on is: https://getnaughtee.com/products/sun-moon-rising-t-shirt-unisex?variant=40507910520895

@Champagne03

i guess its working fine.? i have tested your website

I decided to just download an app that does it for me. A couple others left comments on how to do it with code, but nothing quite worked. The app seemed like the best solution.

all right thanks