• Resolved MDC2957

    (@mdc2957)


    Is it possible to only make certain fields display for certain product variations?

    For example, say I have a fieldset assigned to a product. That product has Woo variations:

    Variation A
    Variation B
    Variation C

    Variations A and B are available in Size1 and Size2
    But Variation C is only available in Size 1

    So if someone chooses variation A or B, WCK should show an option to choose Size1 or Size2. But if they choose Variation C, then Size2 should not be an option to choose.

    Is this type of set up possible with WCK?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Krzysztof Piątkowski

    (@wckalkulator)

    Hi, you can make it work using JS snippet. Here is an example on variable product with pa_color attribute. Field size_2 will be hidden if variation attribute is set to ‘green’.

    
    $('#pa_color').on('change', function(e){
    	var shouldShow = $(this).val() !== 'green';
    	wck('size_2').closest('tr').toggle(shouldShow);
    }).trigger('change');
    

    if the field is required when visible you should also add disabled property to the field if it is hidden.

    Thread Starter MDC2957

    (@mdc2957)

    Yikes,, that is WAY over my head =(
    I might have to go back to the other older plugin as I’m not good with code stuff

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Assign individual fields to product variations?’ is closed to new replies.