I am working on a module where I need to get a product's bundle items information as it is displaying in the Product display page.

For product display Page the option are available through options.phtml

<?php /** @var $block Magento\Bundle\Block\Catalog\Product\View\Type\Bundle */ ?>
$product = $block->getProduct();
$helper = $this->helper('Magento\Catalog\Helper\Output');
$stripSelection = $product->getConfigureMode() ? true : false;
$options = $block->decorateArray($block->getOptions($stripSelection));

how can I get the same in my php file?

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.