2

I am facing this uncaught type error in swatch-renderer.js on listing page in magento 2.3.6

Till now i have tried 2 solutions but no luck: 1: added following lines catalog_category_view.xml

<referenceContainer name="content">
            <container name="product.info.media" htmlTag="div" htmlClass="product media" after="product.info.main">
                <block class="Magento\Catalog\Block\Product\View\Gallery" name="product.info.media.image.gallery" template="Custom_Product::product/view/gallery.phtml"/>
                <block class="Magento\ProductVideo\Block\Product\View\Gallery" name="product.info.media.video" after="product.info.media.image" template="product/view/gallery.phtml"/>
            </container>
        </referenceContainer>

2: swatch-renderer.js

if (isInitial) {
    if ($.isFunction($(this.options.mediaGallerySelector).AddFotoramaVideoEvents)) {
        $(this.options.mediaGallerySelector).AddFotoramaVideoEvents();
    }
}

i have been facing this issue for a long time.

enter image description here

1
  • Have you ever figured this out?
    – Crim
    Sep 25, 2022 at 2:09

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.