Home Forums Basel support forum grey out product attributes that are not available

grey out product attributes that are not available

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #141083

    D0R1AN
    Participant

    Please open the two links in the private content.

    On both, please choose the product color RED.
    “Design I” will grey out all “impossible” product variations, “Design I (Kopie)” does not do that and tells me after selecting the rest something like: “This combination is not available”.

    Why do they behave different?
    Is there a maximum number of variations until the functionality switches? (Design I uses 25 variations, Design I (Kopie) uses 40 variations.)

    How do I set up the theme so all products use the behavior of greying out impossible attributes?

    #141098

    D0R1AN
    Participant

    Did more testing and I’m guessing the greying out stops when the product has 31 variations or more. Can you confirm?

    If so, how do I use greying out for products with more than 30 variations?

    #141104

    Eric Watson
    Participant

    Hello,

    Thank you so much for contacting our support center.

    Out variations are only visually improved standard variations Woocommerce and they work on the basis of standard ones. After 30 variations, Woocommerce begins to load them with an AJAX. The gray color of the variations is based on the standard select and its classes, as you can see after 30 variations there are no more classes.

    http://prntscr.com/oz4tj6
    http://prntscr.com/oz4txe

    Kind Regards
    XTemos Studio

    #141105

    D0R1AN
    Participant

    Thank you.
    How can I make the grey color work for more then 30 variations then?

    #141108

    D0R1AN
    Participant

    OK I found something: https://iconicwp.com/blog/modify-ajax-variation-threshold/
    Seems to work!

    function iconic_wc_ajax_variation_threshold( $qty, $product ) {
        return 250;
    }
    
    add_filter( 'woocommerce_ajax_variation_threshold', 'iconic_wc_ajax_variation_threshold', 10, 2 );
    #141114

    Eric Watson
    Participant

    Great, we are glad that you have found the solution.

    #141123

    D0R1AN
    Participant

    Thx for pointing me in the right direction, Eric!

    #141132

    Eric Watson
    Participant

    You are welcome!

Viewing 8 posts - 1 through 8 (of 8 total)