14

I have list products in a particular group... in this case, a bed set. comforters, pillows, shams, etc. Some are variable products (comforter sizes), and some are simple products (pillows).

I would like to create a product group called XYZ Awesome Bedroom Set and include both the variable and simple product types. Unfortunately, Woothemes officially only supports adding simple products to groups.. but I'm not sure why. Any ideas?

Is there anything in the core or WC template files that I can overwrite to allow access for variable products in groups? I have looked at the available plugins and tried dozens of fixes in the core, but no luck!

Anything would be helpful at this point.

Thanks.

Purvik Dhorajiya
  • 4,662
  • 3
  • 34
  • 43
Joseph Wer
  • 351
  • 1
  • 6
  • 15
  • why don't you use categories? – siddhesh Mar 08 '15 at 05:30
  • 1
    No. Without quite a lot of custom scripting, you cannot add a variable product to a grouped product. You could, however, try [Composite Products](http://www.woothemes.com/products/composite-products). – helgatheviking Apr 13 '15 at 22:15
  • @joseph Wer - How did you end up doing this in the end? I need to do something similar. I believe you can achieve this with Group products - but it means listing each variation as a separate, simple product, then hiding these separate simple products from the catalogue - that way, they are supposed to only show up in the main Grouped product. The Woo docs does explain how to do it, but I've not yet tried it, so curious how you achieved it. – SolaceBeforeDawn Jun 09 '15 at 02:51

2 Answers2

3

It is possible to do this with grouped products in Woocommerce 3.0+, but does require editing one line in a core Woocommerce file. It's super easy once you know what to change, and it's never recommended to change core files, but perhaps this can help you figure out how it works, then come up with a better solution.

The file is located here: /wp-content/plugins/woocommerce/includes/admin/meta-boxes/views/html-product-data-linked-products.php

Change line 15 (HTML <select> tag)

FROM: data-action="woocommerce_json_search_products"

TO: data-action="woocommerce_json_search_products_and_variations"

Yes, it really is that simple. This will allow the Select2/SelectWoo search box to pull in both parent products and individual variations.

Keep in mind, any future Woocommerce update will override this change. So you will need to override the file permanently, or track it in Git to highlight changes to the file, etc.

  • It’s probably out of date, because adding custom products to group products now works (WP 5.4, woocommerce 4.0.1) – MrSwed Apr 29 '20 at 14:57
1

The WPC Grouped Product plugin looks like it does what you want. Essentially it is an upgrade to the default Woo "grouped products" so that you can include a variable product and/or a specific variation of a product. And it's free! https://wordpress.org/plugins/wpc-grouped-product/

Mr. T
  • 294
  • 2
  • 13