Liquid Weekly
The newsletter by and for Shopify Developers
|
|
Karl Says
A recent subscriber replied with some great ideas for improving this email. Starting with this issue we'll be featuring the occasional "Slice of Life" - an opportunity to hear about how other developers approach their work and organize their day. Thank you Marianne for not only suggesting it but also volunteering to go first! Read a snippet of her slice below and read the complete version online
|
|
Marianne's Slice of Life
I wake up at 7.30am, have coffee in front of the news and then head off on a 45 minute brisk walk with my husband. He's also a developer so it's a chance for us to discuss work and bounce around business ideas.If I'm freelancing for a Shopify agency, I make sure I'm ready and at my home office by 10am sharp. I'm actually scarily regimented with my time when I'm freelancing, scheduling every hour into my calendar including breaks. I'll usually have a project management tool such as ClickUp or even a simple spreadsheet to track and prioritise my tasks, so that's my first port of call in the morning. I'll also check Slack and email to make sure I haven't missed anything that might affect the day's tasks... Finish Reading Marianne's Slice Online
|
So You Want to Mock an APIAPI mocking refers to the process of simulating the behaviour of a real API using a fake replacement. This article explores using API mocking to break development dependencies and facilitate testing against 3rd party APIs. CHRISTOS HADJIASLANISDisplay Related Products Powered by Vue.jsDisplay related or recommended products on a product page by using Metafields + Vue.js. CODE SHOPIFYVerify Theme Support for App BlocksTitle says it all - here's Shopify's guide to verifying whether your theme supports App Blocks. SHOPIFYDiggin’ and Fetchin’ with TruffleRubyJulie shares a fun story about a Ruby code refactoring that ends with a prototype solution that changes the language itself. JULIE ANTUNOVIC
|
Code & Tools
CSS Grid Generator Here's a nifty generator to help you get your CSS Grid On. This project helps generate a basic layout, allowing you to quickly get started with CSS Grid. Thanks Sarah! SARAH DRASNERCart API Reference While I'm sure most folks are familiar with this already, it might be a good idea to take a quick review of the Shopify Cart API for front end development. You might be surprised by what you find. SHOPIFY
|
The ChangelogShopify API
SMS Marketing Consent You can use the GraphQL Admin API and REST Admin API to retrieve, add, and
update a customer's consent to receive marketing material by SMS. SEPTEMBER 22 2021
|
Tip of the WeekAdd a Christmas Countdown Timer with JS
Here's a little snippet for adding a countdown timer to your site. Perfect for showing time remaining until a shipping or holiday deadline. function daysTo(year,month,day,days=0) { let hour = 0; min= 0; sec= 0; month = --month; let dateFuture = new Date(year,month,day,hour,min,sec); let dateNow = new Date(); amount = dateFuture.getTime() - dateNow.getTime()+5; amount = Math.floor(amount/1000); return Math.floor(amount/86400) + 1; } Usage: daysTo(2021,12,25,0)Thanks to Sensor Pro for the inspiration. Be sure to check out their holiday messaging guide.
|
|
|
|