Collected Writing, AKA the BLOG

the blog image

Shipping is Easy Right?

The Shopify forums and chat channels are chock-a-block full of merchants that subscribe to the theory that shipping is easy. Some common complaints include:

Average Cost of Inventory

For accounting purposes there are a couple of ways of dealing with selling and purchasing of inventory and the changes in the cost of purchasing inventory over time. It is rare that a merchant will purchase items to sell in their Shopify store for the exact same price over time. It can be important to use an average cost price that takes into account these purchasing price changes over time.

Shopify and Real-Time Currency Exchange

The Profiteer App is meant to expose profit or margins on a sale by subtracting the cost price of goods sold from the selling price of the goods sold. A common business issue faced by many merchants is the effect currency exchange rates may have on their sales. A shop located in Canada may sell products to Canadians in Canadian currency, but the products sold may have been purchased and imported from the United States. Many merchants probably source their products from the United States, and it is considered to be one of the standard currencies by which most others are measured.

A Word to the Wise

Had a real laugher/shocker at the same time. I develop so much App code where the data processing is a flow and not a stop:persist:process:continue action that sometimes you get burned by that. Everything was working fine as “hey download all that shop’s orders, parse them, deal with the contents, and move on”. Everything as working fine on MY itty, bitty, little dev shop.

Montreal RB meetup

As a way of welcoming in the new year of 2014 and trying to decide which way was up from down, left from right, I made a decision to be a speaker at the local Montréal Ruby group. Having attended a dozen or more meetings over the years I felt like I had 20 minutes of quality material without being too technical, or wildly off of one topic.

Oh, Hey Whiners! It's All About Inventing What You Need

In the course of day to day delivery of new functionality and services in Shopify platform Apps, there is a lot to be said in how much we get to take for granted in terms of stuff invented elsewhere, by others and for general use. Ruby is a fine example in that it is a free open source scripting language that anyone can download, change, compile and use. Most people will just install it on their computer and use it as is, but the freedom is there to change it if need be. Same thing goes for web developers that need to build sites. There are hundreds of frameworks and for the most part they are free and open source too. Ruby on Rails (RoR) and Django are two examples. Most people deploy a RoR website and at the end they have spent almost all of their time writing the code necessary to bring their vision to life and not a lot of time hacking on RoR. This is a good thing.

CORS and Shopify

In the past there have been more than a few developers totally lost when it comes to dealing with Shopify, Ajax, Apps and cross-domain coding issues. A little history can perhaps explain this. Javascript in the browser on desktop computers is useful as a scripting tool and can be leveraged for nefarious purposes. On a mobile phone it is less of a problem since every App on a phone has it’s own protective little cubby hole. The JS evolution came up with JSONP to handle cross-domain responses, and that works well if you’re not Resty and you like GET requests all the time for everything. Read into that “it’s a wee bit awkward”.

An Unusual Shopify Fulfillment Pattern

A merchant recently ordered up a fulfillment App for his Shopify stores selling various items based out of Australia. The standard pattern I use was in order whereby an App polls for new orders booked in the shops twice daily, parses the orders and then rewrites them in a format suitable for the third-party logistics company to perform the actual fulfillment.

How to do Fulfillments

So your shop is a raging success. You are receiving upwards of 100, 200 maybe even 454 orders per day for your popular product. You are in business and the success of getting to this point is keeping you flush with excitement.

A New Feature in the Kitty

It has happened too many times for me to stand by idly so I finally did something about it. A subscriber to the Shopify App Transparent Kitty would call me and ask me this very specific question.

Sometimes You Just Never Know

There are many opportunties to produce Apps that provide new functionality to e-commerce platforms like Shopify. Some might argue the low fruit has all been picked but others continue to clamour for more. As a developer it is easy to produce an App but it turns out to be very hard to support that same App by polishing the rough edges, introducing new features and ensuring everyone is happy using it. That can make it daunting to release new Apps into the App store.

External Inventory Suppliers and Feeds

The reality of working with suppliers for many merchants can be a daunting and time consuming task. Take any domain and chances are you’ll stumble across an industry either deeply stuck in the past, or at the very least struggling to keep up with modern technological advances. A merchant may achieve some level of success attracting customers and converting carts with inventory at a certain level X, but they know that if they could just add more inventory, perhaps the customers and sales would ramp up too.

What is Perceived As Basic

It remains consistent over the course of the last seven years or so that people who subscribe to Shopify still voice that they believe the platform falls short of their basic expectations. A case in point is a merchant that just posted the following thoughts.

interesting line item properties issue

In the last year I have removed crufty cookie based customization code that exploited Shopify’s cart.attributes to replace it with the more modern line item properties.

working at the lake

Something I have not really tried too often but it is certainly easier than ever to try. Having a large number of clients accessing and relying on applications running in the cloud is a responsibility since at any given moment, an App could experience trouble and go down. I have tried various services to keep me informed when this happens but they themselves are suspect. I do not trust them much and the real problem is that even if they do reliably inform me of a problem, if I am out of cell phone service or Internet connectivity, the message ends up in a call to dev null.

Summer 2013 Bootstrap

July is the month I mark off birthdays on the calendar, so why not mark off this one with a return to blogging. Most likely has been a decade since I wrote my first blog post. Pretty scarce since then.

How to combine DelayedJob with Shopify API Limits gem
As anyone who has done any serious web application development using the cloud (in my case Heroku) to host an App supporting Shopify shops, you need to be aware of the API call limits of both the shop itself and across all the shops the App is installed in. The 300 3000 rule - you can call one shop 300 times continuously or make 3000 calls to all shops continuously.

The we are Sorry! App

We are all Happy, not!

Lesson learned about ShopifyAPI Billing

I am in the midst of no longer giving away simple (or complex) Apps for free, but instead, hooking into the Shopify Billing system built into the API, so I can receive some lunch money from my hard work.

Using the Shopify API command line interface (CLI)

A good many developers probably have installed the shopify_api gem from in order to built an Application to provide new functionality to shops. In fact, without even wanting to develop a full application, this gem is great for quick and dirty manipulation of stores. I am constantly using the Ruby console IRB to check if certain inventory makes sense, or other tidbits. It is almost essential to use this gem to advantage. If you have ever used Textmate on OSX and hooked up the handy Shopify Bundle from Meeech, then you are very used to typing in an API key and password to a domain to edit the assets, theme, etc. Turns out, there is yet another way to interact with shops, and it also involves the command line.

Fulfillment Messaging App

When running a Shopify store, sometimes you want to treat your orders a little different than the normal flow allows. It can really depend on your shipping alliances, your inventory and what your customers expect for communications.

Shopify App Development for Vendors

I have now successfully deployed and tested over 15 kinds of Shopify App systems to support various clients. The pattern I have adopted has grown more stable and flexible as I continuously experiment with the basics.

Related Products Shopify Application

Now offering Shopify Training

With about four full years of experience playing with Shopify’s system, the Shopify API, the Javascript API, Ruby, Rails, and Liquid, I feel prepared to teach what I have learned to others.

Shopify Vision, Compass and Sass Combo

I have not used Vision lately in any of my Shopify development, but that has recently changed due to some new work habits.

Identifying Code Smells in Shopify

The Shopify inventory system is based upon Products. Once you define a Product, you can decide what Variants of this product exist, and add them as needed. One sure fire code smell with inventory here is when you see a system full of identical products, added to the inventory without using Variants. This smells for the reason that it is avoiding an efficient internal algorithm for rendering products.

Building a Shopify App on Sinatra

With The Shopify API it is pretty easy to hook up a custom application residing on Heroku servers to a Shopify store. The authorization is nicely handled and once a store accepts the application, many new possibilities for new functionality are present.

Excellent first JS-Montreal Meeting

Once again trucked on down to the nice offices of Bloom where we had a nice time. Gary Haran from TalkerApp gave quite a nice presentation of his work with Talker. It was nice to see some really well done jQuery in a web application.