0

for a single product, I am using

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$quote = $objectManager->create('Magento\Checkout\Model\Cart');
$params['qty'] = 2;
$quote->addProduct($_product, $params)->save();

now, how can I add group and bundle products to the cart?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.