Useful Drupal 8 modules for your Drupal Commerce shopping cart

Useful Drupal 8 modules for Drupal Commerce shopping cart

Every store owner dreams that their shopping cart stay full of goods and successfully proceeds to checkout. There are some general shopping cart tips to achieve this. Today, we will focus on Drupal Commerce stores that have many ways to make your cart convenient and attractive. To implement them, there are useful Drupal 8 modules for your  Drupal Commerce shopping cart, which we will review right now.

The built-in Drupal Commerce shopping cart

Drupal Commerce 2.x for Drupal 8 online stores comes with a full-fledged shopping cart. It offers an add-to-cart form, which allows customers to add and remove goods.

The add-to-cart form is customizable and fieldable. It is found on the "Manage form display" tab of the “Order item types” section. You can enable the product quantity field, the unit price field, and add more fields.

The form can be attached to content types as referenced entity, so that you can, for instance, post articles with the option to buy a product.

Drupal Commerce 2 offers a shopping cart as a block that can be put anywhere on your website. The shopping cart contents can show on every page. The cart can also be customized via Drupal 8 core Views.

HTML and CSS can further customize its display. Finally, extra features can be added by contributed modules.

Useful Drupal 8 contributed modules for Drupal Commerce shopping cart

Commerce Cart API

The Commerce Cart API module was introduced at Drupal Europe in Darmstadt by its creator, Matt Glaman of Commerce Guys. In his speech “The road to a headless Drupal Commerce future” he emphasized the importance of JavaScript-based e-commerce solutions.

As Matt also wrote in his article, the Commerce Cart API module improves the shopping experiences by providing users with progressively decoupled components.

The module offers lightweight RESTful endpoints for dynamic shopping cart interfaces. Its default implementation is the Commerce Cart Flyout module.

Commerce Cart Flyout

The Commerce Cart Flyout module uses progressive decoupling principle to give users modern cart update experiences.

It provides a flyout sidebar that shows whenever a user clicks on the shopping cart block or presses the “add to cart” button. The user can view the cart contents, change the product quantities, or remove products without the page reload.

The module’s JavaScript logic is built on Backbone.js and Underscore.js, which provides for a very clean structure. According to Matt Glaman, they were chosen because they ship with Drupal core. The module is highly customizable and offers nine ready Twig templates.

Commerce Ajax Add to Cart

The Commerce Ajax Add to Cart for Drupal Commerce shopping cart is a popular module with 25,420+ total downloads, but it is in the beta stage for Drupal 8. With it, the add-to-cart actions are performed using AJAX. The shopping items are updated with no page refresh, and a popup message shows when a new product is added.

Ajax Add to Cart

Here is another module that ajaxifies the process of adding products to cart. This is the Ajax add to Cart module for Drupal 8 shopping cart. When a user adds a product, a popup is instantly generated, and the shopping items are updated.

Commerce Variation Cart Form

The Commerce Variation Cart Form module provides an add-to-cart form for individual entities of product variations. The form is added to product variations as a field.

This is useful when you need to display individual entities with its own add-to-cart functionality. You can also replace the standard Drupal Commerce add-to-cart form with them.

Commerce Add To Cart Link

With the Commerce Add To Cart Link Drupal 8 module for Drupal Commerce shopping cart, you can have the 'add to cart' field as a link instead of a form. A common use case is to display the link on product listings (overviews, related products, and so on).

The link is rendered via Twig template, which lets web developers feel free in customization. The module has a submodule Commerce Add To Wishlist Link that provides a link for adding products to your wishlist with the Commerce Wishlist module.

Commerce Combine Carts

The Commerce Combine Carts combines multiple shopping carts of the user into one. The module is in the beta version for Drupal 8.

It works in two ways:

  • combines all of a user’s order items into this user’s main shopping cart
  • combines all of a user’s shopping carts into one when the user logs in

Let’s shape your Drupal Commerce shopping cart and whole store

Our ecommerce development agency is ready to help you use these and other modules, or create custom ones for your Drupal Commerce shopping cart. We can also build you a Drupal 8 online store from scratch or optimize your existing one. Contact us!

6 votes, Rating: 3.3

Read also


Drupal 8 has dozens of useful performance optimization modules. Today, we are pleased to discuss a new tool to speed up Drupal sites — the Quicklink module in Drupal 8. Using the example of its...


Drupal 8 websites can easily exchange data with third-party websites or apps. Web services in Drupal 8 core take care of the smooth interaction. To share Drupal data, developers often use REST...


Various forms are the heart of website’s interaction with the user. So form building tools are in demand — the Drupal Webform module ranks 7th on the 42,000+ list of contributed modules. The...


Everyone loves attractive layouts for web pages. Luckily, Drupal has plenty of awesome page building tools. Our Drupal team loves to take the best of them from our arsenal, combine them when...


What is the first thing that grabs your attention when you visit an E-commerce website? No doubt it is the website’s design and appearance. Which E-commerce themes are the best? Don’t worry....

Subscribe to our blog updates