Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter becreativestudio

    (@becreativestudio)

    linked variation does not check the variations if full or empty, because it takes the variations, counts them and creates the list. instead it should check its consistency when creating the list item can fix?

    Plugin Author Razon Komar Pal

    (@raazon)

    Hi @becreativestudio

    Thank you for letting us know. I have added your issue to our issue list. Hope it will fix on our next update.

    Thank you

    Thread Starter becreativestudio

    (@becreativestudio)

    when you plan to release it?

    Plugin Author Razon Komar Pal

    (@raazon)

    Hi @becreativestudio

    We can’t give you an exact release date but it will be soon we hope.

    Thank you for your interest.

    zackhatlen

    (@zackhatlen)

    Hi @raazon,

    With the new update, it may be more useful if you bring the feature to search products by SKU number.

    Best Regards,

    Plugin Author Razon Komar Pal

    (@raazon)

    Hi @zackhatlen

    Thank you for your interest. We add your suggestion to our roadmap. Hopefully, we will add this feature in our future updates.

    Regards

    Hi @raazon great plugin!
    Sadly I’m facing the same issue with the empty li’s

    I tried adding the following code in “woo-linked-variation-frontend.js”
    but it didn’t work.

    jQuery(document).ready(function($) {
    $(‘ul’).find(‘li’).each(function () {
    if ($.trim($(this).text()) == ” “) {
    $(this).remove();
    }
    })
    });

    Maybe i did sth wrong, maybe I used the wrong file, I’m not sure, still learning Jquery.

    Hope you’ll fix it soon.

    I solved it.
    Just add:

    $(‘li’).filter(function(){
    return $.trim($(this).html()) == ”;
    }).hide();

    after the first three vars in woo-linked-variation-frontend.js

    This worked prefect for me.

    Welcome. can you give all the code of the file. I try to add it everywhere and it doesn’t work ?? Thank you

    @gomez1986 Yeah sure

    The file directory is the following: assets/js/woo-linked-variation-frontend.js

    And the code including my customization is the following:

    (function ($) {
        "use strict";
        jQuery(document).ready(function () {
    
            // linked variation label change on hover 
            
            
            $(function () {
                var wooLinkedVariation = $('.woo-linked-variation');
                var currentVariation = wooLinkedVariation.find('.linked-variation-label .variation-selection');
                var singleVariation = wooLinkedVariation.find('.linked-variations ul li');
        
    $('li').filter(function(){
        return $.trim($(this).html()) == '';
    }).hide();
                singleVariation.hover(function () {
                    var thisDataVariant = $(this).data('variant');
                    $(this).parents('.woo-linked-variation').find('.linked-variation-label .variation-selection').html(thisDataVariant);
                }, function () {
                    $(this).parents('.woo-linked-variation').find('.linked-variation-label .variation-selection').html(currentVariation.data('variant'));
                });
            });
    
        });
        
        
        
    })(jQuery);

    works, thank you very much. Regards

    I have 4 variations but each shows only 1 variation for 1 product? Similarly I create 2 variations it also shows only 1 variation for 1 product.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘empty variation li’ is closed to new replies.