January 19, 2021
Hot Topics:

Shopify for Simplified E-Commerce Web Projects

  • By Jason Gilmore
  • Send Email »
  • More Articles »

In addition to regularly splashing ink on the pages of Developer.com and PHPBuilder.com, I spend a fair amount of time consulting for a variety of clients large and small. Lately the focus has turned to e-commerce, with businesses large and small seeking to establish an official online sales outlet for products which have long been sold through retail or third-party online outlets such as eBay or Etsy.

But this transition is rarely easy. Even the least ambitious e-commerce store is a fairly complex undertaking, with success dependent upon:

  • an eye-appealing design
  • the ability to integrate a CMS such as Drupal or Joomla with an e-commerce module such as Übercart
  • the purchase of an SSL certificate
  • establishment of a merchant account and payment gateway

To say nothing of integration with existing accounting and CRM software.

A staunch KISS advocate, I've lately been directing many of these clients towards Shopify, a hosted e-commerce application which greatly reduces the level of complexity required to effectively create and launch an online store which integrates into a business' existing infrastructure. If you too are a Web developer who regularly fields such projects, read on to learn more about how Shopify can make your life infinitely easier and your clients infinitely happier.

Template Integration with Shopify

Today's Web developer suffers from many of the same misconceptions long endured by medical doctors. Just as a podiatrist is not a gastroenterologist, neither is a Web developer (typically) a Web designer. A strong understanding of HTML and CSS does not always translate into design capability, and for that reason I often struggle with making things look "right", referring to this frustrating process as "putting lipstick on the pig".

Shopify's Theme Store saves similarly graphically challenged developers from countless hours of frustration by offering over 100 paid and free store themes which are easily integrated into a Shopify site. These themes, which are submitted by third-party designers, must be approved by the Shopify team before being accepted to the Theme Store in order to ensure certain guidelines are met, including notably proper usage of the Liquid template language.

Resembling Smarty and Rails' native layout syntax, Liquid's intuitive syntax makes it easy for developers to take the reins and further modify the template to their client's liking. Based on simple markup directives which signal escapes into and out of dynamic content, you'll embed the Liquid syntax directly into the templates, outputting dynamic data and performing other tasks as needed. For instance, to display your store's name within a template, you'll use the following Liquid syntax:

Copyright 2011 <strong>{{ shop.name }}</strong>

The shop.name variable is just one of numerous variables at your disposal. See the Shopify wiki for more information.

It's also possible to embed Liquid-based logic into a template. For instance you might use an if-conditional statement to offer a special message to customers based on a product's availability:

{% if product.available %}
  Buy your copy now before it is gone forever!
{% endif %}

Originally published on https://www.developer.com.

Page 1 of 2

This article was originally published on August 12, 2011

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Thanks for your registration, follow us on our social networks to keep up-to-date