How to add custom properties to your Shopify order using the line item
Published Date: December 3, 2020
In the third article of #4weeksShopifyDev, I'll be talking about how to add custom fields to the order data in the product page
I'll adding engraving custom field in 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
- Go to the Shopify UI Elements Generator.
Create a new custom field
How to add custom fields to the order data in the product page
Copy the generated code
How to add custom fields to the order data in the product page
- 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 appear on the checkout page and order page
How to add custom fields to the order data in the product page
Related Posts
#4WeeksOfShopifyDevConvert your Shopify store to PWA for better performances (conversion)
December 31, 2020
On the 16th of the #4WeeksOfShopifyDev challenge, I’ll be talking about Why you should convert your Shopify store to PWA for better performance?
#4WeeksOfShopifyDevWhat benefits of being a Shopify partner and make money using it?
December 24, 2020
#4WeeksOfShopifyDevWhy developers should invest in learning the Shopify App or Theme development?
December 21, 2020
Convert your Shopify store to PWA for better performances (conversion)
December 31, 2020
On the 16th of the #4WeeksOfShopifyDev challenge, I’ll be talking about Why you should convert your Shopify store to PWA for better performance?
What benefits of being a Shopify partner and make money using it?
December 24, 2020
Why developers should invest in learning the Shopify App or Theme development?
December 21, 2020