Avoid combining products in cart With Drupal 8 / Drupal Commerce 2, I can't find a way to disable product combining in cart (same products in cart appears on the same line with quantity > 1). In my use case I never want this to happen.

I found that in

/modules/contrib/commerce/modules/cart/src/Form/AddToCartForm.php


...we have a submitForm method which calls

$this-&gt;cartManager-&gt;addOrderItem($cart, $order_item, $form_state-&gt;get(['settings', 'combine']);


So it seems like my form needs to have a combine variable set to FALSE.

How could I set this variable or override

public function addOrderItem(OrderInterface $cart, OrderItemInterface $order_item, $combine = TRUE, $save_cart = TRUE);


...in

/modules/contrib/commerce/modules/cart/src/CartManagerInterface.php


...to define the default value of $combine to FALSE ?

Thanks
I could achieve this by implementing hook_form_alter on add to cart form (in a custom module) and setting combine like this :

$form_state-&gt;set(['settings', 'combine'], FALSE);