Updates, tips and notes on design and code
Looking for Shopify Code Snippets? See my GitHub Repo
There's plenty of Shopify ecommerce stores out there that only have a few products, but those products have many variants. The drawback to this approach is that collection pages can look a little sparse but let's fix that with some simple theme edits.
Some merchants like to track and show publicly the amount of items sold on a product page, not just the amount left in stock. This is not something that Shopify does by default but with the use of the Mighty Metafield, it's a simple addition.
Shopify does lots of things well, and one thing in particular is the ability to scale. To give the engineers a level of control there's some limits on certain things - page size being one.
When you upload images to Shopify they get sent to a magical CDN, in all the various sizes ready to be served up with speed. These images don't share the same url as the store but it is possible to change them so they do.
I still don't think the concat filter has made it into the official Shopify docs (and it might not ever) but there's a little clue of its existence in this file. Concat is probably my fave Liquid filter to date - it's awesome and quite useful for simulating a push filter.
If you've been paying attention to the new Shopify Checkout that's being rolled out you might notice the images used in the checkout are square. They are square, even if they had not been square in the first place.
I see this one pop up in the forum a lot and it's a pretty simple fix. All that's needed to it add some css to the bottom of your stylesheet - cut and paste style.
Date formatting in Shopify is pretty simple stuff but one common task merchants want to do is the ability to add time to things. Think of the usage case of wanting to show something on a product after a certain amount of time (or conversely hide something).
A lot of Shopify store owners are quite fond of the default Shopify gift card graphic but ultimately want to change the colours to match their design. I took a quick peek at the Shopify resources but didn't see a vector version listed, so here's one I knocked up.