Attach Notes

Tobias Lutke

One of the most common advanced feature requests we are getting these days is from store owners need to ask their customer for additional data prior to checkout.

Some people had some success with services like Wufoo but the end result lacks a nice integration.

A new feature which came online with the last deployment of Shopify is the ability to attach notes and texts to orders from the cart page.

I’ll describe the basic functionality here. The feature is intentionally very unrestrictive and therefore very powerful. For many liquid wizards out there this should be exactly what they were waiting for.

When you update the content of a cart or click the checkout button on a standard Shopify

page Shopify will look for two special parameters called simply

Free text note

Note is the primary one and the simplest to use.

Imagine you are running a gift shop and you want to ask your customers for a Gift message to be included in the package. Add following html/liquid code to your cart.liquid before the

  <label for="note">Gift note:</label><br/>
  <textarea name="note" id="note" rows="3" cols="60">{{cart.note}}</textarea>

This order, after its placed and paid, will display the note in the Shopify admin


Attributes let you attach any value to an order by choosing a name for it. They are very useful for creating more complex forms with checkboxes, drop-downs or even hidden fields which just attach the browser version or operating system of the client to the order.

You choose the name in the html name property using

style syntax like
<input type="checkbox" name="attributes[wrapping]" id="wrapping" value="yes" />

For our example, lets ask the customer if he wants his products gift wrapped:

  <input type="checkbox" name="attributes[wrapping]" id="wrapping" value="yes" {% if cart.attributes.wrapping %} checked="checked"{% endif %} />
  <label for="wrapping">Please wrap the products in this order</label>

You can add as many attributes as you like as long as you choose unique names ( between the brackets ).

Hope this will help make shopify more useful for shops which personalize their products.