What's your biggest current challenge? Have your say in Community Polls along the right column.

Re: How do I add custom fields on Product Pages?

How do I add custom fields on Product Pages?

ryanhoward79
Visitor
1 0 2

So for the past day or so I have been trying to add a custom field where users will have to add additional information in order to checkout. I think I have the code I need to input correct, but I am trying to figure out where in fact to input the code.

I am also on the debut theme as well.

 

 

Replies 11 (11)

Helen
Shopify Staff (Retired)
1425 174 291

Hey, @ryanhoward79. Thanks for reaching out about this!

 

There’s a tutorial here in the Community for adding customization information on product pages. It provides the coding and steps to include various additional customization options on your product page. As well, it goes over how to prevent customers from adding a product to the cart before they have completed the required information.

 

Since this type of customization is unsupported by our Theme department, I recommend reaching out to a Shopify Expert if you need a hand with it. Take a look at the Help Doc for the Experts Marketplace to learn more. 

 

Hope this helps!

To learn more visit the Shopify Help Center or the Community Blog.

kruane
Visitor
1 0 9

Why is this feature not offered and supported by Shopify? It seems many sellers would like the option to provide a custom field for products, and the third party apps charge a monthly fee for this. This is a simple addition to the variants. Is there a reason it's not supported for those of us with no coding experience?

qjames
Shopify Partner
10 0 9

Hi Kruane,

The feature is offered and supported by Shopify - through their cart item properties among other methods. It's up to theme developers whether or not to offer these kinds of features in their themes. If your theme does not support custom fields, it's easy enough to add them to the theme's product form, using something like this: 

<input type="text" name="properties[Enter your desired property name here]"/>

This will be carried through to the orders admin page. 

Hope that helps!

 

 

Genevievesecker
Tourist
3 0 2

Hi Helen,

I have figured out how to add the custom field to my products but for some reason when I do it adds it to EVERY product even if the product them is “default” and not the custom one I had made. How do I add it to only CERTAIN products? Thank you

annemarie2
Visitor
1 0 0

Hi Genevieve,

How do you add a custom field to all products? That's exactly what I want to do but can't figure out. 

Do you happen to know if I can change the name of another field (vendor) to something else, too?

Thank you,

Anne Marie. 

knlcustomdesign
Visitor
1 0 1

Did you end up working this out? I need to add custom field to only certain products too but its adding it to all. Maybe there is a template I can add for this?

RikLaenen
Shopify Partner
2 0 0

hi,

just add:
{% if product.title == "title-of-product" %}
your input code

{% endif %}

R Laenen
ccconsign
Visitor
1 0 0

What fields did you add that too?

Rikkert
Visitor
2 0 0

To the mainproduct.liquid page or an other name. it has to be the main product codepage

 

Rik Laenen

michael-helium
Shopify Partner
378 5 185

Hey @ryanhoward79,

Where are you adding custom fields? Product page? Cart page?

Depending on your use case, it may be simpler (for you and you customers) to collect that additional information during registration and require customer accounts.

Michael, COO @ Helium
- Customer Fields ✪✪✪✪✪ (357 reviews)
- Meteor Mega Menu ✪✪✪✪✪ (281 reviews)
- Strike Automatic Discounts NEW!

KabirDev
Shopify Partner
248 61 74

I made a video tutorial how to add custom fields in the product pages without needing any apps. You might find it helpful https://www.youtube.com/watch?v=EK7USO8FJ4s

- Control payment methods visibility at checkout by KlinKode PayRules app.
- Contact me directly at shahriar@kabirdev.com