I tried to add a product to cart programmatically, but it should be in different line with other product in the cart.
I already tried the code below but it only adds a product to cart and adds the qty if there's same product in the cart. How can I make it to a new line rather than add the qty?
Add product code :
$cartObj = $objectManager->create('Magento\Checkout\Model\Cart'); $cartObj->addProduct($_product,$params); $cartObj->save();