Instead of having a dropdown option, I want to allow customers to be able to type in their choice of words. For instance, they can type in a city name. I also want to have 3 separate fields that will allow them to type in, so it’ll go something like:
City ______________
State _____________
Year _____________
The underlined area is the field where the customer will type in their desired wording.
How can I achieve this in Shopify?
@Champagne03
you can do this by using line item properties so that these values will be shown on cart and checkout with the product.
place above code into your theme files, main-product product template
do let me know if you need any further help.
thanks
I tried adding it to Product-Template.liquid under the Sections folder, but I didn’t see the fields reflected in the checkout area. Did I choose the wrong one?
@Champagne03
you need to put that in your product template inside tag where the add to cart button is available.
thanks
I found the reference to add to cart, but I’m not sure exactly “where” to put it:
{{ 'products.product.add_to_cart' | t }}
{% if section.settings.enable_payment_button %}
{{ form | payment_button }}
{% endif %}
{% endform %}
@Champagne03
yes you need to place it before the .
thanks
Unfortunately, that didn’t work. To confirm, I only need to put it in the product-template.liquid? No where else?
Here is what the code currently looks like with the new code added before button
{{ 'products.product.add_to_cart' | t }}
City
State
Year
{% if section.settings.enable_payment_button %}
{{ form | payment_button }}
{% endif %}
{% endform %}
@Champagne03
this will be work only on product page not anywhere else.
OK - the only place I have it is on product-template.liquid (which I assume is the product page you’re referring to)
If the code is correct as I pasted above, can you think of anything I may be doing wrong?
@Champagne03 i cannot give any solution without looking into it.
@Champagne03
i guess its working fine.? i have tested your website
I decided to just download an app that does it for me. A couple others left comments on how to do it with code, but nothing quite worked. The app seemed like the best solution.