Skip Navigation

[Resolved] Product relationship

This thread is resolved. Here is a description of the problem and solution.

Problem:

Is it possible to have a relationship between a product variation and a custom post type?

Solution:

No, it is not possible. Check here for more information:

https://toolset.com/forums/topic/product-relationship/#post-2539861

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

This topic contains 4 replies, has 2 voices.

Last updated by yairF 1 year, 3 months ago.

Assisted by: Christopher Amirian.

Author
Posts
#2539107

Hi
We have created a search app using Toolset, which is based on Relationship.
The relationship is based on a new taxonomy called "Models", in which there is a one to many relationship of one "Product" to several "Models".
We have started using variable products, where each product has a number of variations, each one has a unique SKU number.
Is it possible to modify the "Relationship" view, so I can connect "Models" to a variable "Product" ?
Thanks, Yair

#2539301

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

a Relationship in Toolset is working on a custom post type. The product is a custom post type and there is no differentiation between a Simple or Variable product as both of them are considered as a custom post type of products.

Thanks.

#2539495
Product name dialog box.jpg

Hi
Thank you for your reply.

The way I'm setting up the relationship, is by "connecting" the model to a product.
Almost all of the products that are listed in the website, are of variable type, where each variation has its own SKU number.

When opening the "Connect Product" dialog box, the name search shows me both simple products and variable products.
However - the variable product doesn't show the product variations, so I can't use it.
So my request - is it possible that I use the product SKU in the product name search rather than its name?
Thanks, Yair

#2539861

Christopher Amirian
Supporter

Languages: English (English )

Hi Yair,

No unfortunately it is not possible. The reason is exactly what I mentioned which is that the relationship is between two custom post type.

The custom post type in woo-commerce is named as product.

There is only ONE product entry whether it is a simple or variable product.

Sio for a variable product you have only ONE custom post type entry of product. The variations are added by Woocommerce and it handles them, but WordPress sees all the SKUs and variations of a product as ONE entry.

That is why you can not choose a variation of a variable product as a connection and you need to select the whole product itself.

Thanks.

#2540081

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.