Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Image

Drupal E-commerce With Ubercart 2.x 65

Michael J. Ross writes "In the past, a Web developer tasked with building an online store would most likely do so using a dedicated e-commerce system, instead of a content management system (CMS), because even though the leading CMSs offered more features and flexibility, they did not provide robust e-commerce capabilities, such as product listings, bulk import, pricing in multiple currencies, a built-in shopping cart, and integration with tax and shipping information sources. Since that time, e-commerce systems have become more like CMSs, by adding features such as blogging and forums. At the same time, CMSs are continually expanding their e-commerce potential, usually in the form of developers adding plug-ins. For developers using Drupal, there traditionally have been two major e-commerce plug-ins (known as "modules"): Ubercart and e-Commerce. The former has emerged as the leader, and is explored in Drupal E-commerce with Ubercart 2.x." Read on for the rest of Michael's review.
Drupal e-commerce with Ubercart 2.x
author George Papadongonas and Yiannis Doxaras
pages 364 pages
publisher Packt Publishing
rating 7/10
reviewer Michael J. Ross
ISBN 978-1847199201
summary A detailed guide to using Drupal and Ubercart to make a virtual store.
This book was published by Packt Publishing on 22 March 2010, under the ISBN 978-1847199201. (My thanks to the publisher for a review copy of the book.) On the publisher's page, visitors will find detailed information about the book, a table of contents, a sample chapter in PDF format (Chapter 9, "User Interface Enhancement Techniques"), errata (only three reported as of this writing), and links to purchase either the print or electronic versions of the book, or both at a large discount. The authors of this title, George Papadongonas and Yiannis Doxaras, are experienced open-source developers. They both reside in Greece, which may explain why the reader will stumble upon — and sometimes over — many oddly-formed phrases throughout the book, as though they had been written in a foreign language initially, and then translated into English. More on that later. Nonetheless, almost all of the material presented within the 364 pages can be clearly understood by anyone who is comfortable with the basic terminology of e-commerce and Drupal. The authors have their own website for the book, yet oddly it isn't mentioned anywhere in the text.

The book is organized into ten chapters and three appendices. The first chapter is a brief introduction to Drupal, Ubercart, and the test case used in the early chapters — in this case, a store selling electronics online. Chapter 2 explains how to install the minimum required Web technologies, Drupal, Ubercart, and related contrib modules — either individually or using packages such as XAMPP for the Web server and the UberDrupal installation profile for Ubercart. The authors recommend the use of the Thickbox module for lightbox functionality, but that one has since been superseded by the Colorbox module. The reader is told that the extra modules listed on pages 34-35 do not need to be installed immediately, but will be installed in each chapter as required; but this is misleading, because in later chapters the readers will discover repeatedly that they were not told when to install the modules. Readers may be puzzled as to whether or not they are expected by the authors to use UberDrupal, but it is of no consequence, because the end result is the same, namely, the Ubercart site is ready for configuration.

The third chapter covers basic configuration of both Drupal and Ubercart, and begins with a thorough introduction to the admin area of Drupal. Experienced Drupal users could skip most of the first three chapters — aside from the list of needed contrib modules on pages 31 and 32. In the brief section on downloading and installing Ubercart, the authors advise the reader to enable the core modules, but unfortunately provide no guidance on any of the optional ones that should be enabled so the reader can easily follow the test case in the book. The reference on page 48 to "path/x" (where x is a node identifier) is perplexing, because the authors fail to explain what they mean by 'path', since its literal use is invalid, and no directory path is presented. Also, they state that the default Drupal temporary directory (/tmp) does not need to be changed, but that is not true for Windows users who want to use an existing directory, such as C:\DOCUME~1\[username]\LOCALS~1\Temp (where [username] is their current Windows username). The cart settings on page 55 show four panes, instead of the two that will be seen by readers who have followed the authors' instructions exactly up to this point. A similar problem is encountered on page 65, because the text assumes that the reader has enabled product kits, although Chapter 2 recommended otherwise. The "Product features" pane is skipped, without any apparent reason. In general, the authors' coverage of the configuration settings provide little information beyond what is already explained on the settings forms themselves; this chapter would have been much more beneficial had the authors explored the typical cases in which the reader would want to change the settings, and the benefits of doing so.

The material becomes more interesting with Chapter 4, which gets into the details of managing categories, subcategories, products, and attributes. The authors begin by showing how to enhance products using both admin-created and user-generated tags for products and product kits. Yet in describing the latter type, a critical step in the process is neglected, namely, enabling the "Tags" setting. The reader is then told to create a couple sample products, and combine them into a product kit, which is a straightforward process in Ubercart — although some readers may initially be puzzled by the instructions to go to a Web page on the site http://www.mysite.com/ (also on page 106). More odd is the example product kit having a name of just a single component and a description consisting only of the other component's name. Readers learn how to bulk import a large amount of product data. In the process, we are instructed to "enable this module" (page 89), when actually all three modules need to be enabled. Also, no reason is given as to why the authors opted for the directory name "import" over the module's better default of "imports." The second figure on page 97 shows the first imported record not as a formatted product entry, but as PHP code, which is probably not what was intended. The next topic — product attributes — is important, because any shopping cart system that lacks flexible and powerful attribute management capabilities may appear at first glance to be a workable choice for creating an online store, but eventually those deficiencies will make it difficult if not impossible to implement the e-commerce setup desired by the store owner. The chapter is wrapped up with a brief but valuable description of the three ways to manage the products in an Ubercart site.

When it comes to shipping and packaging — the focus of Chapter 5 — far too many shopping cart systems burden the store admin with limited options and non-intuitive interfaces. Ubercart is relatively more straightforward, and the book shows how to specify destination countries, conditional actions, and shipping quotes — using flat rates, product weight, UPS, and USPS. Unfortunately, conditional actions are given little attention, and even the sample scenario is not demonstrated. This is a shame, because the topic is critical to developing an Ubercart-based store so it will automatically perform actions — such as notifying the customer — based upon a wide range of common events and conditions. Anyone planning on using the UPS shipping method should note that the registration URL provided has changed since publication of the book, but does point to the UPS Developer Kit, which has a registration link and other resources. The last section, on weight quotes, could prove baffling, because it does not match the current behavior of Ubercart in defining such a shipping method.

Properly calculating the appropriate taxes for customer orders, and accepting payments online, are two areas of e-commerce fraught with potential problems, and even greater legal risks. These are explored in the sixth chapter, which gets off to a shaky start with the claim that the overview page for "Tax rates and settings" has policies already configured, when in fact there are none. Readers learn about tax rates within Ubercart, payment workflow options, advantages and disadvantages of accepting credit cards on one's site, the configuration of payment settings, and details on the Ubercart modules available for the major gateway services — with an emphasis upon PayPal and Google Checkout. Oddly, the authors recommend that merchants outside of the United States and UK obtain VAT numbers, even though the former country does not have a value-added tax (at least, not yet). The chapter concludes with a brief overview of how to create your own payment gateway module. The authors mention that they are providing the reader with code samples for two of the most common payment gateway request methods, and yet there is no such code in the chapter, and the book has no downloadable code on the Packt Publishing website.

Chapter 7 looks at the related topics of customer management; order tracking, workflow, search, creation, and modification; and invoicing, payments, packaging, and shipping. Merchants will find much of this information collected into the reports built into Ubercart. Yet more thought should have been put into the diagrams, such as the one on page 160, which includes an unexplained asterisk in one status box, and an order going from the status of "product gathering" to a second status with the identical name. Also, the process of creating a new order as described does not match the current interface in Ubercart 2.4 (the current version as of this writing). The chapter continues with summaries of customer relationship management (CRM) in general, and CiviCRM in particular, and how it can be integrated into an Ubercart site. The authors state that the Ubercart Wish List module is part of the Ubercart "extra" list of submodules, but it is instead a separate project. Other methods of increasing sales are discussed, including newsletters, company blogs, discussion forums, and Twitter.

In some respects, the remaining three chapters can be thought of as a second part of the book, because they presume that you have completed all of the elementary components of your online store, and are now ready to customize its appearance, and begin marketing the site. Chapter 8 elucidates how to find, install, and modify a Drupal theme for your needs — as well as how to create your own, based upon the popular Zen and Fusion starter themes. The material is generally clear, except for the authors' claims that site visitors cannot "perform proper searches" using the default Drupal 6 theme (Garland), and that you the site creator "cannot interfere with UI" (whatever that means). Confusingly, pages 200 and 201 list all sorts of advanced theme configuration settings for Garland which don't exist. The chapter finishes with a demonstration of how to create a new Drupal theme from either a static HTML site or a Photoshop template (despite an earlier claim that the chapter would end with a reference to the Fusion Theming System, which is absent).

Chapter 9, "User Interface Enhancement Techniques," shows you how to improve an Ubercart-based site using taxonomies and recommendation systems (for product cross-selling), the Panels and Views modules (for greater flexibility in information display), discounts, and other techniques. This discussion has more wheat than chaff versus the earlier chapters, probably because the authors are exploring higher-level methods, and not stepping the reader through forms. But again, configuration settings are mentioned that will not be seen by the reader, evidently because the authors do not provide timely instructions as to the modules to install and enable, such as XML Sitemap (page 231).

The final chapter first explores a host of Drupal contrib modules aimed at online promotion, and then shows how to improve a site's security with backups, security reviews, and spam blocking. The final material comprises three appendices, covering a hotel booking system, lists of the modules used in the book, and some of the free and paid themes suitable for an Ubercart site.

The book contains numerous errata: "contributed systems" (page 1; should read "contributed modules"), "innovated" (page 7; should read "innovative"), "constrains" (page 7; should read "constraints"), "hundreds and thousands" (page 8; should read "hundreds of thousands"), "It is [a] social media ready" (page 8), "brooking" (page 10), "flash animated" (page 10; should read "Flash-animated"), "depreciated" (page 20; should read "deprecated"), "[the] Drupal installer" (page 27 twice, and 28), "[the] time zone" (30), "their home page[s]" (32), "to [the] site" (48), "such [a] service" (58), "customer [to] enter" (65), "ipod" (80), ."com//node" (86), "types or files" (88; should read "types of files"), "know, exactly" (106), "it it" (111), ", [the] shipping rate" (112), "charge[s] you" (128), "customers['] geographic locations" (132), "statements[,] discussed" (134), "logics" (134). That last one — an amusing non-word — seemed a "logical" and thus appropriate place to stop recording errata, even though I had yet to reach the halfway point in the book.

Earlier I noted that many of the phrases — and entire sentences — are awkwardly constructed. A few of them are unintentionally humorous, such as the phrase "to mess with" getting turned into "to mess up with" (page 205), and the phrase "a check for the balance" getting shredded into "a balanced check" (page 147) — which immediately brings to mind the question, What would be an unbalanced check? This problem worsens as the book progresses; by page 244, "caching time" has been shortchanged into "cashing time," and "number-one ally" has melted into "number-one alloy" (page 292). Some of the problems are present in all the chapters. For example, in countless places, the words "the" and "a" are needed but missing. While programming books generally are known for being grammatically and stylistically weak, there is no excuse for releasing a book to press that has not been thoroughly proofread. The same is true with regards to the technical editing of such a volume prior to publication. Throughout the book, URLs are missing the root directory "/" (which generates an error from the server). In most if not all places where the reader is told to leave a page's settings unchanged, he is then told to click the "Save configuration" button (before going on to the next page) — which is completely unnecessary and a waste of time.

But these are not the flaws of greatest importance. There is too much emphasis throughout this book on how to fill out form fields that are fairly obvious, and yet the most important subject matter is oftentimes glossed over. For instance, the topic of conditional actions arguably deserves its own chapter, or at least an extended section — not one and a half pages up front, and then several paragraphs later. A few key e-commerce topics are absent. A glaring example of this is the lack of discussion of how to sell digital products in one's store, which nowadays is important enough to warrant its own chapter. Subscription services (typically with recurring payments) is another worthy topic completely skipped. These deficiencies may be due to the authors' focus on explaining the admin pages and settings found within the basic Ubercart modules, rather than a much more pragmatic approach of exploring the steps needed to reach a goal (e.g., selling downloadable files) regardless of what modules are utilized. Admittedly, Ubercart and all of its constituent modules comprise enough details and moving parts that could justify a book of greater length. Yet room could have been made for those details and advanced topics by spending less time describing (obvious) form fields. Lastly, if the authors had expected the reader to be able to follow their instructions throughout the book, they should have made it more clear as to which modules and options should be enabled at each step.

Nonetheless, the authors have clearly put a lot of effort into making what could be an extremely dry subject more approachable, as they take the reader through the major phases of building a typical online store for selling physical goods. Offering complete explanations and plenty of screenshots, this book could be a valuable resource — as both tutorial and reference — for Web designers, developers, business owners, and anyone else involved in creating a Drupal/Ubercart e-commerce website.

Michael J. Ross is a freelance website developer and writer.

You can purchase Drupal e-commerce with Ubercart 2.x from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

*

This discussion has been archived. No new comments can be posted.

Drupal E-commerce With Ubercart 2.x

Comments Filter:
  • Past? What "past"? (Score:4, Interesting)

    by iamhassi ( 659463 ) on Wednesday September 22, 2010 @02:23PM (#33666242) Journal
    "In the past, a Web developer tasked with building an online store would most likely do so using a dedicated e-commerce system, instead of a content management system (CMS)"

    Exactly how far in the past are you talking, because MonsterCommerce [juggle.com] (bought by NetworkSolutions (yuck)) has been offering a e-commerce storefront CMS since 2000. [freebase.com]
  • Re:So... (Score:3, Interesting)

    by Tyler Eaves ( 344284 ) on Wednesday September 22, 2010 @03:04PM (#33666824)

    Uh, at least your first two points are flat out in accurate...as for the second, I'll agree memcache is important, but that's a lot more to do with database performance than drupal. We're serving on average 950k-1.1M views a day off a quad core web server and a dual core db server. That's more than acceptable to me.

    Is it as tight as if we'd written everything by hand? Of course not, but if we had not been able to build on the framework and contributed modules, it would have taken us years to develop instead of 6 months. Newsflash: Configurability and generality cost CPU cycles. CPU is cheaper (MUCH cheaper) than programmer time.

  • by FuckingNickName ( 1362625 ) on Wednesday September 22, 2010 @03:05PM (#33666842) Journal

    ...are all equally unnecessarily complicated and bloated, and I've done just fine with straight C, Perl and LISPesque variants, good coding practice and in-house development, just as I have since 1996.

    I remember as a new professional developer the first time I entered a meeting where someone started spouting buzzwords to describe the hip framework of the day, his boss nodding emptily and the more senior developer looking on with the bemused eyes of a mental facepalm. I, meanwhile, bust out uncontrollably with laughter and had to be excused from the meeting, my laughter accurately reflecting the eventual success of the buzzword-based proposals.

    Ever since then, I have worked by the principle that no amount of Lego will build you an great home.

  • Re:So... (Score:1, Interesting)

    by Anonymous Coward on Wednesday September 22, 2010 @03:41PM (#33667364)

    "but that's a lot more to do with database performance than drupal"

    In over nine thousand years of dealing with Drupal, I keep hearing this excuse. In over nine thousand years of dealing with Drupal, the only database performance problems I've run into are Drupal core doing something stupid, third party module developers doing something stupid, or far more rarely people not comprehending that as databases grow larger and larger, they need more powerful (re: MOAR RAM NAO) hardware.

    MySQL (the de facto standard of Drupal) can be blamed for a great many things. PHP rockstars with no clue how to write efficient SQL being allowed to write SQL anyway, is not one of them.

    Regardless, I shudder to think of a Drupal site of any size being run without memcached.

  • Drupal hell. (Score:3, Interesting)

    by unity100 ( 970058 ) on Wednesday September 22, 2010 @03:52PM (#33667494) Homepage Journal
    the month i have had to work on a drupal site has been the most horrible month in my web development career. if there is any more developer hostile code than drupal code, it is probably magento.

    to change a single form's design, you had to install a module. or, you need to go through core files of the mess that is called drupal, and change them. supposedly, it has a template system. but, some elements are still hardcoded. not to mention that, there are css items that are defined in the core modules of drupal, forcing you to go mess with them instead of doing changes just in the template css. this is just one of the examples of horror while developing on drupal.

    i cant think that anyone development-sane would want to take on doing a serious ecommerce store with this pile of crap. of course, fans and zealots, aside.

    http://amplicate.com/hate/drupal [amplicate.com]
  • Re:Drupal hell. (Score:3, Interesting)

    by Maudib ( 223520 ) on Wednesday September 22, 2010 @05:28PM (#33668866)

    Magento's not unfriendly, its just undocumented. Everything is by configuration/convention. This makes for a very modular and logical system that is entirely unfathomable without documentation. Its a java spring application in a php applications body.

  • Re:So... (Score:3, Interesting)

    by cayenne8 ( 626475 ) on Wednesday September 22, 2010 @05:32PM (#33668912) Homepage Journal
    "I go back to Postres every now and then, but find that some module that I want to install only provides code for MySQL, and I end up having to go back. Most of the major modules will support either, but I've found a lot of "it'd be cool to have that" modules don't. YMMV."

    Thanks for the reply...can you give any specific examples off the top of your head of modules that wouldn't play nice with anything but MySQL?

Never test for an error condition you don't know how to handle. -- Steinbach

Working...