FROM CACHE - en_header

Custom Field in Product Description custom theme

Solved
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)

Accepted Solutions
JHKCreate
Shopify Partner
3467 625 886

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 20 (20)
JHKCreate
Shopify Partner
3467 625 886

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 Partner
3467 625 886

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 Partner
3467 625 886

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 Partner
3467 625 886

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 Partner
3467 625 886

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 Partner
3467 625 886

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

JVie
New Member
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 Partner
3467 625 886

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
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
4765 390 1021

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

Finally Combinable Discounts - EARLY ACCESS ONLY - Use Free Shipping With Other Discounts

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org
Problem Solved? ✔Accept and Like solutions to help future merchants
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
kbaxter12
New Member
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? 

Liam_Frailing1
New Member
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
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! 🙂