Solved

Custom Field in Product Description custom theme

shineveracruz
Tourist
7 0 1

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 youpersonalise in shopify.png

 

 

Accepted Solution (1)
JHKCreate
Shopify Expert
3571 639 919

This is an accepted solution.

Hi @shineveracruz 

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!

Did we solve your issue? Like & Mark As Solution to help the community
Should you need any direct help: contact@jhkcreate.com

Learn more about us: jhkcreate.com

View solution in original post

Replies 24 (24)

JHKCreate
Shopify Expert
3571 639 919

Hi @shineveracruz 

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!

Did we solve your issue? Like & Mark As Solution to help the community
Should you need any direct help: contact@jhkcreate.com

Learn more about us: jhkcreate.com
shineveracruz
Tourist
7 0 1
Hi,

Thank you so much.

I am completely a stranger to coding and afraid I might mess up the whole
website. How much will you charge??

Thanks
JHKCreate
Shopify Expert
3571 639 919

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!

Did we solve your issue? Like & Mark As Solution to help the community
Should you need any direct help: contact@jhkcreate.com

Learn more about us: jhkcreate.com
shineveracruz
Tourist
7 0 1

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

JHKCreate
Shopify Expert
3571 639 919

Hi @shineveracruz 

How do you identify customized products? Are they tagged somehow?

Did we solve your issue? Like & Mark As Solution to help the community
Should you need any direct help: contact@jhkcreate.com

Learn more about us: jhkcreate.com
shineveracruz
Tourist
7 0 1
Click to expand...
 

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!

JHKCreate
Shopify Expert
3571 639 919

Ok please tag each product with customized_fields_enabled

Let me know once done, I've sent a collaborator access for that.

Cheers!

Did we solve your issue? Like & Mark As Solution to help the community
Should you need any direct help: contact@jhkcreate.com

Learn more about us: jhkcreate.com
shineveracruz
Tourist
7 0 1

Hi,

 

Not sure where is the tag is. Is this correct? Thank you!

shineveracruz_0-1618926860046.png

 

JHKCreate
Shopify Expert
3571 639 919

Perfect, that's all there is to do, you should have received a collab access so I can add the piece of code here. 

Did we solve your issue? Like & Mark As Solution to help the community
Should you need any direct help: contact@jhkcreate.com

Learn more about us: jhkcreate.com
JHKCreate
Shopify Expert
3571 639 919

This is an accepted solution.

Hi @shineveracruz 

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!

Did we solve your issue? Like & Mark As Solution to help the community
Should you need any direct help: contact@jhkcreate.com

Learn more about us: jhkcreate.com
shineveracruz
Tourist
7 0 1

Thank you so much! 😃 

A big big help. 

 

Cheers!

shineveracruz
Tourist
7 0 1

Hi, how can I make it required and only for 10 characters? Thank you

littlebundles
Tourist
9 0 3

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?

PaulNewton
Shopify Partner
6275 574 1326

@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". 

Save time & money ,Ask Questions The Smart Way


Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org


Jodi7
Tourist
5 0 1

darn, I don't have a product-template.liquid file 😞  or a product.liquid. Do these maybe not come in the Taste theme 2022?

Serdar1
Visitor
3 0 0

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?

kbaxter12
Visitor
1 0 0

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? 

Serdar1
Visitor
3 0 0

I cant see what customer have written, too.. did you know why?

JHKCreate
Shopify Expert
3571 639 919

@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. 

Did we solve your issue? Like & Mark As Solution to help the community
Should you need any direct help: contact@jhkcreate.com

Learn more about us: jhkcreate.com
Liam_Frailing1
Visitor
3 0 0
Hi JHKCreate,
 
I have recently created a request for support on the Shopify Community forum for help with creating a Personalised product in 'Highlight' theme - please see post here
 
I can see that you helped solve a similar issue here and I'd be very appreciative if you could provide some guidance on this, please?
 
I think I am a minor tweak away from having this solved, but my knowledge is limited so could do with some expert advice if possible. I am more than happy to pay for the support you provide.
 
All the best,
 
Liam Frailing 
Founder at VybeSkins

JVie
Visitor
1 0 0

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?

JHKCreate
Shopify Expert
3571 639 919

Hi @JVie 

Would you mind sharing your store's address (privately if you'd like) so we can assist on that?

 

Did we solve your issue? Like & Mark As Solution to help the community
Should you need any direct help: contact@jhkcreate.com

Learn more about us: jhkcreate.com
CarlosDeco
Excursionist
28 0 16

Do you know how to customize this fields on product page? 

is it an shopify app? or code?

Captura de pantalla 2022-01-27 a la(s) 19.07.10.png

 

 

Thanks! 🙂 

Made4uo-Ribe
Shopify Partner
5571 1340 1654

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

 

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
Need a knowledgeable developer? Come and visit us at

Made4uo.com