• Resolved acmdesigns

    (@acmdesigns)


    Is it possible to have non-selectable attributes on variations?

    For example, I have a product that has the following “colour” attribute variations: RED, YELLOW or BLUE… but each has a unique “shape” attribute:

    • RED variation is only SQUARE
    • YELLOW variation is only ROUND
    • BLUE variation is only TRIANGLE

    So essentially, I want the COLOUR selectable in a dropdown, but only show “SQUARE” as info only and not in a dropdown box.

    Is this possible?

    https://www.ads-software.com/plugins/woocommerce/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter acmdesigns

    (@acmdesigns)

    Any suggestions?

    You don’t have to have variations for all the permutations of your attributes, just the ones you supply. However that would add a shape dropdown with only one entry which you probably don’t want.

    Could you not put both words in the attributes:

    red (square) | yellow (round) | blue (triangle)

    Or maybe put the shape information in a table in the product description.

    Thread Starter acmdesigns

    (@acmdesigns)

    The “shape” attribute was just an example. In reality I have several attributes similar to it that are static or different to each variation.

    Essentially it’s just production information specific to the variation but I don’t want to just put it into the description as a formatted info. I want them to be separate fields/custom attributes so I can filter and do other queries with them. Some of the information may overlap, but it doesn’t mean it’s a variation on it’s own.

    For example:

    RED variation

    • Size: 10 x 8 x 8
    • Capacity: 5 cubic inches
    • Amount per skid: 1,000

    YELLOW variation

    • Size: 12 x 10 x 10
    • Capacity: 8 cubic inches
    • Amount per skid: 1,000

    BLUE variation

    • Size: 12 x 10 x 10
    • Capacity: 8 cubic inches
    • Amount per skid: 1,500
    Thread Starter acmdesigns

    (@acmdesigns)

    I’m not sure yet, but I think what I need is to add custom FIELDS to the product variations:

    https://www.remicorson.com/woocommerce-custom-fields-for-variations/

    and this article has a demo of it in action:
    https://blueskysessions.com/2014/03/31/woocommerce-display-dynamic-content-per-the-selected-product-variation/

    So rather than add custom ATTRIBUTES, I would add custom FIELDS to each variation. I’m not sure this is the best solution yet, but so far it’s the closest to what I need to achieve.

    Thread Starter acmdesigns

    (@acmdesigns)

    After testing out the custom fields in variations, this is the solution I needed.

    Unfortunately I had to do it manually so the code isn’t very re-usable. After the project is complete, I may spend some time and convert it to a plugin so it’s not specific to the custom theme I’m making.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘variations with unique non-selectable attributes’ is closed to new replies.