Fire Core – Drupal / Ubercart File Download e-commerce

December 29th, 2010

Fire Core - Drupal / Ubercart File Download e-commerceFire Core LLC designs powerful media center software aimed at complementing a number of popular Apple hardware products. Fire Core has been routinely featured in a number of major publications such as Macworld, Popular Science, Gizmodo, Engadget and many more.

The previous site was utilizing 3 different software packages.

  • osCommerce The e-commerce part of their previous site was run with osCommerce.
  • WordPress The site blog was run on WordPress
  • phpBB Their support forum was driven by phpBB. Many of the users were also customers in their osCommerce store database, having separate accounts on both systems.

We (Rehab Creative) were approached by Fire Core about creating a new site, ideally merging the three systems into one. This project was a perfect fit for Drupal and Ubercart, and after a few brief discussions, Fire Core agreed that Drupal sounded like a great platform to work with. The slick visual design was provided by Jack Herbert and the PSDs were handed off to us to cut out to a Drupal theme.

osCommerce vs. Ubercart

One of the main advantages of Ubercart over osCommerce is Drupal itself. A Drupal-based commerce solution provides content management, commerce capability, forum, blog and user management all in one proven package with a deep base of contributing users and modules. Using osCommerce as their e-commerce engine, Fire Core needed to utilize two other software packages (Word Press and phpBB) to achieve all requisite functionality.

Additionally, Fire Core expressed that many of the osCommerce contributions the site depended on (“contributions” are the closest thing osCommerce has to modules) required adjustments to the osCommerce core and often specific contributions would require core changes that would conflict with other contributions. This presented problems with both implementing relevant contributions and with keeping the osCommerce core up to date.


The migration from osCommerce to Ubercart alone was a unique challenge due to the nature of the file-downloads and variable expirations sold on the site. The two carts handle purchased file downloads fundamentally differently, and reconciling those differences was more involved than a traditional physical-goods store migration would have been.

On top of that, many customers also had accounts on the phpBB based forum and even on the WordPress blog for commenting on blog posts. This meant that we had to reconcile users from the three user systems into the single Drupal user table, while maintaining proper associations of user->order, user->forum posts, etc.


The initial migration was done largely via the following modules:

While the modules above greatly helped expedite the import of many of the larger content items, the user consolidation and proper linking had to be handled largely via some custom PHP/MySQL logic outside of Drupal.

The migrations and consolidation of orders, users, phpBB forum posts, etc were numerous and complex, so much so that it would be unreasonable to go into great detail on each front. However, purchased file downloads and a user migration/consolidation issue presented two of the more interesting migration challenges, so an extended summary of those follow.

Migrating File Downloads

One of the more difficult challenges revolved around the way Ubercart handles purchased file downloads. Under Ubercart, file downloads are granted to users upon purchase, but without association to an order ID. The file download table in Ubercart has a list of all the file downloads granted to users (along with expiration dates, etc), but there’s no link back to an order. Additionally, the order table doesn’t maintain any association with a file download granted to a user. With osCommerce, the file download is associated with an order just like any standard product on an order.

Fire Core software is available for purchase with varying expiration levels. Customers can purchase software updates for 1, 2, 3 years and a lifetime option. Each of these choices represents a “Product Feature” under Ubercart. When a user purchases a file with one of those time periods, they’re purchasing an Ubercart product with a product feature that dictates what file they get access to, how long the download is good for, how many downloads they are allowed and the name of that product feature.

With Ubercart, the product feature component is rather complex and stores this product attributes in a product feature table. The file downloads table then has a field for a product feature so every file download purchased by a user knows whether it was purchased for 1 year, 2 years, etc. This means that the product features had to be created in the Ubercart database before the file downloads table could be populated with users’ purchased files. While the expiration field is an explicit field in the file downloads table, the description of the file download (“1 year of updates”) is stored as part of the product feature, not in the file download table itself.

Under osCommerce, these purchased files are stored with the expiration date of the download, but without any notion of a “Product Feature”, so the only way to know if the download was purchased with “2 years of updates” was to look at the expiration and manually map those expirations to the proper Ubercart Product Features.

The initial migration using the modules outlined above handled the migration of the orders table just fine, but did nothing to bring the users’ file downloads across. At this point, we wrote up some PHP/MySQL to grab the files from the osCommerce database and properly add them to the Ubercart database. This script needed to assign the proper UID as well as the aforementioned mapping to assign the appropriate product feature for the file download.

Consolidating store and forum users

The phpBB2Drupal module worked flawlessly for importing user posts and forum users — even properly handling users that already existed in the Drupal database from the store migration. Many osCommerce customers also had accounts in the phpBB forums, using the same email address. We used the osCommerce migration as our ‘master’ for the users, then performed the phpBB2Drupal migration after.

This created new users where necessary and utilized the existing users when the email address was already in the system. The only problem here was that, for users with accounts on both legacy systems, the “Joined”, or “Member Since” dates were being decided by their osCommerce user account since that account was the master as far as our Drupal site is concerned. To remedy that, we had to manually loop through the legacy phpBB database and properly overlay the legacy Join dates on top of the user accounts in the new Drupal database. After that, all the Drupal forum user accounts had the right Join dates, helping ensure a more seamless transition for existing forum users when they began using the new site.

Checkout customization

Fire Core - Drupal / Ubercart File Download e-commerce Fire Core had very specific requests for the layout of the checkout page. The legacy osCommerce site utilized a similar checkout page which provided a simplified 3-step flow: 1. Check your Cart 2. Enter Contact Details 3. Select Payment Method

Ubercart natively wants to group the checkout page by some default “panes”, and those didn’t line up with the desired flow. The checkout page needed to be significantly altered both in grouping and order of presentation. Fortunately, Ubercart provides hooks for this very manipulation. Using some standard hook_form_alter action Ubercart’s hook_checkout_pane, we were able to precisely achieve the desired layout. The hook_checkout_pane methods we used essentially boil down to what you can see on Stella’s website, only expanded significantly over what is shown on her site.


Fire Core - Drupal / Ubercart File Download e-commerce Using the Advanced Forum module and some custom templates we created a forum with a look and feel more in-line with the structure existing users had become used to on the phpBB forum the past site utilized.

Additionally, we added highlighting of moderator posts to help ‘official’ replies have visual separation from those of general users.

Additional Functionality

In addition to the primary functions of the site outlined above, we also seamlessly integrated with Zendesk (Zendesk Remote Authentication Module), securely served purchased file downloads from CloudFront, using the Ubercart Cloudfront Module (with some of our own tweaks), and implemented a number of custom modules to improve the checkout flow and product presentations in general.

Expanding File Downloads

Fire Core needed a way to manually adjust the expirations of purchased files for various reasons, so we wrote a module to give the site admin the ability to search for user downloads by username or email, then manually edit, delete and add file downloads to the user’s account.

Ubercart natively allows admins to add a file download to a user account, but it doesn’t take into consideration the various product features you’ve defined in your store. You can manually grant a user access to a file, and you can set an expiration date on that download, but you can’t assign it the product feature “2 years of updates”. The only practical problem presented by omitting the product feature is that the user won’t see “2 years of updates” presented on their file downloads page. Instead, they’ll only see the file name, and the expiration date. In our case, “2 years of updates” is actually an important part of the purchased product name, so we added the ability for the site admin to properly manually add a file download to a user account with any predefined product features.

Fire Core - Drupal / Ubercart File Download e-commerce File downloads and past orders are presented to users very simply via their account page. Upgrade offers and expiration notices are also conditionally displayed to the user on this page depending on the product features and expirations on their existing purchased downloads.

The site is now serving more pageviews than ever before, and the three unified systems (store, blog, forum) are working together flawlessly.