• Resolved waxstash

    (@waxstash)


    Hi, I’ve been searching this forum (and elsewhere) for 2 days for something that seems very obvious, but I must be searching with the wrong search terms. This seems like a basic question but I can’t find the answer anywhere.

    Extremely over-simplified example of my issue: a tee shirt shop with 100 designs. THE DESIGN is the product, not the shirt, the shirt STYLE is the attribute with a different price, along with color.

    So, for design- HAPPY FACE… I offer

    Tees in red, white, and blue

    Sweatshirts in red, white, and orange

    Tank tops in green, pink, and brown

    All the same HAPPY FACE design; the shirt style, color, and prices vary in the product listing.

    All variations for color, size, and style are installed in WooCommerce, but in the storefront, if the customer selects tank tops, buttons for ALL colors are displayed, meaning colors they can’t order.

    I understand I can make separate categories out of tees, sweats, and tanks, but then I have to put the same 100 designs in 3 times… surely this is not the way… what a tedious website that would be…

    So if my customer chooses tank tops via the “tank top button”, how do I make him see only green, pink, and brown choices, and not all the other colors he can’t order? Do I make 3 different color attributes, ie tee colors, tank colors, and sweat colors?

    I must be missing something very obvious… the last time I installed a shopping cart on a website was around 2004. The world has changed a lot since then, please don’t laugh at me too long or too loud… =)

    Thanx in advance…

    Wax

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi @waxstash

    Yes, you can try @seank123 solution and see if it resolves your issue. And you need to add the code to your child theme’s?functions.php?file or via a plugin that allows custom functions to be added, such as the?Code snippets?plugin.

    Avoid adding custom code directly to your parent theme’s?functions.php?file as this will be wiped entirely when you update the theme.

    Thread Starter waxstash

    (@waxstash)

    Thanks for your responses, I’ll investigate and report back soon!

    Thread Starter waxstash

    (@waxstash)

    OK, that makes sense to me… coding is not my thing, but I forced myself to make php changes many years ago…

    To be clear, I add that code snippet to the functions.php file… anywhere in particular?

    Also, the link Sean provided says it will slow the site down… is it severe? I know that’s a relative question, but I don’t want people abandoning the site because it drags along… do I just need to “try it and see”…?

    Only use the functions.php file if you’re using a child theme – otherwise an update to the theme may overwrite the code.

    Also, if you mess up the code in functions.php file your site will die!

    I’d recommend using the Code Snippets plugin to add it.

    Anything that adds more database calls will potential add a bit more loading time to the page – however, if you’re using decent hosting you’re talking milliseconds so it shouldn’t really be an issue.

    • This reply was modified 1 year, 11 months ago by seank123.
    Thread Starter waxstash

    (@waxstash)

    Thank you… looking into code snippets…

    Thread Starter waxstash

    (@waxstash)

    So installed Code Snippets and Sean’s code, set it to 150 and the results were not what I hoped… the results are “more accurate”, but I’m still showing colors that are unavailable for various styles, with some other colors “grayed out” with a red X through them as unavailable… not what I was hoping for. I was hoping ONLY available colors would be displayed.

    Welp, so far this is a smoking trainwreck… I had 3 products put in the system to build out, but nothing is right. Before I blame the software, I’m gonna see if this is so mucked up because of my inexperience… gonna delete all products and start over….

    I’ve seen there are “customization plugins” that might solve this for me… anyone have a recommendation?

    Thank you Sean and Amir… I’m gonna read/watch some tutorials and start over. I may repost in a day or two…

    “Get WooCommerce, they said… millions use it, they said… how hard can it be?”

    Hi,

    Can you provide a link to the product that is having the issue? That way we can take a closer look.

    Cheers.

    Hi @waxstash ,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – feel free to create a new topic  should you need any further help.

    Cheers!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Show only relevant color variations’ is closed to new replies.