I have a custom code I want to add into my theme for my product page but I can not find where to add it. Can someone please advise me where to put the code? My theme is Whisper
Topic summary
A user needs help integrating custom Liquid code into their Shopify product page using the Whisper theme. The code creates a text input field where customers can enter letters, with each letter having a different price value (ranging from $240-$460). The script dynamically calculates and displays the total price based on the entered letters.
Technical Details:
- Code includes HTML input field, JavaScript pricing logic, and hidden form fields
- Intended to replace existing dropdown options with a text box
- Uses product properties to pass custom data
Suggested Solutions:
- Insert code into
main-product.liquidfile - Alternatively, create a custom liquid section in the theme editor for easier formatting
- Exact placement depends on desired positioning on the page
Status: The original poster acknowledged needing developer assistance to implement the solution correctly. One responder offered direct help via private message.
Hey @ivysheajewelry
Can you share the custom code with me and then I can help you out where to insert it?
Best Regards,
Moeed
Yes here is the code:
{% comment %} Custom Letter Input and Dynamic Pricing {% endcomment %}
Custom Price: $0
I’m guessing it’s a code to dynamically update the price on the product page depending on the letter submitted in the input field. You will have to add this code in your main-product.liquid file. Although, if you’re not familiar with coding then I would highly recommend you to hire a Shopify developer who can help you out with that. Feel free to connect with me if you want me to help you out and I would be more than happy to give you a helping hand.
Best Regards,
Moeed
Yes I am having issues trying to locate exactly where it should be placed so that I get rid of my drop done options and add a text box so that my customers can input which letters they want to add. How can I reach out to you? I definitely need help!
My contact details are mentioned in my profile signature, or you can also drop me a private message here as well whatever works the best for you!
Best Regards,
Moeed
you can add it to the main product section. where depends on what you are trying to accomplish.
yet it may be better to create a custom liquid section in the theme editor. you might just need to add some formatting to it