empty variation li
-
I have created a product with 3 color variations but the site prints empty even the variations not in use. Now I find myself with a lot of empty elements that ruin all the graphics on the website. https://ibb.co/KsLTMPP https://ibb.co/h2zngG0
-
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?
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
when you plan to release it?
We can’t give you an exact release date but it will be soon we hope.
Thank you for your interest.
Hi @raazon,
With the new update, it may be more useful if you bring the feature to search products by SKU number.
Best Regards,
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’sI 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.
The topic ‘empty variation li’ is closed to new replies.