Using Drupal Commerce: First Steps

Using Drupal Commerce: First Steps

The first choice to make when building an e-commerce site is whether to use Ubercart or Drupal Commerce. If you want to see how your Drupal Commerce site might function differently than an Ubercart one, you should also refer to our comparison of the two e-commerce choices. Both have strengths and weaknesses, so you might want to test each out.

One of the main issues people have with Commerce is its reliance on external modularity. However, by allowing you to choose what you want to use, Commerce is truly an extension of Drupal in the most fundamental sense. This aspect allows your site to be eclectic and limited only to what it requires.

Using Commerce Kickstart

Commerce doesn't leave you completely on your own when you’re just starting out; it has some suggestions of what you should start with. The developers show a great selection of modules in their own distribution of Drupal, Commerce Kickstart. The ability to experiment with a preset Commerce site is one benefit of using Drupal Commerce over Ubercart.

You may not want to employ Commerce Kickstart in your project from start to finish for a few good reasons. For example, you might have already developed your site and want to add some e-commerce capabilities. Additionally, after using core Drupal, some might not like the different look-and-feel that Kickstart employs. Nevertheless, you should not let this phase you and prevent you from using Kickstart at the outset.

It is helpful to use Commerce Kickstart first in order to determine what modules Commerce relies on to create an effective e-commerce site. Just by going to the ‘Modules’ page of Kickstart and scrolling through the extensive list, you will see the sheer range of modules included. You may get ideas about what you want to include on your own site. Kickstart shows you the preferred modules to use.

Commerce Kickstart provides you with a great initial site to start learning about Drupal Commerce; allowing you to see its capabilities in action. It will also show you how the modules interact with each other to make a working Drupal e-commerce website. Having this knowledge will be helpful for your own development.

Without using Kickstart, it is difficult to see how a Drupal Commerce site will come together, especially before familiarizing yourself with the support modules. By installing Kickstart’s demo store, you may tinker and figure out what parts of your own site should look like. You may also see the Drupal Commerce showcase on their own website for ideas.

Not Finding What You’re Looking For?

Inherent to the Drupal Commerce e-commerce development model is the reliance on other contributed modules to build your site. Suppose, though, that you aren't happy with the Drupal Commerce support modules available. As a developer, you should not be changing any code within the Commerce core or the contributed modules that support your e-commerce website. Simply put, workarounds and hacks are not in the long-term best interest of your site.

In such a case, you have a few choices. If you or your Drupal programmer is experienced enough, you could invest the time to create your own module from scratch. You could also try to hook into an already existing support module. If these skills are not available to you or your attempts are unsuccessful, you should turn to the Drupal community.

Perhaps you want a simple enough module that changes the way that Drupal Commerce core works. Commerce offers comprehensive API documentation for you to look through to suit your needs. For example, the API makes it easy to find how to hook into the tax rates created by other Commerce modules. If you should need help, you can always review other contributed modules to see how they took advantage of the Commerce API.

Support modules also have the ability to be hooked into. This ability is helpful if the behavior you are looking for exists, but you want to modify or add to it. In some cases, using hooks is necessary; such as when using the Drupal Commerce Shipping module. Other cases might be more specific to your own site.

If you do not have the resources or this method does not prove successful, you should try to find a module similar to what you want. If your problem is one that would help others and increase the module’s efficacy, you could post it as an issue for the module. You may receive instruction for how to go about solving it using what is already available. It is also possible that the module developers will include your suggestion in a later version that you could take advantage of.

The Bottom Line

Drupal Commerce does have a somewhat steep learning curve, which means you’ll need to devote some time to learning how to best implement it. It also has some weaknesses. It has a slightly more limited payment option system than Ubercart does. Nevertheless, you should try it out. Some people find it easier to manage than others, especially if they have experience with Drupal or are used to experimenting with new Drupal tools.