Hi i would like to create a new product template so the customer is able to input a name for engraving and other personalization on the product page. ideally this would be displayed on the cart page. currently using .json
I was able to do this when using liquid however i am struggling to find any instructions on creating this with json.
Any help would be appreciated - novice coder here.
Hi @krisbee You don’t do this type of logic in json templates directly they are just a property value store.
Use a custom-liquid block/section/setting and make formless inputs with the form attribute with the main product form id as the value
For dawn base themes that’s roughly <input form={{ ‘product-form-’ | append: section.id }} …> .
That liquid syntax to generate a form id will vary by theme, often found in main-product.liquid section, or buy-buttons.liquid snippet etc.
The form attribute associates an input to a form even if that input is NOT inside the form.
If you need this customization you can contact me for services.
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.
Several ways to do this using a liquid section/custom code, or via a free easy-to-use app. We’re fans of the King Product Options app as it is easy to add options like ‘engraving fields’ to all products or specific products. Just make sure to include code to add the ‘option’ field data to order notifications, etc.
Hi @krisbee
If you’re open to using an app, I’d recommend checking out Easify Product Options. It lets you easily add custom input fields like engraving text directly on the product page, and the info can also be shown on the cart page—no coding needed.
It might not look exactly like what you had before with Liquid, but it’s a smooth way to achieve the same personalization experience without struggling with JSON or code. Here’s how it works: