0

Your Cart is Empty

by Michael P. Hill June 24, 2015

Many Shopify stores today sell products that can be customized with words, names, letters or numbers and Shopify themes already have a feature called line item properties that allows you to collect this data with some code modifications — but it’s not the best solution for stores with a lot of customizable items.

Although relatively easy to implement, Shopify’s method an quickly get unwieldily, but there’s a way to expand upon the suggested solution and, with a few code tweaks and tips, extend the functionality significantly.

Out of the Sandbox has a full tutorial that explains how to modify your Shopify theme using this method and start selling multiple items that ask for user input.

How it works

To accomplish this, you’ll be creating a series of fields that, on the surface, have generic names, but will still work just as well when taking and fulfilling orders — and then incorporate them into your Shopify theme in the most non-destructive way possible.

The next step includes updates the cart template and key email notifications so that users can see and review the text they inputted in these locations.

Advantages

The key advantage to using this method to code your line item properties is that, when you’re modifying your cart template and email notifications, you don’t have to anticipate every possible variation.

By using the generic fields of “custom1” and simply augmenting the number each time we need a new field on a product page but then leveraging the name="properties[Name]", we’re saving a lot of time and hassle.

That said, if you only have a single product that needs to gather custom data, you may be better off using Shopify’s recommend method of creating a unique template just for that product.

But once you start getting more than even two or three products that need to gather customer inputted data, this method can become a big timesaver and prevents you from having to create a new template for each product you offer in your Shopify store that can be customized.

Step by step instructions

To read Out of the Sandbox’s step-by-step instructions on how to modify your Shopify theme to collect additional information from customers using line item properties, click here to read the full tutorial.

The tutorial also includes a bonus section that explains how to display a special message only when certain items are in the cart.

Michael P. Hill
Michael P. Hill

Michael P. Hill is a Shopify, Shopify theme, content marketing, digital marketing and product management expert based in Chicago. Follow him on Twitter at @michaelphill or connect on LinkedIn.

Need Support?

Please don't post support questions or issues as a comment on this thread, as we may not be able to process it in a timely manner. Instead, please visit our Support Center to browse frequently asked questions or submit a support request directly to our team.



Also in Shopify Theme Blog

A big change to the Shopify admin is coming — what it is and how it will benefit you
A big change to the Shopify admin is coming — what it is and how it will benefit you

by Michael P. Hill April 27, 2017 0 Comments

A whole new look is coming to the Shopify admin — and it’s all part of an effort by Shopify announced at Unite 2017 to provide a “guiding star” to make using the platform easier than ever for merchants. What is this new system and how will it make it easier to run your Shopify store?
Read More
Out of the Sandbox and into the Sun: Shopify Unite 2017
Out of the Sandbox and into the Sun: Shopify Unite 2017

by Sharon Austin April 25, 2017 0 Comments

This year, four members of the Out of the Sandbox Shopify theme team had the privilege of attending the Shopify Unite conference in San Francisco. We’ve since returned with new insights, ideas and lots of enthusiasm for the growth we see coming —both on the Shopify platform and for ecommerce in general.

Read More
This is big: Our Shopify theme updater app just got a must-have feature
This is big: Our Shopify theme updater app just got a must-have feature

by Michael P. Hill April 19, 2017 0 Comments

Updating Shopify themes has long been one of the most frustrating parts of running a Shopify store — and Out of the Sandbox took a giant step in making this easier with our free Shopify theme updater app. But guess what? We’ve taken this another step farther.
Read More
News & Updates

Sign up to get the latest on sales, new releases and more …