Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi
I have the free Dawn theme which uses JSON.
I have custom products and I am trying to add a line item at checkout for each product called ‘engraving’ or ‘name’. All the tutorials deal with product.liquid not product.json.
can anyone help on how I go about this?
Solved! Go to the solution
This is an accepted solution.
Hi @ManaakiToi, To add the line item you need to add the below code to the "buy-button.liquid" in side the form tag. Review the screenshot I have attached:
<p class="line-item-property__field">
<label for="Engraving">Your name</label>
<input id="engraving" type="text" name="properties[Engraving]">
</p>
This is an accepted solution.
Hi @ManaakiToi, To add the line item you need to add the below code to the "buy-button.liquid" in side the form tag. Review the screenshot I have attached:
<p class="line-item-property__field">
<label for="Engraving">Your name</label>
<input id="engraving" type="text" name="properties[Engraving]">
</p>
Hi @ManaakiToi, Yes the buy-button.liquid is under snippets.
Hi,
Need to use custom line item properties. Since Dawn does not use traditional .liquid files for product pages, you will need to edit the JSON files and potentially customize your cart or checkout pages to reflect these properties.
Custom Input Field product-form section code example
<form method="post" action="/cart/add">
<!-- Existing product form code -->
<!-- Add custom line item property for engraving -->
<input type="text" name="properties[Engraving]" placeholder="Enter Engraving Name" />
<!-- Existing submit button and other form elements -->
</form>
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025