Home Forums WoodMart support forum prevent lazy load

prevent lazy load

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #146212

    mitcheos
    Participant

    Hi, im using another plugin for the checkout. The lazyload feature is having issues with the images. Is it possible to disable lazy load for the checkout pages?

    Thanks

    #146245

    Hello,

    You can disable the lazy load feature for the checkout pages. Try to add the following PHP code snippet to the child theme function.php file to do this

    function woodmart_disable_lazy_on_page() {
        $current_page_id = get_queried_object_id();
        if ( ! $current_page_id ) {
            $current_page_id = get_the_ID();
        }
        $pages = [
            12036, 12037
        ];
        if ( in_array( $current_page_id, $pages ) ) {
            woodmart_lazy_loading_deinit( true );
        }
    }
    add_action( 'wp', 'woodmart_disable_lazy_on_page', 1000 );

    Remember one thing checkout page ID must be used in this code so it only affects the checkout page not the others.

    You can use the page id in the $page array as i used 12036, 12037 just to set an example for you.

    You can see the check out page id when you edit the page. In your case checkout page id is “12036”.

    Screenshot: https://jmp.sh/8KxVVcn

    Best Regards.

    #146925

    mitcheos
    Participant

    Hi, i tried that but its not working? Any other ideas?

    Thanks
    Mitch

    #146964

    Artem Temos
    Keymaster

    Hello,

    Could you please disable all plugins that are not related to our theme and provide us your admin and FTP access so we can check it?

    Thank you in advance

    #147438

    mitcheos
    Participant

    Hi, Thats done now. Also i have another issue when i click on my account icon nothing happens.

    #147447

    mitcheos
    Participant

    Sorry i mean when i click on the wishlist – it doesnt show the wishlist contents. My account is ok.

    #147465

    Hello,

    I have test the wishlist feature in your site and it’s working perfectly fine.

    You can check the video for clarification: https://jmp.sh/6cIakVV

    That might be your browser or site cache issue. Kindly clear your browser as well as the site cache.

    Best Regards.

    #152014

    mitcheos
    Participant

    Hi, ive still got the lazyload issue with the checkout images not loading properly after I applied the code to the function.php file. Works fine with lazy load completely disabled but I only want to disable it for the checkout page.
    Can you please have a look? Login details below.

    Thanks
    Mitch

    Attachments:
    You must be logged in to view attached files.
    #152035

    Artem Temos
    Keymaster

    We see that you are using some extra checkout plugin and it updates that part with AJAX. But after the AJAX request, that part contain lazy loading images again. Sorry, but we don’t have a fix for this.

Viewing 9 posts - 1 through 9 (of 9 total)