Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #995581

    Dear Sir/Madam,

    I have added a variable product on my site (Enfold Child Theme with Woocommerce 3.4.4).

    I have added images per variation. And a product image. When variations are selected the only image you see is the product image.
    When I remove the product image the variable product images are showing. But when no selections is made then no image shows.

    I deactivated all plugins to see of any plugin was interfering. But no.

    I hope to hear from you soon.

    Will

    • This topic was modified 6 years, 12 months ago by WPDev4N0p.
    #995729

    Hey WPDev4N0p,

    Please try the following

    add_action('woocommerce_after_single_product','custom_woocommerce_additional_variation_images');
    function custom_woocommerce_additional_variation_images(){
    ?>
    <script type="text/javascript">
    (function($) {
    $(window).load(function(){
    // alert('test');
    $( "a.swatch-anchor").click(function() {
    //console.log(variation);
    var atts = $(this).parent().attr('data-value');
    var product_variations = $('form.variations_form').data('product_variations');
    var variation_id= '';
    for ( var i = 0; i < product_variations.length; i++ ) {
    var variation = product_variations[i];
    if( product_variations[i].attributes.attribute_pa_color == atts){
    variation_id = product_variations[i].variation_id;
    }
    }
    //console.log( matching[0].attributes.attribute_pa_color);
    console.log(variation_id);
                var data = {
                    security: wc_additional_variation_images_local.ajaxImageSwapNonce,
                    variation_id: variation_id,
                    post_id: $( 'form.variations_form' ).data( 'product_id' )
                };
                $.ajax({
                  type: "POST",
                  url: $.wc_additional_variation_images_frontend.getAjaxURL( 'get_images' ),
                  data: data,
                  cache: false,
                  success: function(data,response){
                   console.log(data);
                      data = $.parseJSON(data);
                      setTimeout(function(){ $.wc_additional_variation_images_frontend.imageSwap(data); },1000);
                   
                  }
                });
            });
        })
    })(jQuery);
    </script>

    Best regards,
    Basilis

    #997089

    Dear Basilis,

    Thank you for your reply.

    I have added the code to functions.php. However there is no result.

    I hope to hear from you soon.

    Kind Regards,

    Will

    #997340

    Hi,

    Can you please remove authentication from the web site?

    Best regards,
    Basilis

    #999410

    Dear Basilis,
    I had to check with IT. This is standard procedure.
    They dont want to remove the authentication. Could you maybe explain why you need this.

    I hope to hear from you soon.

    Will

    #999625

    Hi,

    I cant login so I can help you further…

    Best regards,
    Basilis

    #999704

    Dear Basilis,

    Thank you for your quick reply.

    The login information in the Private Content does not work?
    I hope to hear from you soon.

    Kind Regards,

    Will

    #1001345

    Hi,

    What I mean is that the browser authentication is not working…

    Best regards,
    Basilis

    #1002250

    Dear Basilis,

    Thank you for your reply.

    The authentication is removed.

    I hope to hear from you soon.

    Kind Regards,

    Will

    #1002504

    Hi,

    Thanks for the update.

    The site is currently running on an old version of the theme, 4.2.2. Please upgrade to version 4.4.2 and then get back to us. We’ll inspect the issue again afterwards.

    Best regards,
    Ismael

    #1002635

    Dear Ismael,
    Site is updated to 4.4.1. 4.4.2 not available on Themeforest.net.
    Hope to hear from you soon.
    Kind Regards,

    Will

    #1002952

    Hi,

    Yeah, my bad. I thought it’s not the latest version, turned out that version 4.4.2 hasn’t came out yet. Can we have access to the Appearance > Editor panel? Or post the FTP details in the private field.

    Best regards,
    Ismael

    #1003022

    Dear Ismael,

    The update seems to have worked.

    Ill do some tests with other products.

    If I find something new Ill report back to you.

    Kind Regards,

    Will

    #1003368

    Hi,

    Great! Let us know if you encounter any issues. You may need to reconfigure the theme options a bit.

    Best regards,
    Ismael

    #1013348

    Good afternoon,

    Regarding this issue. It was resolved on the Aluca site.

    We started another webshop and it has the same problem. The site is updated to the latest version. I have add the code above in the functions.php. After all this the site is still not showing the variation images.

    I hope to hear from you soon.

    Kind Regards,

    Will

    #1013448

    Hi,

    We set the Enfold > Shop Options > Product gallery to the default WooCommerce product gallery. The variation images should display properly now.

    Best regards,
    Ismael

    #1013563

    Dear Ismael,

    Thank you for your quick response.

    It works!

    Thank you.

    Kind Regards,

    #1013931

    Hi,

    Glad we could help!

    Please take a moment to review our theme and show your support https://themeforest.net/downloads
    Don’t forget to bookmark Enfold Documentation for future reference.

    Thank you for using Enfold :)

    Best regards,
    Basilis

Viewing 18 posts - 1 through 18 (of 18 total)
  • The topic ‘woocommerce 3.4.4 variable product image not showing Enfold Child’ is closed to new replies.