6

I am using Weltpixel Quick View extension and it is working fine.But there is an issue when products loads using infinite scroll.After loads products using infinite scroll , quick view stops working.There is an issue related to the JS function.Can you guys let me know which quick function i have to use in the infinite scroll JS file?

This is my URL: http://45.56.70.30/pospaper/thermal-paper-rolls/all-thermal-paper.html You can check from here.Once the products loads , quick view stops working.

I am using Strategy Infinite Scroll. https://github.com/Strategery-Inc/Magento2-InfiniteScroll This infinite scroll also working fine.

Infintie scroll Js file path:

https://github.com/Strategery-Inc/Magento2-InfiniteScroll/blob/master/view/frontend/web/js/infinitescroll.js

Weltpixel Quick View JS file

http://45.56.70.30/pospaper/weltpixel_quickview.js

This is the script which used in phtml file.

<script>
    requirejs(['jquery', 'weltpixel_quickview' ],
        function   ($, quickview) {
            $(document).ready(function() {
                $('.weltpixel-quickview').bind('click', function() {
                    var prodUrl = $(this).attr('data-quickview-url');
                    if (prodUrl.length) {
                        quickview.displayContent(prodUrl);
                    }
                });
            });
        });

    window.weltpixel_quickview = {"baseUrl":"http:\/\/45.56.70.30\/pospaper\/","closeSeconds":"5","showMiniCart":"1","showShoppingCheckoutButtons":"0"};
</script>

2 Answers 2

3

I am also using infinite scroll on category pages and search result page. I have managed to work by changing the following file:

app/code/WeltPixel/Quickview/view/frontend/templates/initialize.phtml

Replacing the whole code with below code:

<?php
// @codingStandardsIgnoreFile

/** @var $block \WeltPixel\Quickview\Block\Initialize */
?>
<script>
    requirejs(['jquery', 'weltpixel_quickview' ],
        function   ($, quickview) {
            $(document).ready(function() {
                $('#maincontent').on('click', '.weltpixel-quickview', function() {
                    var prodUrl = $(this).attr('data-quickview-url');
                    if (prodUrl.length) {
                        quickview.displayContent(prodUrl);
                    }
                });
            });
        });

    window.weltpixel_quickview = <?php /* @escapeNotVerified */ echo \Zend_Json::encode($block->getConfig()); ?>;
</script>
0
-2
  1. First I installed the Scroll.
  2. After that the Quickview with that changing.
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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.