Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Created a custom field on my cart page, how can I get this value to show under my Order's tab?

Created a custom field on my cart page, how can I get this value to show under my Order's tab?

dressedbyaa
Visitor
1 0 0

I have created a custom mandatory field in my cart page using the below code.

 

<tr>
<td colspan="5">
<label>Instagram name</label>
<input type="text" name="properties[cart name]" class="form-control" required="">
</td>
</tr>

 

What I am now looking todo is once a customers has completed their order, I want this value to appear against the order and appear under the orders tab in Shopify. Is this possible?

Reply 1 (1)

ankitpateldev
Shopify Partner
35 3 3

Hi @dressedbyaa ,

 

You can use below code that will help you to display custom field value into the order flow and you can see it in respective order details under Shopify admin.

 

<tr>
<td class="cart-attribute__field">
<label for="instagram-name">Instagram name</label>
<input required class="required" id="instagram-name" type="text" name="attributes[cart name]" class="form-control" value="{{ cart.attributes["Instagram name"] }}">
</td>
</tr>

Best regards,
Ankit Patel | Shopify Expert