Skip Navigation

[Resolved] Connect Woo Products with Custom Posts (Owner / Producer)

This support ticket is created 5 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 6 replies, has 2 voices.

Last updated by shenom 5 years, 4 months ago.

Assisted by: Luo Yang.

Author
Posts
#1336299

Tell us what you are trying to do?

I need a connection of the products of a brand to the Toolset made custom post type 'Producer' - finally all I need is a shortcode to display the 'Producer' as a link in the product detail and product archive page of Elementor.

An example : For every Partner / Producer we create a custom post type and display the information on a page like this: hidden link

Now we want to set a little info / link in every product of this partner / producer that leads to this page.

Bulk editing of the products isn´t a problem. Maybe a custom field for every product will do it. But how to connect it to the producer the smartest way?

What is the link to your site?

hidden link

#1336451

Hello,

I assume we are talking about this case:
- One "producer" post can connect with multiple "product" posts
- One "product" post can connect with only one "producer" posts

If it is, I suggest you try to setup one-to-many relationship between post type "producer" and "product",
https://toolset.com/documentation/post-relationships/

Then in single "producer" post, you can display related "producer" information with Toolset shortcodes:
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-one-related-item-parent

For your reference.

#1336547
04.png
03.png
02.png
01.png

Hi.

Thanks for the fast answer!

This could be a way. In the meantime I tested a bit and found another (possible) way. Please see my screenshots attached.

It´s a custom field for the Woo products in which a Post Reference field is used. It´s already possible to select an 'Producer' in my products. See image 3.

Could this also be a way to handle this - for the frontend playout of the producer in the each product?

The only thing I´m missing right now is how I can see this in my Woo bulk edit tool. It should be a custom field what should be visible there?! See image 4. But it seems not 'registered'.

#1337221

The Post Reference field is based on one-to-many post type relationship, same as other post type relationship, the data is save in another custom database table "wp_toolset_relationships", but normal custom fields are saved in database table " wp_postmeta", so it can not be edited in Woo bulk edit tool.

#1337367

We´re using the powerful 'Advanced Bulk Edit' tool : hidden link - but the extra data table seems the reason it don´t find the custom field(s) there.

So how do You guys handle such things with thousands of products? We´re a market place with already over 2.600 products from different brands. Some have more then 400 products. There must be a way to give them all a relation in some kind of bulk process?!

#1337373

You can try to import the post and relationship data with CSV file using, see our document:
https://toolset.com/documentation/user-guides/how-to-import-content-into-wordpress-using-csv/

#1337399

That was the final link that made it. As we´re using WP All Import for the products - it will handle the bulk process.

My issue is resolved now. Thank you!