<?php
/** @var \Magetop\Advancepreview\Block\CustomProduct $block*/
$previewId = $block->getRequest()->getParam('preview_id',0);
$preview = $block->getPreviewById($previewId);
?>
<?php if($preview != null) : ?>

    <?php $previewData = $preview->getData(); ?>
    <?php foreach ($previewData as $key => $value) : ?>
        <input type="hidden" name="preview_pro[<?php echo $key ?>]" value="<?php echo $value; ?>">
    <?php endforeach; ?>
<?php endif; ?>
