I want to show product details on popup using controller.

So how is it possible?

$htmlCatInfo = $layout->createBlock(
                ['data' => ['itemid' => $itemid]]

Any one can tell me how can I manage data .phtml to block

1 Answer 1


In the block class you can load the product using the itemId data from repository https://www.mageplaza.com/devdocs/how-get-product-id-sku-magento-2.html and after that you can create the phtml content according to the output which you want to show..

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.