DEV Community

Ilias Haddad
Ilias Haddad

Posted on • Originally published at iliashaddad.com

1

How to add custom fields to the order data on the product page

In the third article of #4weeksShopifyDev, I'll be talking about how to add custom fields to the order data on the product page

I'll be adding an engraving custom field on the product page and display the output of the customer in order page (Shopify Admin)

Demo Image
 How to add custom fields to the order data in the product page

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
     How to add custom fields to the order data in the product page

  • Create a new Shopify section and called product-custom-template and paste the code from the product-template section
     How to add custom fields to the order data in the product page

  • On the product page , change the template suffix to the product.custom

 How to add custom fields to the order data in the product page

Create Custom Fields

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 appear on the checkout page and order page
 How to add custom fields to the order data in the product page

Image of Bright Data

Maximize Data Efficiency – Store and process vast amounts efficiently.

Optimize your infrastructure with our solutions designed for high-volume data processing and storage.

Optimize Now

Top comments (1)

Collapse
 
nikhil27b profile image
Nikhil Bobade

How to store that data shopify

Image of AssemblyAI

Automatic Speech Recognition with AssemblyAI

Experience near-human accuracy, low-latency performance, and advanced Speech AI capabilities with AssemblyAI's Speech-to-Text API. Sign up today and get $50 in API credit. No credit card required.

Try the API

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay