Close

Pictures are not displayed inside plugin until you scroll the page

Jcomp
5 years ago
#16086 Quote
Avatar
  • 14
Hi,

I'm trying to get Sale of the Day working and got a problem that pictures are not displayed until user scroll the page;

I think because of lazy loading picture and for some reason, it is not considered as the picture in the current viewport.

Demo: http://gamma.monety.com.ua
Jcomp
5 years ago
#16091 Quote
Avatar
  • 14
As workaround following could be used:

(function ($) {
    $(document).ready(function () {
        var owl = $('.owl-carousel');
        if (owl.length > 0) {
            // Listen to owl event initialized:
            owl.on('initialized.owl.carousel', function (event) {
                // Hook loadImagesOnScroll to lazy load image in owl carousel
                window.sevenSpikesCore.loadImagesOnScroll();
            });
        }
    });
})(jQuery);


Is there any better solution?
nikola.dragiev
5 years ago
#16126 Quote
Avatar
  • Moderator
  • 154
Hello,

There is a setting that disables the lazyload of the images. You can disable it by going to Configuration -> Settings -> All Settings (Advanced) and search for that setting: sevenspikescommonsettings.lazyloadimages.
Best regards,
Nikola Dragiev
Nop-Templates.com
Jcomp
5 years ago
#16132 Quote
Avatar
  • 14
Well, thanks. But that is not what I'm trying to achieve. I'm just trying to say that lazy loading images suppose to work and there is a bug in Nop Sale of the Day component which needs to be fixed.
anton_ivanov
5 years ago
#16137 Quote
Avatar
  • Moderator
  • 277
Hello,

I don't see an issue with the Sale of the Day on your store. Could you demonstrate it to me?

The promotion loads and after that the pictures are loaded but you don't have to scroll for them to be loaded.
Furthermore, the Owl carousel will not be loaded unless it is in the visible part of the page.

It would be really helpful if you could demonstrate the issue for us so we can inspect it and fix it.
Regards,
Anton Ivanov
Nop-Templates.com
Jcomp
5 years ago
#16138 Quote
Avatar
  • 14
Hello Anton,

Please check http://gamma.monety.com.ua/ now.

As you can see the Nop Sale of the Day is loaded but pictures are not displayed. Try to scroll page and you will that images are shown.

My view on the problem is: sevenSpikesCore.loadImagesOnScroll() is called before owl.carousel is initialized.
anton_ivanov
5 years ago
#16148 Quote
Avatar
  • Moderator
  • 277
Hello,

I see the issue now. Thank you for reporting this!

I will respond to this thread when the issue is fixed.
Regards,
Anton Ivanov
Nop-Templates.com
anton_ivanov
5 years ago
#16151 Quote
Avatar
  • Moderator
  • 277
Hello,

Can you try to update the Sale of the Day plugin and Emporium theme to the latest version?

You can read more on how to update a theme in this article from our documentation.

Hope that helps!
Regards,
Anton Ivanov
Nop-Templates.com
Jcomp
5 years ago
#16160 Quote
Avatar
  • 14
Hello,

I've downloaded and installed NopEmporiumTheme_4.2.370.30389 and bug is still there :-(
anton_ivanov
5 years ago
#16170 Quote
Avatar
  • Moderator
  • 277
Hello,  

Can you submit a ticket with Admin Credentials and FTP Access to your store so we can investigate this issue?
Regards,
Anton Ivanov
Nop-Templates.com