Cart - Use cart attributes to collect more information

Community Manager
556 38 999

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 43 (43)
20 1 1

I got it.

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

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

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

20 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. 


New Member
1 0 0

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

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?

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.




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.


New Member
4 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.

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.