FROM CACHE - en_header

Cart - Use cart attributes to collect more information

TyW
Community Manager
Community Manager
416 40 1107

Cart attributes are custom form fields that let you collect additional information from your customers on the cart page. The information that you collect will display in a note on the customer's order in the admin. For example, if you want to ask customers how they heard about your store, then you can add an How did you hear about us? drop-down selection question to the cart.

 

Tip: Cart attributes are different from order notes and line item properties. Order notes, which are available in every free Shopify theme, let you capture special instructions on how to prepare and deliver an order. Line item properties are used to record customization information about specific products in an order. Line item properties are specified directly on the product page.

Sectioned themes and non-sectioned themes

 

The steps for this tutorial differ depending on whether you are using a sectioned or a non-sectioned theme. A sectioned theme is a newer theme that lets you drag and drop to arrange the layout of your store's pages.

 

To figure out whether your theme supports sections, go to the theme's Edit code page. If there are files in the Sections directory, you are using a sectioned theme. Non-sectioned themes were released before October 2016, and do not have files in the Sections directory.

 

If you are using a sectioned theme, then click the Sectioned themes button and follow the instructions. If you are using an older, non-sectioned theme, then click the Non-sectioned themes button and follow the instructions.

 

 

TyW | Online Community Manager @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

Replies 45 (45)
chautran
Excursionist
21 1 1

I got it.

Update attribute[name] = null when remove item in cart or every page

SallySmith
New Member
1 0 0

Hi! I used the tutorial to add a Swing Tag Message field which worked perfectly (thank you!). I needed this additional attribute because I used the standard cart notes section for 'Delivery Instructions', however, I've just set up Local Delivery which includes a Delivery Instructions field during Checkout automatically, and therefore I have reverted the standard cart notes area back to a Swing Tag Message field, and no longer need the additional attribute. I deleted the code that I'd added via the Elements Generator and saved the template, however, the additional attribute is still showing on the cart page, i.e. now I have two Swing Tag Message field areas 😕 Any ideas on what I've missed in deleting the additional attribute or other steps I need to take to remove the additional attribute? 

Two fields now showing on Cart pageTwo fields now showing on Cart page

Highlighted code was deleted and template savedHighlighted code was deleted and template saved

Lauren_Guest
Tourist
4 0 1

HI Matt, did you work out how to view the additional notes that customer are adding? I've followed all the instructions, the customer can complete the box but it doesn't notify me or share what the customer has written, Thanks, Lauren

chautran
Excursionist
21 1 1

Hi SallySmith,

I think when you remove all code had attribute after go to front end clear cookie in browser (or open browser private) so will be ok. 

 

dohcgrey
New Member
1 0 0

hey Matt, did ever find an answer to this? I'm having the same problem on my first order.

Manifestation
New Member
1 0 0

Hello! Does the field form allow for customers to select more than one response in the radio button or drop-down? How do I add more than one answer for the checkbox?

arjun0274
New Member
4 0 0

Hi Expert!

I did everything as you said,

Copy and paste the code below into your cart.liquid file between the <form> and </form> tags. 

But, there's no change in my cart whatsoever!

I'm using the Debutify theme, Please help me.

 

 

 

JoeRam
New Member
5 0 0

Hi TyW,

Thanks for your info. I successfully displaying the cart attributes in my cart page (i.e. Delivery date, Message on the card) but somehow I am not sure if they were captured or stored into Database.  I did test order and pick the date and wrote down card message for this order but in my ADMIN order page (where I can see the details of each order), the Notes field (top right corner) did not display the notes that I wrote when I placed that order. 

And also, I tried to incorporate these attributes in my "Notification order confirmation" email and it also didn't show the information that I entered (Only the hardcoded label (title) but not the actual entered values).

Please help.

Thanks

harsh28
New Member
7 0 0

As per shopify guide, Collecting or doing any additional custom fields won't work with any dynamic check out options : apple pay, buy now button, paypal.

You have to disable the dynamic checkout button.

JacklynKaye
New Member
2 0 1

This worked great for adding a drop down attribute in my cart but I can't get it to show up on my order print out or email so I can't see what they've selected. 

Siemon-Schilder
Excursionist
22 1 2

I followed the guide and added the code for a checkbox, the checkbox indeed appears, but it doesn't respond, so I can't check the box. Does anyone have the same issue?

https://x9plick10qxn1xbs-39069974572.shopifypreview.com

 

d_kahr
New Member
1 0 0

Hello. Will the data entered in this cart page field show up in a column on the .csv file when orders are exported? Thanks. 

ahoshino
New Member
2 0 0

Hi have you gotten this working? Im using Supply theme as well, but some customers seem to be able to checkout without filling the form out.

I'm having a hard time as the form includes some additional details of the orders, and I cannot obtain it. 

Thank you,

Marc_Epstein
Tourist
7 0 1

Hi,

Thanks so much for the great tutorial! I was having some trouble customizing my custom form fields. I want to have 2 or 3 columns of them and editing the custom css hasn't been working.

Any tips would be greatly appreciated!

JacklynKaye
New Member
2 0 1

This is working for me now! No idea how but I can now see the additional attribute in my backend.

Prabhav1
New Member
2 0 0

Hi!

Thanks for the tutorial. I followed it and managed to add a form right on the cart page. It asks for the following:

1. Name of Doctor
2. Upload a file of prescription.

My question is, how do I access this information. As in where will it be available?

Sharina
New Member
1 0 0
Click to expand...
Hello,

I successfully added the text fields to my cart page.
But I can't seem to find where/how I can translate them.
Can someone help me?

Thanks!
antonkogan
Excursionist
28 1 7

I collect cart attributes with a drop of pre selected places we ship to- is it possible to have cart attributes be used in place of ship to when creating a label or using plug ins like ups.com for shipping? 

 

 

antonkogan
Excursionist
28 1 7

is it possible to have cart attribute mapped to ship to name, ship to address? we ship to third parties and need these cart attribute fields mapped to the correct shipping label field

hhelmanj
New Member
2 0 0

May i use this attributes to "auto tag" an order based on them...lets say: Every order with Atrribute= XXX tag it with AAATAG. ?