1

I need to get bundle products from cart, and than I need to get the selected items of every bundle product. ?

1
  • Do you want to get it in a custom module?
    – Ravi Soni
    Commented May 17, 2019 at 9:59

1 Answer 1

1
use Magento\Checkout\Model\Session;

public function __construct(
    ...
    Session $session
    ...
) {
    ...
    $this->_session = $session;
    ...
}

public function yourFunction()
{
    $items = $this->_session->getQuote()->getAllVisibleItems();
}

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.