www.apress.com

12/07/2017

The Definitive Guide to Shopify Themes

New Content ItemBy Gavin Ballard


Apress is proud to announce The Definitive Guide to Shopify Themes, publishing September 2017. Written by Gavin Ballard and reviewed by Keir Whitaker, below is an extract from the introduction to this exciting new book.


***


Back in 2005, Shopify got off the ground when a couple of folks in Canada wanted to sell snowboards online but couldn’t find an Ecommerce platform to meet their needs.

Since then, the capabilities of the Shopify, the number of merchants using it, and the world of Ecommerce in general has come a long way. At the time of writing, the platform powers the online stores of over 375,000 businesses across 175 countries, with 2,500 of those being high-volume merchants on the newer “enterprise” offering, Shopify Plus. A total of $15.4 billion in transactions was processed by Shopify in 2016, a doubling of the previous year’s total.

Many point to Shopify’s hosted nature, its expanding range of features, or its partnerships with major companies like Facebook, Twitter and Amazon, as core to its success. In my opinion, one of the most critical and oft-overlooked factors underlying Shopify’s growth is its ecosystem of Partners – a broad spectrum of developers, designers, marketers and experts that work with Shopify merchants to help them grow and succeed on the platform. Being one of these Partners myself, I guess this opinion comes off as quite self-serving, but I feel that anyone who’s worked with Shopify in any capacity would have to acknowledge that at the very least, the Partner ecosystem is a major asset.

Partners are the ones helping merchants transition to Shopify, building out their stores, customizing their themes, and configuring the multitude of available applications. They’re also the ones developing themes and apps for sale in Shopify’s official Stores, making a living and building businesses on top of the platform.

I first came to Shopify as a tinkerer quite early in its history, in 2008. The feature set was limited; APIs were undocumented and the default themes merchants could choose from when setting up your store weren’t going to win any design awards. Getting things to work was often a matter of trial, error, and swearing at Liquid code. Still, it was streets ahead of any other platform at the time in terms of ease-of-use, and there was something about the way the company seemed dedicated to improve that made it interesting enough to stick around (Tobi, then and now Shopify’s CEO, would often be in the partner forums responding to issues directly with a “just rolling out some code to fix that now!”).

Sticking around has proven to be a good decision – in 2013 I could make the transition to full-time Shopify freelance work; in 2015 I founded Disco, a boutique agency that helps Shopify merchants grow and improve their businesses. Over that time, I’ve worked on stores large and small, built themes and applications from scratch, written and released and open-sourced libraries, and partnered with Shopify to deliver talks, workshops and online courses. Most importantly, I’ve had the chance to meet scores of amazing Partners and “Shopifolk”, discover the world of Ecommerce through the eyes of merchants, and make friends with a diverse range of people from across the world.

This book is an attempt to share some of the things this experience has taught me.

Why this book?

No one resource can equip a person with every specific thing they need to know about Shopify themes. There are too many edge cases, too many wonderful quirks in the world of online commerce for a one-stop shop to deliver on that promise.

Fortunately, for the Shopify developer faced with learning the ropes or tackling a new requirement, there’s already quite a wealth of information at hand. Shopify’s official Theme and Liquid documentation is professional and thorough, and they often publish detailed “How-to” guides on the official Partner Blog. Shopify Partners themselves often fill in the gaps with blog posts and code examples, and for those still struggling to find answers there are healthy communities of folk willing to help on the official Shopify forums or in unofficial Slack groups.

So why add one more voice to the mix?

Despite that breadth of information already out there, I’ve long felt there’s something missing – something that allows a novice Shopify theme developer to tie all these disparate bits of of knowledge together into a single narrative. In this book, I’m trying to fill this missing gap by covering both high-level theme design principles and practical coding skills, and using case studies and examples wherever possible to tie the two together.

The goal here isn’t to replicate existing documentation, or provide a step-by-step rote-learning approach for every conceivable scenario you’ll face as a theme developer. Rather, by reading this book you should acquire a deeper understanding of how Shopify themes work, how you can apply fundamental principles of theme design when faced with new situations, and how you can level up the workflow processes you use to deliver a professional final product.

Who this book is for

This book assumes that you have a working knowledge of the fundamentals of web design and development – HTML, CSS and Javascript. It does not assume any prior knowledge of Shopify development (we’ll kick things off with a Shopify primer in Chapter 2).

Developers with some Shopify experience may find some of the earlier material straightforward, but will derive value from the coverage of topics such as workflow automation, development best practices and deeper dives into the architecture and design principles of Shopify themes.

Veteran Shopify developers are likely to get something out of the material, as well – whether it’s an introduction to advanced theme deployment techniques, taking performance optimization to a new level, or simply getting a different perspective on theme development.

Structure of this book

This book is broken into twelve chapters (including this one). Each one tackles a different idea or component of Shopify theme development, and while their contents are somewhat independent, they do follow an overall chronological order. This is especially true for Chapters 5 to 8 (inclusive), which together walk through the process of building an entire Shopify theme from scratch.

I would therefore recommend working through the book in chapter order the first time around, and then coming back to specific chapters and sections as needed for reference.

Throughout the book, I’ll be using code snippets to demonstrate concepts and specific techniques. For space reasons, many of these listings are truncated to show only the more important parts – the full versions of these are available in the resources repository on Github. A second Github repository (here) tracks the full source code development for the example theme begun in the exercises for Chapter 5 and built on in the exercises in the remaining chapters.

Beyond the book

As I mentioned in “Why this book?”, there are several places to go to find help if you find yourself stuck or want to learn more about a topic. Outside of the standard Google search, you can search through the official Shopify forums, the official theme documentation, or browse through posts on the Partner Blog.

There’s also a growing number of Shopify-focused communities being built on a range of social platforms, including Slack, Reddit, and Facebook.

If you have any specific questions about the material in this book, or would like to report errata, you can contact me directly at gavin@gavinballard.com.

On with the show!

About the Author

Gavin Ballard is a software developer and CEO at Disco, a company that helps businesses succeed on the Shopify platform. He’s the author of the Bootstrap for Shopify framework, as well the courses Mastering Shopify Themes and Mastering Shopify Apps. He writes and speaks about design, development and strategy in eCommerce.

You can pre-order your copy of The Definitive Guide to Shopify Themes on the Apress website. Gavin can be found online at his website and on Twitter @gavinballard.