News
Updates, tips and notes on design and code
Looking for Shopify Code Snippets? See my GitHub Repo
Shopify Gift Card images are something you can customise but it's not as simple to show the actual variant image on the page the customer sees. Let's look at some code to let you show the variant image in the Gift Card template.
If you'd been paying attention to the Liquid documentation changes you would have seen something new appear to the Liquid Objects page (under articles). It highlights how to directly reference an article in Liquid - something that previously had to be handled with JavaScript.
There'll be times that you might want to use the "type" setting for a Shopify storefront search to change how content is shown in search.liquid.
There's no built in Liquid method to return the querystring values in a url with Shopify Liquid. There is a hacky way to get those values right now but it's far from being something I'd want to see used on a live production site - let's explore it.
For some stores the map on the Shopify Order status page can actually add confusion - especially if you don't ship products and are pickup only. There's a simple enough way to hide the map so let's peek at some code to do it.
The cycle Liquid filter is useful when you need to output a series of known string parameters in a sequential order loop. One thing cycle doesn't do is give you the ability to use dynamic amounts of assigned variable data - let's look at a quick way to do something just like it.
Shopify gives plenty of ways to sort collection products but things get a little tricky when you need to sort by metafield value. Sure you can still sort the products in a collection manually, but where's the cool factor in that? Let's explore a sorting method that doesn't need JavaScript.
If you're doing some self backups you'll suddenly have the need to grab a list of all the files you've uploaded to the Shopify Admin page at /admin/settings/files. Here's a quick JavaScript snippet to export a list of those files.
There's going to be times when you want to show a list of the most recents articles (posts) from all your Shopify Blogs combined - not just pulling the latest ones from a single Blog. Since I saw the question pop up on the ecommerce forums again, I grabbed a vodka and wrote some code.