Product Cart – Disable Merging of Cart Positions

cartproduct

Is it possible to disable the merging of same products into one position in the cart?

So when someone adds Product ABC with Qty 1 to the cart, continues shopping and adds the same product again with Qty 2, Magento merges/sums the two products into one position with a Qty of 3.

I’d like to have 2 cart positions with Product ABC with their respective quantities. Is that possible?

The only thing I was finding while looking through the code was Mage_Sales_Model_Quote::merge, but that doesn't seem to be the right method as it handles merging the carts from a former session after logging in.

Thanks a lot!

Best Answer

You can just add an option to the product in the event sales_quote_add_item:

$data['microtime'] = microtime(true);

$product->addCustomOption('do_not_merge', serialize($data));
$item->addOption($product->getCustomOption('do_not_merge'));