Drupal 7 and E-Commerce



Drupal 7 has become the flagship version of the content management platform. Last year I was setting up a couple of webstores with Drupal 6 and e-commerce modules (addons) for it collectively called ubercart. Ubercart was somewhat complex but things worked. For the rough edges there were other modules to smooth the edges.

Recently I’ve been working with an install of Drupal 7 and building an e-commerce site. Ubercart is available in a testing state for Drupal 7, but many of the developers have left in favor of a module called Commerce. Which also is in a testing state. What follows is a BRIEF summary of my trials and tribulations in building an ecommerce site with Drupal 7.

First, let me say that Drupal 7 presents a much cleaner, easier to approach interface than Drupal 6. The options you are most likely to need the most frequently are presented front and center (add content/find content). Further the navigation by default is given to you in the form of a header bar if you are logged into the site. I feel like the learning curve with finding things in Drupal 7 is not as steep as it was for drupal 6.

I also found the means for installing new themes and modules much improved, but still leave something to be desired. I have only just discovered drush which is a command line tool for managing a drupal install which can make adding themes and modules trivially quick and easy. (But that is fodder for another story.)

So, I began my adventures with drupal 7 and working on a shopping cart with ubercart. Somewhere along the way I ran into some serious problems with module dependencies and had to blow away the database and start over. There were modules that threw out php errors. Unfortunately the module that caused the errors was an advertising module that was unrelated to ubercart. I disabled the modules and the errors were still there, it was, in short, a mess.

So I started over and carefully worked my way through finding the required modules. I had things looking pretty good and then went to trying to solve a few rough edges with the cart. I intend to offer flat shipping and so the “click to calculate shipping” button seemed extraneous. Also, I preferred when an item is out of stock for the “add to cart” button to be unavailable to click. Both of these problems were solved by addon modules for ubercart. Modules which, unfortunately have not been released in a version compatible with drupal 7.

My choices were to review the source code myself to try to make them compatible, hire someone to do so, or look for another solution. At this point I had seen that most of the lead development interest had shifted from ubercart to a new module called commerce. So…. I thought that might be the path of least resistance. So, I disabled ubercart and installed commerce.

In doing so I found that there were some features that simply did not work. Why? Module dependencies. There are some features that require the current development version of several modules. So, I upgrade to those modules. Unfortunately upgrading to the dev modules is not enough I needed to only install from the development branch first. Argh…. nuke the database and start over again was my only solution.

So, I have now rebuilt the site AGAIN very carefully pulling in the required development versions of the pre-requisites and then installing commerce itself and some of it’s companion modules. Now that I have it correctly installed and working I have a great appreciation for it. it seems leaner than ubercart and less complex. (Not a bad thing.) I’m liking the simplicity.

Getting to this simplicity has been a frustrating task though. I look forward to the modules stabilizing and not requiring such careful installation. As for drupal – I hope to see version 7 become more robust in dealing with install and removal of modules. The problems I ran into seemed to have to do with tables not being correctly created on reinstall. Although at this point I could be mistaken in my statement of the issue. I do recall that there was a bug filed in drupal on the problem and was an issue cited by the creators of Commerce as something that would need to be fixed before you could upgrade to the dev version of the required modules and expect things to work.

I think drupal 7 has a bright future. It seems to be a great improvement on version 6. Commerce appears to be a great improvement on the structure of ubercart as well. I think within 6 months to a year, it will be the stack for open source shopping cart stores. I do expect to wait on the upgrades from drupal 6/ubercart sites though for some time. Perhaps a simple drupal 6 site with no shopping cart would be a safe upgrade, but it will be interesting to see how quickly the commerce/drupal 7 solution matures.

   Send article as PDF   

Similar Posts