About Andrew

Andrew Golightly is the lead web developer here at Golightly+. He is particularly passionate about frontend development. To balance his love for coding, he also works as a counsellor. To find out where in the world Andrew is now, visit his landing page.

How to add encryption (https) to your JavaScript application

I hadn't given too much thought to encrypting the traffic to my applications, until developing for 3rd party services like Facebook Messenger or using service workers require your server to use https. For a full stack JavaScript application we need to setup encrypt on both the front-end and the back-end. Front-End Encryption I'm serving my files (fonts, [...]

By | December 15th, 2016|blog|0 Comments

How to setup Google Analytics with React.js apps

If you have a single page app that has no routes, getting visitors tracked with Google Analytics is pretty straight forward using the React Google Analytics Module. First create your tracking ID from Google Analytics by going to https://analytics.google.com/ A howto guide is available here. Then in the parent component of your React.js app Install the [...]

By | November 30th, 2016|gist|0 Comments

How to listen to Shopify webhook event data with Node.js

Shopify provides webhooks for stores. What is a webhook? Webhooks are a useful tool for apps that want to execute code after a specific event happens on a shop, for example, after a customer creates a cart on the storefront, or a merchant creates a new product in their admin. -- https://help.shopify.com/api/tutorials/webhooks#about-webhooks   So let's say [...]

By | November 23rd, 2016|gist|0 Comments

How to create a sticky fusion mega menu dropdown for Avada

Some of you might notice that once you have created a fusion mega menu dropdown in Avada, once it appears, if you move your mouse just slightly out of its bounds, the dropdown will disappear. This can be pretty frustrating when trying to navigate around the menu when it's so easy for it to disappear. So [...]

By | November 9th, 2016|gist|0 Comments

How to collect an unknown number of async calls

I had a challenge the other day where I would request some data from a server. But the data was not all returned at once. But rather paginated. And I wouldn't know beforehand how many pages I would need to process. So I couldn't just pre-nest my callbacks. That's when I re-discovered promises. Basically I [...]

By | March 16th, 2016|Uncategorized|0 Comments

How to reduce bank fees as a traveller

As a traveller, using banks can become a headache with all the fees they add to withdraw money from an overseas ATM or when buying things online in another country with our debit or credit cards. After being charged AU$30 for doing a cash withdrawal and buying something online, I started researching exactly how much I [...]

By | September 3rd, 2015|blog|0 Comments

How to use a fallback image for a slider

I created a slideshow that grabbed images from an external server. But doing work on my localhost, if the Internet went down, the slideshow broke. So I wanted to figure out how to use a local fallback image so I could keep developing even if the Internet failed. Turns out it's quite simple. (my solution inspired by [...]

By | September 1st, 2015|gist|0 Comments

How to alphabetically sort articles in Shopify

There doesn't seem to be an easy way to sort articles in Shopify by title. Inspired by this article, I developed a workaround for a single page of articles (i.e. with no pagination). The procedure is as follows: Get Liquid to output all the HTML for the articles Give the root node of the list [...]

By | August 21st, 2015|gist|0 Comments

How to create a reorder button with Shopify’s Liquid templating language

Let's say on the the account page in Shopify, you want to add a reorder button that when clicked automatically adds all items for a previous order to the cart. One strategy is to use a cart permalink, in the following format: http://yourstore.com/cart/#{variant_id}:#{quantity}(,...) So  by adding an item's variant_id and quantity to the end of the URL, [...]

By | August 9th, 2015|gist|2 Comments