f you’ve ever had to create multiple custom Liquid product templates to accommodate unique product data, you know how difficult it is to manage. You can run into problems when code is inconsistent between pages, which is not good practice, and can lead to several bugs and lot of time wasted.
Instead of using custom Liquid templates, you can save yourself all the headaches and use metafields to store unique information. Shopify metafields can help you extend the functionality of online shops by giving you the ability to store additional information to products, collections, orders, blogs, and pages. Using Liquid, you can display the additional metafield information on shop storefronts.
Today, I’ll go over a few examples, tools, and apps you can start using to get the most out of metafields.
Metafields and product pages
I’ve been lucky enough to travel around the world this year, attending conferences and speaking to designers and developers building amazing things on Shopify. One issue that kept coming up was the difficulty and time consuming task of accommodating unique product information. I spoke with a developer who was using over 20 custom product Liquid templates – after introducing him to metafields he reduced that number to one. I’ll show you how you can do the same.
As an example, let’s say we’re working on an apparel shop where we have a set of products that require the same product description, but the customer needs to be informed of unique washing instructions, like wash using hot or cold water, wash with similar colors, hand wash, hang to dry, etc. To learn how to do this with one product liquid template, we need to know a little about what metafields are.