Line Item - Custom Projects

Solved

Line Item - Custom Projects

ManaakiToi
New Member
4 0 0

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? 

Accepted Solution (1)

Huptech-Web
Shopify Partner
1169 234 264

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:

 

line_item.png

 

<p class="line-item-property__field">
  <label for="Engraving">Your name</label>
  <input id="engraving" type="text" name="properties[Engraving]">
</p>

 

 

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required

View solution in original post

Replies 4 (4)

Huptech-Web
Shopify Partner
1169 234 264

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:

 

line_item.png

 

<p class="line-item-property__field">
  <label for="Engraving">Your name</label>
  <input id="engraving" type="text" name="properties[Engraving]">
</p>

 

 

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required
ManaakiToi
New Member
4 0 0
Thanks for your help.
The buy-button.liquid is that under snippets?
Huptech-Web
Shopify Partner
1169 234 264

Hi @ManaakiToi, Yes the buy-button.liquid is under snippets.

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required

Small_Task_Help
Shopify Partner
1043 42 98

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>
To Get Shopify Experts Help, Click Here or E-mail - hi@ecommercesmalltask.com
About Us - We are Shopify Expert India
At Google My Business - Ecommerce Small Task - Hire Shopify Developers Ahmedabad