How to add custom properties to your Shopify order using the line item

Originally published at https://iliashaddad.com/blog/how-to-add-custom-fields-to-order-data-in-product-page

In the third article of #4weeksShopifyDev, I’ll be talking about how to add custom properties to your Shopify order using the line item

Note: I’m using the Debut theme, you may have different architecture

Create a product template

  • First, we need to create a custom product Shopify template and called product-custom.liquid
  • Create a new Shopify section and called product-custom-template and paste the code from the product-template section
  • On the product page , change the template suffix to the product.custom

Create Custom Fields

  1. Go to the Shopify UI Elements Generator.
  2. Create a new custom field
  1. Copy the generated code
  1. Paste the code before <button type=”submit”

Now, you can test it by adding the product to the cart and add the custom field value and process the checkout.

Et voila, the custom field value appears on the checkout page and order page

I’m Full Stack Javascript Developer, Shopify Developer and Indie Maker