Apply, Verify, and Validate Shopify Discount Codes

Shopify doesn't have an API to verify discount, however I have found a little work-around. By making an AJAX call to /discount/(code), Shopify will set a cookie telling the checkout to auto-apply a discount on visit to the checkout page. Next, making an AJAX call to /checkout, we're able…

Laravel Shopify Billing

Version 2.0.0 was just released which features the baked-in ability to turn your Shopify app into a billable app with some simple configuration additions. It has support for the two methods Shopify supports, single and recurring charges. You have the ability to set the plan name, price, trial…

Introducing Laravel Shopify

Background As an active Ruby (and Rails) developer, I found myself regularly making Shopify apps in Rails and Sinatra. I've even released my own Gems to solve common (small) issues I've faced developing for these platforms. PHP itself... I haven't been active in years on that front. With PHP7 however,…

shopify_app_whitelist Gem

I regularly use shopify_app. Its a great way to get an app, embedded or not, up and running with Rails. Sometimes I'll create apps with shopify_app which are to be used by only one store. These apps sometimes have a front-end component for the themes... proxy integration, or…

Counting Unique Options in Shopify

Ever wanted to quickly display a how many of an option a product contains? Available in 4 sizes ... Available in Red, Blue, Green ... Available in 10 colors Here's an example of how to do just that (for color). Simply open your product's loop liquid and add this block at the…

Calculating Percent Saved with Shopify

Visually displaying to the customer how much they are saving is a big help to driving them towards a purchase. This is a simple snippet and guide to help you achieve this functionality in your Shopify stores. First, to calculate the percentage saved, lets look at the basic math for…

all_products... finally

Shopify has finally implemented a global variable for accessing products. Shopify has global variables for many things like Collections, Linklists, pages, etc, so you can do things such as access a collection by its handle collections.my-cool-toys.products. However, it always lacked the ability to look up products by their…

Quickly Get All Products in Your Shopify Store with Ruby

This is a simple snippet I've used over-and-over again this year to batch process products (modify tags, pricing, etc). It simply calculates the number of pages of products, pushes each page of products into a master array and returns them all. Should work well for others so I thought I…

Developing Shopify Themes with Teams

This is a simple write up to explain how a team can utilize Git versioning to manage a Shopify theme successfully. Its not a complicated processes but will require patience! As a side-note, this is simply a personal recommendation based on my experiences, there are of course other ways to…

Gathering User-Input with Shopify

Shopify includes everything you need to setup an online store, including free web-based store building software, unlimited ecommerce website hosting, and more. It is a great tool for both users and __developers. __It offers a great API which has libraries for many languages (PHP, Python, Ruby, ...) and a great back-end…