Shopify themes, liquid, logos, and UX
Hi,
I was trying to follow youtube videos on how to add a custom field for name. I sell personalized products. Can you assist me with how to code this? I am a newbie to coding.
thank you
Solved! Go to the solution
This is an accepted solution.
The text input is now added only for products tagged with customized_fields_enabled
The final code to add was:
{% if product.tags contains "customized_fields_enabled" %}
<p class="line-item-property__field">
<label class="single-option-radio__label" for="enter-your-name">Enter Your Name:</label>
<input id="enter-your-name" type="text" name="properties[Enter Your Name]">
</p>
{%endif%}
Please don't forget to like our replies and mark the post as a solution if we've assisted you on that front 😉
Cheers!
You should add the following code to your product-template.liquid right after the {% form %} opening:
<p class="line-item-property__field">
<label for="enter-your-name">Enter Your Name:</label>
<input id="enter-your-name" type="text" name="properties[Enter Your Name]">
</p>
Let me know if you'd like some help to get that done!
No charge, it's a simple fix 🙂
Do share your store's URL so we can request collaborator access and get this done for you.
Cheers!
My website is www.cafe-juan.com.
Can we add short text field with Free Name Here. Only for custom products as not all products are customed.
Thank you so much for the help
How do you identify customized products? Are they tagged somehow?
Hi, no tags yet. I have 2 custom items under Mugs. If you can make one please then I can tag once youbhave done it. Just please send me step by step. Thank you so much!
Ok please tag each product with customized_fields_enabled
Let me know once done, I've sent a collaborator access for that.
Cheers!
Hi,
Not sure where is the tag is. Is this correct? Thank you!
Perfect, that's all there is to do, you should have received a collab access so I can add the piece of code here.
This is an accepted solution.
The text input is now added only for products tagged with customized_fields_enabled
The final code to add was:
{% if product.tags contains "customized_fields_enabled" %}
<p class="line-item-property__field">
<label class="single-option-radio__label" for="enter-your-name">Enter Your Name:</label>
<input id="enter-your-name" type="text" name="properties[Enter Your Name]">
</p>
{%endif%}
Please don't forget to like our replies and mark the post as a solution if we've assisted you on that front 😉
Cheers!
Thank you so much! 😃
A big big help.
Cheers!
Hi, how can I make it required and only for 10 characters? Thank you
thank you, this is helpful.
How do you do this so that it's only enabled for certain products? (as in, only some products require this field)?
I'm using Dawn and I think the usual way of doing this has changed with Shopify 2.0?
@littlebundles wrote:How do you do this so that it's only enabled for certain products? (as in, only some products require this field)?
I'm using Dawn and I think the usual way of doing this has changed with Shopify 2.0?
Use alternate templates https://shopify.dev/themes/architecture/templates#alternate-templates
Or modify the logic to either check for a product handle, a certain tag, or a collection etc. The key factor is you have to better define what makes something part of "some products".
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
darn, I don't have a product-template.liquid file 😞 or a product.liquid. Do these maybe not come in the Taste theme 2022?
Hey. That's great. But it only half solves my problem. Is it still possible to apply a price for personalized products? Ex. If someone takes a personalized shirt it costs xy € more?
Hi there,
I'm not seeing the text that has been entered into the custom text fields I added to my page so I can't see what customers have written. Can you help me look into this please?
I cant see what customer have written, too.. did you know why?
@Serdar1 that solution allows free add-ons, it doesn't link to any additional payment.
You could add a variant called "with Customization (+10EUR)" and have the default one be "without Customization)", when the "with Customization (+10EUR)" is clicked, the code displays the input field, then you can capture payment and customization together.
I am trying to get custom text options for my customers so they can personalize dog tags. I have followed the steps I have found but am not having any luck. Can someone please help?
Hi @JVie
Would you mind sharing your store's address (privately if you'd like) so we can assist on that?
Do you know how to customize this fields on product page?
is it an shopify app? or code?
Thanks! 🙂
Hi,
For future readers, you can enclosed the custom field with what ever control flow you have. You can get the custom field from our enhanced Shopify UI element generator tool. This is free and no apps needed. It works well with Shopify 2.0 free themes.
Check the video tutorial below
We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024A big shout out to all of the merchants who participated in our AMA with 2H Media: Holi...
By Jacqui Oct 21, 2024We want to take a moment to celebrate the incredible ways you all engage with the Shopi...
By JasonH Oct 15, 2024