Support » Plugin: Variation Swatches for WooCommerce » Is it possible to turn off swatches for an attribute at a selected product?

  • ucsendre

    (@ucsendre)


    I would like to turn off swatches for one attribute of a variable product, because it would look better with the default drop-down list.
    The product has two variation attributes (performance and size).
    Performance has two options – it is ok, to display with swatches.
    Size has a lot of options (more than 10) and looks like a mess with swatches.
    I would like the size attribute to be displayed as drop-down list. How can I achieve this?

Viewing 1 replies (of 1 total)
  • ucsendre

    (@ucsendre)

    I made a little js to do the trick.
    Not elegant at all, but works.

    jQuery(document).ready(function($){
    var xyz987 = document.getElementsByClassName('variation-selector');
    for (var xyz007 = 0; xyz007 < xyz987.length; xyz007++){ xyz987[xyz007].classList.remove("hidden"); };
    var xyz654 = document.getElementsByClassName('tawcvs-swatches');
    for (var xyz008 = 0; xyz008 < xyz654.length; xyz008++){ xyz654[xyz008].classList.add("hidden"); };
    });
    • This reply was modified 8 months ago by  ucsendre.
Viewing 1 replies (of 1 total)
  • The topic ‘Is it possible to turn off swatches for an attribute at a selected product?’ is closed to new replies.