• Resolved devinc42

    (@devinc42)


    I have created product variations that have different attributes such as the material or size. For SEO reasons and to avoid confusing product listings, I want the the product name to include the selected attributes but currently it only shows the name of the base product.

    The product name shows up in many places, on the shop page, the product page, the cart page and widget, the window title, etc. Is there any way to update the name in all of these places?

    For example, right now the base product name is “ABC” and you can select the material wood, metal, or plastic. I have been searching for a filter, hook, function, or something that I can use to change the product name to something like “Wood – ABC” or “Plastic – ABC” everywhere the product name is displayed but I can’t find one. Can anyone point me in the right direction?

    Is it possible to do this or do I have to create all the products individually (instead of using variations) just so I can control the name displayed?

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    I want the the product name to include the selected attributes but currently it only shows the name of the base product.

    The product’s name is the name you assign it. Each variation has its own name – when you add a variation to cart, it’ll show up as “Product name – variation”:
    https://cld.wthms.co/hcL0Hm

    While it’s theoretically possible to find all of the variations for a product and then append them to the name, I strongly recommend against it. If you have a large number of variations, or they aren’t descriptive, the title will become unwieldy. It’ll also look strange by the time you get to the cart, as the chosen variation is displayed there.

    From the way you’re describing it, it sounds like your products only have one variation. Is that correct?

    • This reply was modified 7 years, 2 months ago by Hannah S.L.. Reason: More info
    Thread Starter devinc42

    (@devinc42)

    Hi Hannah thank you for your reply! I don’t see a field where I can edit the variation name and when my variations are in the cart the selected attributes show in a list below the name and not appended to the name like in your picture (I made my own child theme based on storefront but I didn’t change anything to make it do this). If I theoretically wanted to append the variations to the name everywhere not just in one location or page, how would I do that? I have about 20 variations per product and the attribute values aren’t too long so the name length shouldn’t be a problem and it will more closely match customer search queries. It seems like a basic thing. If variations can have separate descriptions, prices, pictures, etc why not names?

    • This reply was modified 7 years, 2 months ago by devinc42.
    Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    Each variation does have its own title, but the variation isn’t meant to be a stand-alone product. It’s always part of the parent product, with some small changes.

    When WooCommerce displays products, for example on the product archive page, or the shop page, it’s showing products – not variations. That’s why it doesn’t show the variation title. Even if you did update the product to show the variation title, you’d still only be seeing one product, rather than the 20 variations.

    Showing variations as separate products has been asked for a number of times, but it’s not a feature in WooCommerce. However, I did come across this plugin that would help you out:
    https://iconicwp.com/products/woocommerce-show-single-variations/

    I can also recommend this post on how to display variations nicely:
    https://woocommerce.com/2016/05/product-variations-display/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘name for each product variation’ is closed to new replies.