By travis_wc on Aug 16, 2023 2:32pm
Drop in Cart

Drupal Commerce is a powerful open-source e-commerce solution powering over 50,000 online stores. Drupal Commerce integrates with the Drupal content management system through modular design. This platform provides unlimited potential with native features and module extensions, including integration with third-party commerce and digital applications. In this blog post, we will guide you through the process of getting started in setting up and optimizing Drupal Commerce.

What is Drupal Commerce?

Drupal Commerce is an e-commerce suite built for the Drupal framework. It offers various functionalities such as product management, order management, payment processing, and shipping management. Being open-source, it provides complete control over your e-commerce site and has robust community support. There are over 300 Drupal Commerce-specific modules to help with payments, shipping, and other services.

Benefits of Drupal Commerce

Drupal Commerce comes with several benefits:

  • Open Source: This allows for complete control over your e-commerce site.
  • Community Support: A world of support is available at your fingertips.
  • Modern Framework: It can cater to modern applications.
  • Scalability: Drupal Commerce scales with your business.
  • Customization: The platform supports extensive customization, from layout design to functionality.

Setting Up Drupal Commerce

Here's a step-by-step guide to getting started with Drupal Commerce:

Step 1: Install Drupal Commerce

The first step is to install Drupal Commerce on your Drupal site. You can do this by downloading the latest version of Drupal Commerce from the official website and following the installation instructions. But, the best way to manage Drupal modules is to use Composer. Composer is a dependency management tool for PHP projects. With Composer, you can install and update libraries required by your project.

In the root directory where the vendor directory resides, use composer to require Drupal Commerce:

composer require “drupal/commerce”

If installing on Drupal 10, you are likely to run into an error when running the above code. First, install any dependencies that Composer would not install. The above code could be run to include dependencies:

composer require “drupal/commerce” -W

In this case, the required module does not match minimum stability. By default, Composer only installs things that match the minimum stability. By requiring the module by version, we are able to install a module that does not match minimum stability. In this case, the Inline Entity Form module is required and there is no version that matches minimum stability. So we need to call the version required by Drupal Commerce. At this time, there are two versions available for Drupal 10. Version 1.0@RC seems to be the one Composer is attempting to install.

composer require “drupal/inline_entity_form ^1.0@RC”


composer require “drupal/commerce” -W

We can then install the module. This can be accomplished by going to the Extend link in the administration menu of the site. Searching using the filter for commerce. Check the boxes for Commerce, Commerce Cart, Commerce Product, and Commerce Checkout. Scroll down and click Install. Alternatively, Drush can be used to install the modules.

drush install commerce_product commerce_checkout commerce_cart

Other modules will also be required as dependencies. Hit enter to install them all.

Step 2: Customize Layout and Design

Drupal allows you to customize the layout and design of your site. You can choose from a variety of themes or create your own custom theme to match your branding. There are contributed themes built specifically for Drupal Commerce.

WheelerCreek Studio Inc. Can help you achieve a custom look for your site. Click here to learn more.

Step 3: Add Products to the Store

Drupal Commerce makes it easy to manage your products with features like product categories, attributes, and variations.

Products can be added under Commerce > Products. But before products can be added, a store needs to be created. Go to Commerce > Configuration > Stores. Add a store and give the store a name. Fill out the form with all relevant information and save it. If there is only one store, it will be the default.

Start adding products to your store. Go to Commerce > Products. Add the Product and give the product a name and describe the product using the body field. You will notice that there are two options for saving. Save will create the product in the database, while Save and add variations will allow you to add a variation. Example: A shirt product could come in different colors and sizes. Variations are created to address all the different combinations of product attributes. It is best to create the product and add at least one variation. Other variations can be added later. The variations are defined by a Stock Keeping Unit (SKU). This is a unique identifier for the product. This can be the SKU provided by the manufacturer of the product. If there is no existing SKU, create one. Try to organize a system for defining SKUs that makes sense and can be easily tracked. The SKU needs to be machine-readable and unique for each product variation.

By default, the product variation has only a few fields: SKU and price. The list price can also be added by clicking the checkbox. Only SKU and Price are required. Click save. Now there is at least one product and a variation. We could add fields to the Product or the Product variation such as an image or other field. If there will only be one variation, adding fields to the product could make sense. Adding fields (such as an image) to the product variation will allow for visually identifying the differences between the variations. Size, color, and other attributes will be added to the product variation.

Product attributes can be defined under Commerce > Product Attributes. Here you can name the attribute such as size or color. The default options for displaying the attribute options are select list, radio buttons, and rendered attribute. Think about how you would like the choice displayed on the product page. This is added to different variation types. Default is the only choice if product types and product variation types have not yet been created. Think of it as categories for products and product variations. An attribute can be assigned to multiple product variation types.

Save and add the names for each value selection the attribute needs. These will be assigned when creating the different product variations. For example, sizes for a shirt could be small, medium, large, x-large, and so on. You can define all the different values that might be used. Only values assigned to product variations will show up on the product page.

There is a lot to configuring a Drupal Commerce store. It takes time and planning to get it set up correctly. Let us handle it for you. Contact us and we will work with you to create the perfect commerce solution.

Step 4: Configure Payment and Shipping Methods

Finally, you need to set up your payment and shipping methods. Drupal Commerce supports a variety of payment gateways and shipping options, so you can choose the ones that are most suitable for your store. Most options provide API documentation to help correctly set up and configure them for your Drupal Commerce store.

If you need help, do not hesitate to reach out. We offer competitive pricing for theming and customizing Drupal sites.

Optimizing Your Drupal Commerce Site

Once your Drupal Commerce site is set up, it's important to optimize it for better performance, SEO, and customer experience. Here are some tips:

  • Improve Site Performance: Use caching and other performance optimization techniques to ensure your site loads quickly.
  • Optimize for SEO: Use SEO-friendly URLs, meta tags, and other SEO best practices to improve your site's visibility in search engine results.
  • Enhance Customer Experience: Make sure your site is easy to navigate, and offer multiple payment and shipping options to make shopping easy for your customers.


Setting up and optimizing a Drupal Commerce site may seem daunting, but with the right help, it is manageable. Hopefully, this guide has provided you with a solid foundation to get started. And if you need help, give us a holler. We can help you with the difficult parts and get you going.

Additional Resources

We'd love to hear from you. If you are considering using Drupal Commerce, we can help you get things set up.

Get in Touch

Want to work with us?

Get in touch