1

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

$collection = $this->_wishlistCollectionFactory->create()
                    ->addCustomerIdFilter($customerId);

            $wishlistData = [];

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

I don't think that using the code:

$product->getAttributeText('size')

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.