News
Updates, tips and notes on design and code
Looking for Shopify Code Snippets? See my GitHub Repo
Running a millions of loops within Shopify (or really any platform) is rarely a good idea but there's times that I like adding a code with a loop with a single iteration. This means it's not really looping at all, but it comes with a nice little bonus.
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.
Every now and again I see merchants creating alternate templates in their account that actually breaks some common Shopify code. The code assumes that if a template name contains the word 'product' that it must be a product template - that's not always the case.
If you've got awesome Shopify customers that return each month to buy the same thing you don't want to force them to have to re-add everything to cart each time. With some theme edits it's possible to add a feature that does just this - let's explore some very example Liquid and JavaScript code.
Viewing the order status page (aka - the thank_you page) is really handy for testing and development - and just kind of cool to see what the customer sees. The process for actually viewing one is simple enough.
Shopify recently dropped the sweet news that SSL is available for all accounts! As part of the activation process existing stores need to make sure the assets (images, css, js, etc) used in the site are not linked up with unencrypted urls. If you've got a serious case of FOMO want to activate without fixing the urls (why crazy person, why?), here's how.
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.
There's micro edits being added all the time but this month there was a few meatier additions so it's worth making a blog post about. Let's take a quick peek at what new things might be lurking under the hood.
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.