• Resolved jasonad95

    (@jasonad95)


    Ignore everything but the product variations as I’m nowhere near finished building and adding/removing stuff.

    But, what I need to achieve is I need the external braking transistor can only be available for certain values from variant 1, and within the range that can have them, only certain variations in variant 1 go with specific values in variant 3.

    For example, only 37-45kW goes with the first braking transistor.

    Is it possible to do this natively within WooCommerce or do I need to find an extention/plugin?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • If the number of variations is less than the threshold, only available combinations of attributes can be selected, which is what you want.

    If the number of variations is greater than the threshold, its possible for the user to choose unavailable combinations and subsequently receive a “this is unavailable message”. Not a great user experience.

    The threshold is normally 30, but this can be changed with a code snippet.
    https://gist.github.com/mohsinoffline/f06c66259e667d6b16bb

    The higher the threshold, the more data is included in the initial page load and the page will take longer to render. Some experimentation may be needed to find what’s right for you.

    Thread Starter jasonad95

    (@jasonad95)

    What does this mean in layman’s terms?

    It sounds like doing this will increase the page loading time – unless I’ve misread your post? Would it be better for me to just set up the variations with the transistor already built into the main variation, i.e. have no variant 3?

    Make the number of variations less than 30.

    If you need more, you can increase the threshold using the snippet, but not by too many, then test.

    Your link doesn’t work, so I have no sense of what your product is like, so I can only generalise.

    laceyrod

    (@laceyrod)

    Automattic Happiness Engineer

    This thread has been inactive for a bit, so I’m going to mark it as Resolved now. Please feel free to open a new one if you have any further questions.

    Cheers!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Make a certain attribute only available for certain variations’ is closed to new replies.