What's a solution in Drupal Commerce to create an order per product in cart during the checkout?

The cart looks like this:

  • Product A, Quantity: 2, $100
  • Product B, Quantity: 1, $199

Total: $399

The order-output should be:

  • Order #1: Product A, Quantity: 2, $100, Total: $200
  • Order #2: Product B, Quantity: 1, $199

So instead of the usually created single order that contains all products in the cart, the goal is to create an order per product in the cart.

Could a checkout rule solve this? Or a custom module, and if, how?

1 Answer 1


As you now,by default drupal add to cart form add all products to the same order.

Looking at the code of commerce_cart.module, the base and unique behaviour of commerce_cart module, it doesn't works in other way. When a product is add to cart, the order associated will be the same order or a new order.

If you want to decouple the line items in two different orders in cart page you will have to code a module based in commerce cart with that feature.

You can take a look to this module, it maybe helps you https://www.drupal.org/project/commerce_cart_multiple

  • Thanks, Omar. I've checked the Cart Multiple, but as far as i can say, it takes the same problem to multiple instances and confuses the end-user. I've had a Checkout rule with a loop in mind, but I don't know if that works.
    – xinxin
    Sep 27, 2017 at 18:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.