문제

On product page the below console error showing i just set fullscreen=false gallery.phtml

enter image description here

  <script type="text/x-magento-init">
    {
        "[data-gallery-role=gallery-placeholder]": {
            "mage/gallery/gallery": {
                "mixins":["magnifier/magnify"],
                "magnifierOpts": <?= /* @escapeNotVerified */ $block->getMagnifier() ?>,
                "data": <?= /* @escapeNotVerified */ $block->getGalleryImagesJson() ?>,
                "options": {
                    "nav": "<?= /* @escapeNotVerified */ $block->getVar("gallery/nav") ?>",
                    <?php if (($block->getVar("gallery/loop"))): ?>
                        "loop": <?= /* @escapeNotVerified */ $block->getVar("gallery/loop") ?>,
                    <?php endif; ?>
                    <?php if (($block->getVar("gallery/keyboard"))): ?>
                        "keyboard": <?= /* @escapeNotVerified */ $block->getVar("gallery/keyboard") ?>,
                    <?php endif; ?>

                        "arrows": true,
                        "swipe": true,


                        "allowfullscreen": false,


                        "showCaption": false,

                        "width": "<?= /* @escapeNotVerified */ $block->getImageAttribute('product_page_image_medium', 'width') ?>",
                        "maxwidth":"430px",
                        "thumbwidth": "<?= /* @escapeNotVerified */ $block->getImageAttribute('product_page_image_small', 'width') ?>",
                        <?php if ($block->getImageAttribute('product_page_image_small', 'height') || $block->getImageAttribute('product_page_image_small', 'width')): ?>
                        "thumbheight": <?php /* @escapeNotVerified */ echo $block->getImageAttribute('product_page_image_small', 'height')
                            ?: $block->getImageAttribute('product_page_image_small', 'width'); ?>,
                        <?php endif; ?>
                        <?php if ($block->getImageAttribute('product_page_image_medium', 'height') || $block->getImageAttribute('product_page_image_medium', 'width')): ?>
                        "height": <?php /* @escapeNotVerified */ echo $block->getImageAttribute('product_page_image_medium', 'height')
                            ?: $block->getImageAttribute('product_page_image_medium', 'width'); ?>,
                        <?php endif; ?>
                        <?php if ($block->getVar("gallery/transition/duration")): ?>
                        "transitionduration": <?= /* @escapeNotVerified */ $block->getVar("gallery/transition/duration") ?>,
                        <?php endif; ?>
                        "transition": "<?= /* @escapeNotVerified */ $block->getVar("gallery/transition/effect") ?>",
                        <?php if (($block->getVar("gallery/navarrows"))): ?>
                            "navarrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/navarrows") ?>,
                        <?php endif; ?>
                        "navtype": "<?= /* @escapeNotVerified */ $block->getVar("gallery/navtype") ?>",
                        "navdir": "<?= /* @escapeNotVerified */ $block->getVar("gallery/navdir") ?>"
                    },
                "fullscreen": false,
                "breakpoints": <?= /* @escapeNotVerified */ $block->getBreakpoints() ?>
            }
        }
    }
</script>
도움이 되었습니까?

해결책

fullscreen should be an object, since you have set it to a boolean value, it is giving error. Try setting like this:

"fullscreen": {},
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top