Adding a custom field in checkout that pass along when the order is created?

JonnaWiberg
Excursionist
15 2 5

Hi,

Is it possible to create a custom field in the checkout, which value would be passed along when the order is created?

For example lets just call this field asks for your favorite color, and when the order is created... i can see on the order that this customers favorite color is "Green".

Would it be possible to pass this custom field into the order object so it would be possible in the orders section or even when checking the order with the order API

https://shopify.dev/api/admin-rest/2021-07/resources/order

Replies 3 (3)
PaulNewton
Shopify Partner
3470 233 677

@JonnaWiberg For simple customer|user entered info use Cart Notes, which is a setting in most standard themes.

For more specific info or data shopify calls that type of data Cart attributes, or Line item properties(LIPS) for individual products.

Or in some cases you just used the Cart note https://ui-elements-generator.myshopify.com/pages/cart-attribute 

 

What important thing did you learn this Black Friday?


Answers powered by coffee Buy Paul a ☕ Coffee for more answers or donate to eff.org

Problem Solved? ✔Accept and Like solutions to help future merchants

Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
JonnaWiberg
Excursionist
15 2 5

Thank you, im a bit closer now to what i want to achieve. I was able to create a cart attribute... but i can only fill in this value inside the cart... is it possible to fill in this input directly in the checkout instead? i can see on a created order that this value follows along:) i have shopify plus so i can edit the checkout.liquid file if thats any help

 

Skärmavbild 2021-10-05 kl. 08.42.39.pngSkärmavbild 2021-10-05 kl. 08.44.12.png

image 3.png

PaulNewton
Shopify Partner
3470 233 677

@JonnaWiberg If your trying to do instore pickup shopify already has that feature so this may be an XYproblem

https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem/66378#66378 

i can only fill in this value inside the cart... is it possible to fill in this input directly in the checkout instead?

That would be much more advanced using checkout attributes instead and you would need to use javascript to add input forms dynamically to the checkout.liquid layout  and reload the checkout to get the new state.

In general it can be much simpler to create a more appropriate flow in /cart to support getting what info you rather than trying to hobble your way through hacking /checkout

 

 

What important thing did you learn this Black Friday?


Answers powered by coffee Buy Paul a ☕ Coffee for more answers or donate to eff.org

Problem Solved? ✔Accept and Like solutions to help future merchants

Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com