How to get configurable option value of added product in wishlist in magento2.

$collection = $this->_wishlistCollectionFactory->create()

            $wishlistData = [];

            foreach ($collection as $_item) {
            $product = $this->_productRepository->getById($_item->getProductId());
            echo "<pre>";print_r($product->getAttributeText('size'));

I don't think that using the code:


You cannot get your select size options.

$_item->getBuyRequest()->getSuperAttribute() for getting selected options.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.