All things Shopify and commerce
I would like to add a custom text field for one of my products, not all of them. We offer a duffel bag that can be customized with a name and number. So, we would like to add two custom fields for this product. One for Name and one for Number. Any solutions?
Solved! Go to the solution
This is an accepted solution.
Hi Echapman24,
I used product metafields to do this before.
1. From Admin > Settings > Custom data > Metafields > Products > Add definition
2. Fill in "Name", "Description", Select Type "True or false". You can edit the "Namespace and key" as well
Example on my store:
3. Go to the Product you want to add this custom text field > Scroll down to bottom > Metafields > Enable Product Personalization: select True
4. Go to Online store > Edit Code > Open main-product.liquid
Find this code
Hello @echapman24
This link might help solve your problem:- https://community.shopify.com/c/shopify-design/product-pages-get-customization-information-for-produ...
This is an accepted solution.
Hi Echapman24,
I used product metafields to do this before.
1. From Admin > Settings > Custom data > Metafields > Products > Add definition
2. Fill in "Name", "Description", Select Type "True or false". You can edit the "Namespace and key" as well
Example on my store:
3. Go to the Product you want to add this custom text field > Scroll down to bottom > Metafields > Enable Product Personalization: select True
4. Go to Online store > Edit Code > Open main-product.liquid
Find this code
Thank you!
Thank you for sharing! I was able to add to my store as well.
this sounds great, but when I get to the Metafields > Enable Product Personalization step, I see nothing about "enable personalization" any where 😞
What am I missing, please & thank you
Hi. I'm hoping someone can help me. I have dawn theme ver 11.0.0. Do these instructions work for my version? I was able to make all of the changes in the metafields. Then I attempted to follow step #4 but I was unable to find the code listed once I opened main-product.liquid. Should I be searching in a different area to find the required code or am i doing something wrong? Thanks. Felecia
Managed to follow all the steps until you have to find the code:
{%- form 'product', product, id: product_form_id, class: 'form', novalidate: 'novalidate', data-type: 'add-to-cart-form' -%}
I've gone through the main-product.liquid code several times and can't find it unfortunately.
Is the solution still viable on Dawn theme version 9.0.0? I don't want to update my version as it says I'm going to lose certain code i've added already on other sections of the website.
Thanks for any help!
there's no need to search for all that, and probably different across most people's use of the theme... just search for the simplified string below, you'll find it 😉
{%- form 'product',
Thank you I managed to get there but the code isn't the same as stated above:
it works when you add it under that snippet of code but it also works when using custom liquid as a box on the product page which seems easier! and it only shows on the products where i've used the metafield and turned it on specifically for the product. Thanks for everyone's help 👍
It's under buy-buttons.liquid
Thank you for providing this piece, it works great.
I want to confirm that the data that the user enters gets submitted together with the order.
How does it look on the admin end?
Hi @echapman24,
Although you have already received a solution for creating a text field, I would like to suggest another simpler alternative that requires no coding 🤗. This way, in case you encounter a similar issue in the future or other community members face the same challenge, they can consider this solution as well.
To achieve this, you can utilize the free Easify Product Options app to effortlessly create and assign custom options to your desired product 💪.
Here's a quick demonstration on how to set up your custom options (name and number) using the app:
1. Create your custom options:
You can also set some conditions for your Name & Number field if you want (e.g.: text length - min & max characters for Name, min & max value for Number).
Besides Text box & Number text box, the app also provides 20+ option types such as dropdown, checkbox, radio button, image swatches, color swatches, dimension, ect...
2. Assign your options to your product:
You have the flexibility to manually or automatically assign your custom options to one or multiple products. Since you mentioned that these two custom options are specific to one of your products, you can manually select the product for assignment.
As you can see, the Easify Product Options app is user-friendly and doesn't require any coding ✌️. It will save you time and effort while enabling you to effectively manage your custom options.
Hello,
Mini:Customization Fields App allows you to add as many fields as possible to your selected products/collections.
Here you can create a new field easily in a specific format like datepicker etc.
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