Review of Drupal E-commerce with Ubercart 2.x

Drupal Ubercart book

Here it is: the promised review of Packt Publishing's Drupal E-Commerce with Ubercart 2x, by George Papadongonas and Yiannis Doxaras.

Wow, this took me some time! Partly for good reason, too. I set out to not just read the book and proclaim it good (or not), but to also follow along and build my own working Drupal + Ubercart site. And so I did.

But was there pain along the way? Oh yes, there was pain, and then some more. Glitches and screeching-halt gum-ups galore. Here's the important thing, though: Those weren't the fault of the book. Despite quibbles with its content that I'll mention, the book was a great help (and if you're in a rush, let that be your review right there). Rather, I was beset by a succession of hiccups involving Drupal, Ubercart, my hosting service, my local-computer development setup, and probably cranky gremlins too.

I'll save all that for later, so as not to distract from the main review. Let's get on with that:


Ubercart is one of the more popular – perhaps the most popular? – shopping cart solutions ready-made for Drupal. It's a set of tools to build honest-to-gods online shops; see a list of working Ubercart stores engaged in ongoing e-commerce.

Ubercart consists of a suite of modules, which you enable in the usual manner. But don't think that you'll follow the common procedure of enabling modules, poking around the admin options to see what's new, and maybe peeking at documentation only if something's really not clear. You're going to find yourself staring at dozens of core and must-have third party Ubercart modules, with probably dozens more available as options – and no matter how much work the Ubercart developers have put into making things easy to follow, an e-commerce system is, by nature, not a simple thing. There's a whole lot to plan, configure, and test, which is where an expert guide comes in mighty handy.

For my journey into store-building, I decided on a shop with an exotic travel theme: handicrafts and foods from lands afar, along with expedition gear for adventurers. They're imaginary products (for now), but they put Ubercart to the test with categories, size and color options, shipping requirements, and other characteristics that real products would require.   

The below is a mixture of book review and diary of my experience, along with first-hand tips on wrangling Ubercart. 

Working through Drupal E-Commerce with Ubercart 2X

Drupal E-Commerce with Ubercart 2x (DEU below) was published in March 2010. I received a review copy from the kind people at Packt Publishing, and dove in. 

DEU begins with an advance peek at the features of the sample store the reader will build. From there, chapters 1 to 3 move on to overviews, installation guides, and configuration basics for not only Ubercart but also Drupal itself; the book really does strive to be a one-stop guide, taking you from zero to store. There's even a short guide on setting up your own local Drupal environment using tools like XAMPP and phpMyAdmin.

For my part, I didn't start from scratch using DEU's instructions. I began with my own basic sandbox setup on an existing Drupal installation, and jumped into the book from around page 31, where Ubercart modules come into the picture.

My chief complaint with DEU also comes in right about there. The text introduces and then waves away the various Ubercart modules with a breezy "Don't worry about installing them all now; we'll do that as we go" – but then neglects to later tell the reader what to install and when. That oversight popped up repeatedly as I forged ahead.   

Setting up Ubercart

Midway through chapter 3, DEU shifts without fanfare from Drupal basics to Ubercart setup. Things are fairly straightforward; my only question during the process came at the end, when Store settings allowed me a choice only between the US and Canada. Where's the greater part of the planet? I didn't see an answer in the book, so I decided to follow the Canadian path of metric weights and dimensions for my products.

Chapter 4 starts with a bang: "In this chapter the action begins!". After an important aside on the the importance of planning store categories and structure to create the best experience for shoppers, the chapter addresses product categories, attributes, and catalogs. 

DEU uses electronic gadget product categories for its sample store catalog. Per my store concept, I diverged from the text and created Terms – and thus, product categories – like Foods, Clothing, Crafts, and so on. Any Ubercart newcomer should similarly have little trouble swapping the book's sample products for something different, and continuing on with the sample store.

Interestingly, the sample store uses both admin-created categories and user-created free tagging ("folksonomy"). The book walks readers through the process of setting up the third-party modules required.

The book only briefly introduces the powerful Ubercart product class feature, whisking readers through a short example. Here I noticed something not mentioned in the book: "Manage classes" is reached via the Products page at admin/store/products, yet doesn't appear as a tab or any other link in that page. You'll have to look for it (and other sub-items under the Products page) within the newly-expanded Navigation menu. It took me a few minutes to realize that.

Also, once you create a class, a link to create a product of that class doesn't immediately appear anywhere I was looking. Again, the answer was in the Navigation menu, where I found the new class had appeared among the usual content types (Blog entry, Page, and so on, as well as plain generic Product). That, too, is reasonable enough, though I decided to manually move my product class content types under the Product content type in the Create content menu structure (via admin/build/menus), so they won't be scattered among unrelated content types. (Hmm, placing the Product Kit content type under the Product content type also looks good, in my opinion.)

Diving in deeper

Chapter 5 is all about shipping and packaging, including country settings, shipping quote settings, and shipping rates and methods. I went through the steps for flat rate shipping cost setting, using the free shipping option. (For now, I'm passing on the more complex discussions of UPS and USPS shipping.) The Ubercart interface here isn't the cleanest, making DEU a big help. Things are starting to work on my shop-in-progress!

Chapter 6 takes a similar look at taxes and payments. The depth of Ubercart capabilities here is impressive (at least to a newcomer like me), and again it's an area where a guide is reassuring. I set up the basics for handling products by PayPal and credit card, with sample tax rates for a few countries as well, while ignoring DEU's more complex discussions (such as setting up a payment gateway from scratch). So far, so good. 

In chapter 7, DEU dives into viewing and searching customers and orders before there actually are customers or orders, so you may need to first jump ahead to the relevant instructions for creating these. Oddly, Ubercart's Customer form itself doesn't allow creation of a customer; I had to do that from within creation of a new order. (Or maybe that's not odd, and I'm just not yet familiar with the sensible logic of the setup.) 

The chapter's remaining overviews of merging orders, invoicing, logging payment actions, creating package options, creating a shipping cart, and viewing order auditing trail logs are terse, doing little more than pointing the user to the existence of those functions. But the text does the job, and it is impressive to see all of this functionality appear on the screen for my first placeholder customer and order. There's a nifty-looking invoice, a detailed minute-by-minute log of all the changes I'd made to the order and customer info, and much more. Things get even more fun with Ubercart reports, which display, for example, a list of all products along with number sold, revenue, gross, and number of views for each. It's powerful stuff, at least as far as basics go.

Other features briefly introduced in chapter 7 include Ubercart Wish List (a third party module), Simplenews (for a newsletter), blogging, forums, and Twitter integration. The text is basic and won't mean much to experienced Drupal users, but should help point newcomers in helpful directions. Rounding out the chapter is a short guide to installing CiviCRM as an added CRM component. It's a useful start, though doesn't go too far. (CiviCRM or any CRM component of a store is a huge topic deserving of a whole book; for my store, I passed on those topics for now.)

Putting on a good face

Chapter 8, all about the store interface, is an unexpected mini-book on theming that may teach even experienced Drupal users a trick or two. The text covers the basics of choosing and configuring a theme, custom sub-theming work (based on Zen), Skinr-based theming, migrating an HTML theme to Drupal, and even creating a Drupal theme from a Photoshop template.

Chapter 9 is a grab-bag of user interface-related topics, including cross-selling techniques, recommendation systems, shopping cart tweaks, terms of service, discounts and coupons, multiple prices, and custom Views. There's a nice 13-page discussion of Panels, oriented toward flexible product display. I see a lot of beginner questions in forums about how to get started with Panels; this short guide will be welcomed by such users (and me, should I come back to the topic later to improve my site presentation).   

I'm passing on the Ubercart Discounts feature. Enabling the module and its requisite modules gave me errors related to the Date module; it's something to troubleshoot another day.

Multiprice is a nice option for varying price by country, though it's limited. It won't let you add a price in yuan for your Chinese customers; it'll only offer them an alternate price in dollars (or whatever your base currency is). Similarly, Price Per Role is nifty for offering lower prices to, say, a "Gold Customer" role – though here, integration with Multiprice would be nice. That is, you can offer a lower price for customers in Mexico, and you can offer a separate lower price for Gold Customers, but you can't (in my quick testing) offer a super low price for Gold Customers in Mexico. (It looks like role trumps country, at least in my setup: a valued Tijuana shopper would get offered the Gold Customer price, not the Mexican price.)

I couldn't find the Recommender module at the link DEU provides. This worked instead: Further, DEU doesn't offer details on setting up the recommendation system, other than telling you what new blocks to look for (which is admittedly a small help). For the record, you'll need to visit admin/settings/recommender, admin/store/recommender, and admin/settings/history_rec (to tell the browsing history recommender what content types to look at).

In discussing the Terms of Service module, DEU tells the reader to look for setup at Home | Administer | Store administration | Configuration | Terms of Service. Perhaps that's for an older version of the module; I find no such form. The module documentation states:

You can configure the options for checkout in panes' checkout configuration page (admin/store/settings/checkout/edit/panes) and for cart in panes' cart configuration page (admin/store/settings/cart/edit/panes).

Also, while the text isn't explicit, it should be clear that you need to create a node containing the terms of service; the module doesn't do that for you!

Remember to watch the Navigation menu for Ubercart features that don't turn up elsewhere. For example, when you're directed to Home | Administer | Store administration | Customers | Coupons, you'll get as far as "Customers" and then won't see any further link on the main form that'll take you to Coupons. You'll need to find the Coupons link in the Navigation menu. (I think it'd be helpful for the book to direct readers to forms via actual paths, rather than link breadcrumbs. The former lets readers jump to any form instantly, while the latter requires poking around on multiple admin pages to look for the given links.)

Final topics

The sample store is more or less running by chapter 10. This final chapter ambitiously covers topics for optimizing and promoting the working store: SEO concerns, automatic paths, page titles, meta tags, site maps, social media links, performance and caching, spam and security, backing up, Global Redirect, integration with Google services, and so on. Most of these I'd already taken care of long ago in the sandbox framework upon which I built my store (though the Path Redirect and Security Review modules were new to me). But for the many Drupal newcomers who erect a site skeleton and then ask "Now what?", this is a great overview that's useful for nearly any site, store or otherwise.

Following the main book, Appendix A shifts gears with a detailed use scenario: a hotel bookings system, which I'll tackle another day. Appendix B lists modules used in the book, while Appendix C suggests an assortment of store-friendly Drupal themes.

The appendixes are welcome, especially the added know-how to be gained from the booking system example. But it'd have been great to see another detailed use scenario that a lot of people ask about on the forums: how to best use Ubercart to create a store selling file downloads such as e-books, or subscriptions to online content. 

Nits and picks

Modular confusion

As noted above, DEU fails to clarify which modules, beyond core required ones, are needed to follow along with the sample site. This is a notable annoyance. For example, there's no mention of enabling the optional Payment module, or specific payment method modules, yet those are prerequisites for the discussion of Cart panes settings. Shortly thereafter, DEU directs the reader to Catalog configuration – but the reader's site won't have a Catalog configuration page. The same thing pops up again with the Product Kit module. Chapter 9 tells the reader to add sitemap-related settings to taxonomy Vocabularies, but the XML Sitemap Taxonomy module needs to be enabled first.

Where instructions to enable modules do appear, they are at times too brief. Instructions for the Meta Tags module simply say to enable "it". Yet Meta Tags actually offers several modules – which show up on the Modules form with the very different names "Nodewords" and variants thereof. This could throw off a newcomer unfamiliar with the modules. (For the record, to follow along with the DEU sample store you'll need to enable both the Nodewords and Nodewords - Basic Meta Tags modules.)

Permission granted... ?

DEU could definitely offer more instruction on what permissions to consider. Under the Uc_order module, should authenticated users have permission to "view own orders"? Is that what's needed for the expected ability of a customer to view current or past orders? How about "access wish lists"? Is that permission needed for a customer to view his own wish list? Or would it give him ability to view all wish lists? How about permission to "view payments"? Yes or no?

I'm left with the question, too, of where exactly customers fit into the user system, as I see that Ubercart doesn't create a new role "customer". I expect there's nothing odd going on, and I just need to delve into Ubercart a bit more. If there's an answer in DEU, though, I missed it. Both user- and permissions-related matters could use much more exposition in the text.  

Miscellaneous quibbles

I ran into my biggest holdup when Node Import refused to import my spreadsheet of product node data. The problem, it turned out, lay in the formating of my spreadsheet's image paths, which needed a slash in front. The book's image paths on p 91 clearly don't use a slash, while the explanatory text underneath does, in one instance, suggest the slash. This is a good area for the authors to double-check and clarify details.

I found a few oddities with paths. Administer | User management | Access control (p180) should be Administer | User management | Permissions.

Both DEU and Ubercart need to tweak their Windows-centric text when explaining multiple selection of list items, such as Terms from a Vocabulary. "Hold Ctrl while clicking to select multiple categories" should read something like "Hold Control (Command if using Mac OS X) while clicking to select multiple categories." (These keyboard slip-ups aside, though, the authors do try to be commendably all-inclusive; for example, later text discussing spreadsheets mentions the applications Numbers and OpenOffice along with the expected Excel.)

In a few spots, images and text don't match up perfectly. A screen shot on p79 shows a form with checkboxes – including a couple that are empty, in defiance of earlier instructions to check those boxes. Readers measuring their progress against the image are going to wonder why their checkboxes looks different.  

A separate review of DEU on Slashdot found many more quibbles than I did, especially in areas I passed over more quickly (like tax-related settings). That review also points out many grammatical and stylistic hiccups in the text. Those are certainly to be found in DEU, though to be honest they didn't trip me up. (I'll direct a grumpy aside to the Ubercart developers instead: "login" is the noun, "log in" is the verb. Grrr. DEU gets this right.)

The verdict

To put all the above problems in perspective, they're pretty unlikely to stymie a user with Drupal experience. Figuring out which modules I should have enabled, or finding my way along uncertain link paths, didn't slow me down much. The issues are worth mentioning, though, because they certainly could leave a Drupal beginner scratching his head. And a book that includes downloading Drupal, selecting a theme, and enabling blogs among its topics is definitely counting the beginner among its target audience.  

On the positive side, I appreciated the many miscellaneous helpful reminders scattered throughout DEU. As an example, an image-related troubleshooting tip on p82 directly addressed a vexing issue I had in which product images refused to upload. Tidbits like that give the welcome impression that the authors are anticipating likely user problems.

I also like how DEU picks up and runs with a number of side topics, instead of focusing narrowly on Just The Basic Store. I've mentioned the detailed discussions of topics like theming and Panels. Other tidbits I noticed included installation of the UberDrupal installation profile for Ubercart, planning of product SKUs, and mass import of nodes from CSV files. It's all good stuff.

In the end, my shopping site works, and that's the best praise I can give DEU. I've no doubt that the book saved me a boatload of time in figuring out what needs to be considered and configured in the creation of an online store.

Hold on – I should say that my store works in theory. The products aren't real, and I haven't yet put credit card payments and so forth through proper testing yet. (For that same reason, I'm not making the store public yet, either. Sorry, but I think it's best that strangers not poke around into a payments-enabled site until I know it's safe for all.)

But what I have so far – a working catalog, complex product options, bundled sets of products, recommendations, detailed reports, a nice-looking cart with images, and more options for shipping and payment than I know what to do with – is mighty impressive. For anyone new to Ubercart (and even to Drupal), the time you'll save through DEU's helpful guidance will more than recoup the book's cost. I call this a nice addition to the growing library of Drupal documentation available to beginners.



Christopher Dunn's picture

I too have gone through a similar process as yourself although I came to this book as a true newbie and was my first experience in using drupal. 

Whilst I found the book very useful, and am still using it for fine tuning my site, there are certain areas that for a newbie nearly drove me to a tearing hair out phase. Chief among these was the use of the node_import module, you mentioned the problem with the image field needing a slash but the module as is would not work for me until some editing of the file, which for an absolute newbie was high level stuff indeed! Also there are loads of limits on the type of character allowable in each field which without some guidance turned into more time wasted searching for solutions. 

For someone with a large site selling 100's of items not getting this module to work and having to add each item individually is a real pain and I would have thought that this module would have been better developed and maintained as personally it is more important than having something like UPS integration. Anyway that isn't any reflection on the book but I am sure the authors found similar problems with this module but you wouldn't think so reading the book as they appeared to get it working first time! 

For a newbie I would have preferred some honesty around some of the tasks and maybe some advice around what to do if things went wrong or some guidance on issues like applying patches. The book blurb said that this was a book for newbies so I would have preferred them to treat me like one at times rather than a Drupal Ace (which I am obviously not).

drupalace's picture

Editing I don't know how you came upon that solution, but good work! 

I'm not surprised you had much more trouble with import than I did; I imagine your products had lots of fields of all different data types, while my import was just a few dozen sample products with a handful of fields each. Let your example be a helpful caution to shop builders: product import can be made to work one way or another, but the process may take much longer than expected.

Thanks for the input!

izdelava strani's picture

I give up on Magento, so moving to ubercart with this book was a breeze :)

Add new comment