Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YITH WooCommerce Request A Quote #254

Open
spencerfinnell opened this issue Sep 5, 2019 · 1 comment
Open

YITH WooCommerce Request A Quote #254

spencerfinnell opened this issue Sep 5, 2019 · 1 comment

Comments

@spencerfinnell
Copy link
Collaborator

Using "YITH WooCommerce Request A Quote" the images and quantity fields do not load after their AJAX task is run.

A solution was given to load the images after a delay, since there are no built in triggers we can utilize:

function yith_raq_image_fix() {
    ?>
    <script type="text/javascript" charset="utf-8">
        jQuery(document).ready(function($) {
            setTimeout( function() {
                    var images = $('#yith-ywraq-form td.product-thumbnail a img');
                    images.each(function () {
                        var data_src = $(this).attr('data-src');
                        $(this).removeClass('lazy-load');
                        $(this).attr('src', data_src);
                    });
                }, 2000
            ); //end settimeout
        });
    </script>
<?php
}
add_action( 'wp_footer', 'yith_raq_image_fix',999999 );

https://wordpress.org/plugins/yith-woocommerce-request-a-quote/

@w3guy
Copy link

w3guy commented Jun 25, 2022

@spencerfinnell what's the best way to contact you? Wanna pick your brain for a minute. I don't mind paying for your time. Please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants