Fixing Shipcalc Module Bug is an Example of Overriding Drupal Forms.

April 23, 2008 | 0 comments

A customer on a newly launched Drupal e-commerce site I produced reported the following error:

Please enter a valid ZIP Code for the sender. (error -2147219498) usps configuration error. Please notify the site administrator.

Which occurred during the checkout process and only happened when a zip code contained a “+ 4″ code at the end.

Of course, I often find Google to be the best debugging tool of all, and I quickly found this post containing a workaround by Kenneth Bartlett that not only made it so I didn’t have to untangle the shipcalc module’s code, which would likely mean debugging Web Services calls to USPS, but is actually a pretty good solution in its own right I think.

The only thing I didn’t like about it was that it directly patched an e-commerce module file at modules/ecommerce/address/address.module. Whenever I use a piece of customizable software like Drupal (or Wordpress, osCommerce, etc.) I avoid directly patching both the core code and any third party modules, because this creates a maintenance burden for me when I want to upgrade the core software or an affected module, which could potentially wipe out these kinds of patches. I have my hands maintaining my own code, I don’t want to worry about modules I didn’t write.

My List of Favorite Drupal Modules

February 21, 2008 | 2 comments

When it comes to producing robust applications efficiently, choosing a framework is just the first step. Just as important, is familiarizing yourself with a framework’s plugins and knowing how to use them effectively.

I’ve been using Drupal regularly for about a year now, and I continue to be impressed with it. Not only is the framework itself robust and intelligently architected, but I’ve come to expect that when I need to add a new feature to a site, I can find an existing, mature plugin (or “module” in Drupal’s terminology) that implements it. Not only are these modules great in their own right, but they often work surprisingly well in conjunction with other Drupal modules.

There are so many modules, that it can be a little overwhelming at first. So, although the list of modules I am going to provide is obviously subjective, based on my own use of Drupal, I think it will help orient new Drupal users to some of the more commonly used Drupal modules.

Tips for implementing a subscription based Drupal site.

February 7, 2008 | 8 comments

I recently finished implementing a Drupal site that contained premium content, which a user can access only by purchasing a subscription. I am going to describe the general roadmap I followed to implement this, and while obviously somewhat specific to my situation, I think the guidelines provided can be easily adapted to many similar situations.