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 a 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
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.
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 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 Drupal team 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!