Listen Yeah

  1. Building Better Liquid Arrays

    Working with variables in Liquid is a bit of a challenge. It doesn’t seem to have been designed with complex data-manipulation in mind. Who’d have thought? Don't drop it all and feed your data into JavaScript just yet though. By learning more about how arrays can be created in Liquid, you should find that it's a bit easier to work with.

    Read More
  2. The Curious Case of the Undocumented Where Functionality

    I was reading some chatter on the Shopify Partner Slack recently about the recently added liquid where filter. Anybody who’s used Jekyll before might be used to it already, but it was only added to the Shopify flavour of liquid a few months ago. It turns out that this filter has an undocumented use that’s quite handy.

    Read More
  3. Shopify Functional Snippet Composition

    So you’ve been asked to do some development work on a Shopify store. Fortunately, most of the elements in the designs you’ve been given look familiar and there are a bunch of snippets available for you to use. Great! This should speed up development. All you need to do is include the snippets in the relevant areas, right? Not so fast. There’s a good chance your snippets won’t work as is, because they were originally written to be used in one or two specific contexts.

    Read More
  4. Using Environment variables in Shopify themes

    During the Shopify theme development process it may be appropriate to have features change slightly depending on whether they’re being used by a customer, a developer or a test suite. For example, if we have an integration in our store, we might want to send API requests to a testing endpoint whilst developing, or running tests on a staging theme, before connecting to a live endpoint when we publish the changes. We can’t trust that we’ll always remember to change this endpoint back to live before deploying to a live theme, so we can avoid the risk by using an environment dependent setting to control this.

    Read More