Skip Navigation

[Gelöst] How to import TourCMS fileds in woocommerce single product

This support ticket is created vor 6 Jahre, 9 Monate. 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.

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.

Sun Mon Tue Wed Thu Fri Sat
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 23 Antworten, has 2 Stimmen.

Last updated by Noman vor 6 Jahre, 9 Monate.

Assisted by: Noman.

Author
Artikel
#536154

I am trying to: Import custom post type fields from TourCMS plugin (hidden link) to show in woocommerce single product

Where to begin to show the fields in woocommerce single product?

The tourcms plugin provides a way to easily pull product descriptions, images and prices out of TourCMS and into the WordPress environment in a way that WordPress designers and developers should find familiar.

How can I use these fields in the woocommerce single product? Do you need access to my demo site?

Thanks

#536245

Noman
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

Post Field Control - add 3rd party Fields in post fields group.png

Hi Marco,

Thank you for contacting Toolset Support. I think you want to use Custom Fields that are created with TourCMS plugin. If those custom fields are registered using standard WordPress approach, then these steps can help to use those fields:

1. You can control Custom Fields or Post Fields by using “Post Field Control” option, please see attached screenshot.

-- First you will create a Post Field Group for products and then assign the custom fields to that group >> using the Post Field Control, so that these will display in the WC Products.

2. Then you can enable and display 3rd party plugins or themes custom fields inside Views as explained here: https://toolset.com/documentation/user-guides/using-third-party-hidden-fields/

If you would like to import fields in some other way please let me know and I will suggest accordingly. Thank you

#536676

OMG I am getting lost in all features. Sorry.
I want to:

  • use my own products template
  • this template will be filled with data from the tourcms that imports the data
  • The data must show up in product template
  • The data will not be filled in by hand!

I have checked the fields that have to be managed by types. I can see them but I can't get them to show in a template.

Am I asking something that can't be done?
Marco

#536852

Noman
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

Load non-Types custom fields.jpg

To add 3rd party Custom fields in your Content Template, there are 2 things you should check in this case:

- Toolset >> Settings >> Front-end Content >> Click “Select custom fields” button >> And check if you are seeing TourCMS custom fields there? If yes, please enable them (if they are already checked, you can skip this step).

- Then go to your Content Template >> use Filed and Views button >> there you will find a button called “Load non-Types custom fields” >> click on it >> it will show all 3rd party custom fields that you can insert into the template, please see attached screenshot.

----------------------------------------------------------------

Apart from above, you can modify entire Single Product Template by using our Toolset WooCommerce Views >> Content Template editor (you might already know this). Please see short video here that I created to demonstrate that how easily you can add or modify WC product template and add your own data: hidden link

- Please check here to Create Templates for WooCommerce Product Pages with Toolset:
https://toolset.com/learn/create-an-ecommerce-wordpress-site/single-product/

I hope this will allow to insert the desired custom fields. Thank you

#537013

Hi Noman,

Thanks for this. To be honest I managed to get so far :-). So I am not that dumb :-p.

But how do these fields get filled with data on the front-end? The data is imported thru tourcms plugin.

Maybe I have to change my thoughts. I want to use the data of tourcms in woocommerce product template. But maybe I have to switch the tourcms custom post to a sellable product. So take the content template of the tourcms custom post and add woocommerce to it.

So the problem is not to create a template but to fill it with data already in the database.

Do you get my problem now?

Marco

#537057

I think I see what I need to do. I have to make a post relationship of the tours post in the woocommerce product. But in the "Post Types" there is no mention of the woocommerce post type. How to create a post relationship between ToursCMS post and woocommerce post?

Marco

#537151

Noman
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

Use WC Product type as Parent for other posts.png

Hello Marco,

How to create a post relationship between ToursCMS post and woocommerce post?
==> You can setup post relationship by editing TourCMS post type and there you can select “Parent” or “Children” for this post type, please see attached screenshot. It will then be shown inside each Product in the “Post Relationship” section (metabox).

WooCommerce Products is a special post type, due to which Types do not offer to edit it, neither it is recommended to modify WC Products post type as it can break things.

Thank you

#537153

So, what you say is that there is no possible way to get the tourcms data into woocommerce product page thru post relations or otherwise?

#537155

Noman
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

No, you can still create the relationship and add data into WC Product by editing TourCMS post type and set the "Product" post type as "Parent" for it. This is kind of inverse way to link these post types together.

The other comment I made is for the question that why we actually do not show Products post type in Toolset Types (Post Types) screen.

The other ways for displaying custom fields in WC product are also mentioned in this thread already as above.

#537157

Ok, thanks. I will go and try to get this working.

You helped a lot noman!

Cheers

#537169

Noman
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

Sure thing, glad that I was able to help 🙂 I know this might not be straightforward but trying things will eventually take us there.

Have a great day, Thank you

#537170

For me it was more like searching for the right direction. Otherwise you are searching in the dark.

Cheers

#537173

Noman
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

Yes, for now I am changing ticket status as Pending or Waiting for confirmation, so if you have anything more to add later on for this particular question, you can post here (just because with each client reply ticket status changes back to working). Thank you

#537208
Schermafbeelding 2017-06-15 om 16.43.42.png
Schermafbeelding 2017-06-15 om 16.42.59.png

When I look I don't see the post type Tours/hotels in the "Post type" only the standard post type media, posts, pages. Do I first need to import the post type into "Post Type?

It is underneath the Porducts in Dashboard. Does this change something?

#537312

Noman
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

I think you need to enable that custom post type first so that it is managed by Types.
- Please deactivate TourCMS plugin
- Create same CPT in types with same slug
- And then reactivate the TourCMS plugin (after CPT has been created in Types)

Now you will be able to see CPT of that plugin (Tours/hotels) into Types. And all your posts or data will still be there.

Thank you

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