Updates, tips and notes on design and code
Looking for Shopify Code Snippets? See my GitHub Repo
If you're someone that has a Shopify site but runs an offsite blog (like wordpress) you'll probably want to be able to show the cart contents on that blog. The usual AJAX API calls won't work since you'll hit CORS errors but JSONP comes to the rescue.
If you have multiple domains attached to your Shopify store you might want to detect what one is currently being used. You might need this is if you want to show certain content if the Australian domain is used versus when the American domain is used.
Shopify Scripts is a great (and fun) feature available for Shopify Plus merchants. There's lots of interesting things you can do with Scripts, with one being the ability to remove a discount code from the cart automatically.
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.
If I was designing a password template for a client I'd generally always add the code for that page into a snippet. The reason is pretty simple - it makes it a lot easier to preview the design without locking the store.
If you've found this post by the power of Google it means that you're doing cool things with Shopify Liquid, but you've hit an error. Let's talk quickly about the limit.