< All Articles

Print Shopify cart attributes

Picture of shopping cart

What are Shopify cart attributes?

Officially known as “custom attributes”, cart attributes allow additional information to be collected from the buyer at checkout. Take, for example, a jewelry store on Shopify that offers custom engraving. With the use of a cart attribute, at checkout buyers can input a message to be engraved on the jewelry items in their cart.

It’s basically a way for a customer to provide custom information for an order. How the information is used during order processing is entirely up to the merchant.

How do they work?

Cart attributes (or custom attributes) are a collection of what’s called key/value pairs. The key is simply a “word” that can be used to look up a value. Knowing the name of the key allows you to obtain the value that the key points to.

For instance:

Our example jewelry store sets up their theme to store the engraving message as a cart attribute named “Message”. Let’s see what orders from a few different customers might look like in practice:

Order #Cart Attribute KeyCart Attribute Value
1000MessageForever and always
1001MessageThe best is yet to come
1002MessageKey to my heart

How to print Shopify cart attributes

In some situations, it can be useful for merchants to print an order’s cart attributes. Perhaps our example jewelry store’s engraver is off site, or for other reasons doesn’t have access to the store’s orders.

Is there a way to easily print cart attributes along with other order details? Better yet, can it be automated?

Yes, Axios Order Printer is a Shopify app that can generate printable documents of orders based on custom templates. Plus, documents can be created for many orders at a time from a Shopify merchant’s order screen.

Here’s how you can do that.

Create a template

  1. Launch Axios Order Printer.
  2. Locate the menu items on the left hand side of the dashboard.
  3. Click the “Templates” menu item.
  4. Click “New template”. You’ll be prompted for a few setup options:
  • Choose a starter template: Select “Start from scratch”.
  • Will you use this template with orders, fulfillments, or line items? Select “Orders” (you could also select “Fulfillments” if needed).
  • Do you want the template to be paginated? Select “No” (you could also select “Yes” if needed).
  • What’s the size of your page? For this article, you can just use the defaults.

You will then be looking at the template editor. At first, it will be blank so you’ll need to add some content.

Add a cart attribute element to the template

A template in Axios Order Printer is made up of one or more elements that will display specific data from an order when rendered.

There’s a variety of elements available, but we’re going to add a “Custom Attribute” (aka cart attribute) element to the template.

  1. Locate the available elements in the toolbar on the left side of the template preview.
  2. Drag the “Custom Attribute” element and drop it onto a blank area of the template preview.

Template editor with custom attribute

Configure the cart attribute element

  1. Click the “Settings” button inside the “Custom Attribute” element you just added.
  2. Locate the “Attributes” setting.
  3. Enter the key (i.e. name) of the custom attribute whose value you want to include in the document.

Custom attribute setting

  1. If necessary, click “Add attribute” and repeat the previous step to include values of additional cart attributes.

Now that we’re done with the template, all that’s left is to give it a name and then save it:

  1. Enter a name for the template
  2. Click “Save”

Generate a document with the template

Now let’s create a document that shows cart attributes from an order.

From the dashboard, click “New document”.

  1. Select one or more orders or fulfillments.
  2. Locate the Template option just above the “Create documents” button.
  3. Select the template you created in the previous section.
  4. Click “Create documents”.

Further steps

It’s possible to add additional elements to the template. You may want to include other order information alongside the cart attributes, such as the order number or customer name.

Get started

Unlock the freedom to print out Shopify orders your way.

Get started