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.
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.
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?
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
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.
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?
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.
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).
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.
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.
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?
Hello. Will the data entered in this cart page field show up in a column on the .csv file when orders are exported? Thanks.
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.
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!
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?
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?
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
May i use this attributes to "auto tag" an order based on them...lets say: Every order with Atrribute= XXX tag it with AAATAG. ?