0

I have created size attribute as Text Swatch.

When you add a config product from product/category page to Wishlist, config product is added and shown in My Wishlist page.

In My Wishlist, available used/simple products of this config product are not shown by default which we can select and add to cart from wishlist itself. If I click add to cart from wishlist it takes me to product details page.

How I can show available simple sizes of this config product in my wishlist which I can select and send data to my custom controller which can be used to add this simple product to cart?

In Magento_Wishlist::item/column/cart.phtml I can get simple products this way:

if($product->getTypeId() == 'configurable') {
    $_children = $product->getTypeInstance()->getUsedProducts($product);
    foreach ($_children as $child){
        echo "Here are your child Product Ids ".$child->getID( );
    }    

Now using these simple product ids how I can get it's size swatch image like below? enter image description here

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.