I have created additional tab in PDP page.

My tab content


    $product = $block->getProduct();
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $mediaUrl = $objectManager->get('Magento\Store\Model\StoreManagerInterface')
      $mediaUrlSheet = $mediaUrl."catalog/product/file/specfile/" . $product->getData('sheet');

    <?php if($mediaUrlSheet && $product->getData('sheet') != ''){?>
    <a href="<?php echo $mediaUrlSheet ?>" target="_blank"><img src="<?php echo $mediaUrl.'wysiwyg/expandview.png'?>"></a>
    <iframe src="<?php echo $mediaUrlSheet ?>" style="width:100%; height:305px;" frameborder="0">
    <?php } ?>

I can able to see the file in Desktop view but failed to display in responsive.

Please provide me a solution

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.