Charlie Harvey

Making nor’s shop with simplecart.js

A couple of weeks back I helped nor to set up a shop to sell her beautiful handmade cards - you should definitely have a look. I used simplecart.js to add the cart to a view in her Drupal 7 site.

Simplecart.js is a very minimalist e-commerce tool that I have wanted to play round with for ages. Nor didn’t have huge requirements and Drupal commerce or Übercart would certainly have been overkill both in terms of time needed to set up and in the complexity of management.

Simplecart.js, however, is dead easy to work with. Though there was a bit of faff making it play nicely with a Drupal view, the basics were there in about 20 minutes. The idea is that you add class attributes to your products in the html — the price and so on — and the simplecart javascript takes care of pretty much everything else. Except perhaps for styling. I spent a while making the add to cart links look like nice pink buttons. And discovered that the table view of the car itself looked a lot better on the page than the unformatted one that is used by default.

I had a thoroughly enjoyable time working with simplecart.js. The documentation was accessible and had plenty of cut and paste-able axamples and the code just worked. Drupal was a bit more of a faff, as ever. I think that simplecart.js would work particularly well for people who are running a single page shop on a statically generated blog or something of that nature.


  • Be respectful. You may want to read the comment guidelines before posting.
  • You can use Markdown syntax to format your comments. You can only use level 5 and 6 headings.
  • You can add class="your language" to code blocks to help highlight.js highlight them correctly.

Privacy note: This form will forward your IP address, user agent and referrer to the Akismet, StopForumSpam and Botscout spam filtering services. I don’t log these details. Those services will. I do log everything you type into the form. Full privacy statement.