Skip Navigation

[Resolved] How can I use third-party plugin fields with Toolset?

This support ticket is created 5 years, 9 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 6 replies, has 2 voices.

Last updated by alejandroG-2 5 years, 8 months ago.

Assisted by: Nigel.

Author
Posts
#1219406

Tell us what you are trying to do?
We are creating a sport services multivendor store using Types, Views, CRED, Yith Multivendor and Yith Event Tickets (for the moment) we are planning to add also Yith Subscriptions and Bookings.
hidden link
For know, Yith Event Tickets, create some extra fields as product meta (as Yith support told me). They create them this way:
Date
start_date = yit_get_prop( $product, '_start_date_picker', true );
$start_time = yit_get_prop( $product, '_start_time_picker', true );
$end_date = yit_get_prop( $product, '_end_date_picker', true );
$end_time = yit_get_prop( $product, '_end_time_picker', true );

Custom fields form (for each attendee to fill out, like T-shirt Size)
$fields = yit_get_prop( $product, '_fields', true );

Add-on services (like ordering an insurance for the event or transportation)
$services = yit_save_prop( $product, '_services', $services );

Atendees tab
Don't know how is created, but I could ask Yith. Sure it similar to the others.

Here is how this fields are created at wp-admin: hidden link
And here is how they are showed now for the users: hidden link

I tried following this: https://toolset.com/documentation/user-guides/using-third-party-hidden-fields/ but I think is not the same case and it's not even working with Date Type.
For example, for the services field as it really vary depending on what the vendor set up, can't really tell what kind of field it would be. Same for the custom fields form.

I want to be able to manage these fields because for the mobile version, this set up is not optimal. In mobile, we'll have a fixed footer just showing the price and a big button. I would like to link this button to a pop-up or a pre-checkout page so the user can fill out custom fields and add-on services required for the purchase.

What is the link to your site?
hidden link

#1219690

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

I'm not sure exactly what the question is that you need answering.

If the WC extensions are saving data as post meta using keys such as "_services" and "_start_date_picker" then, yes, these are hidden fields (because they start with an underscore) meaning that they won't show up in the Toolset UI unless you first go to Toolset > Settings > Front-end Content > Hidden Fields and expose them.

As for what you do with them was you have exposed them, if you try to output them using the wpv-post-field shortcode, for example, or use them in Views filters, remember that Toolset doesn't know anything about these fields (unlike a Types select field, for example, which Toolset knows is a select field), and so all such fields will simply be treated as strings (which is how they are stored in the database in the wp_postmeta table). In most cases this would output something sensible, but not if the field is actually an array (that is stored as a serialised array, i.e. an array converted into a string).

#1219722

And is there any way I can manage that with toolset?

#1219745

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Sorry, but I don't understand what you mean.

What specifically do you want to do?

#1220141
Screenshot 2019-03-25 at 06.28.26.png

Hello Nigel,
Sorry if i didn't explain myself correctly.
I want to know how can I manage those custom fields (from Yith) with Toolset.
For example, in mobile, I want to have all the buying options (services + custom form fields) in a new page where the customer select "Inscribirme" since we'll be having a fixed bottom button allowing the customer to buy at any time as he/she scrolls through the page. You can see what I mean here: hidden link (make it mobile width).
Any chance that, once "Inscribirme" is clicked I can show the custom fields form and the services?
Also there's a field created by Yith with the people that have signed up for the event, is call attendees, that we want only show if the vendor decide to. Attendees would be a list of people, so I'm not sure how can I manage this type with Toolset.

Pleas let me know if you need further details.

Thanks

#1220798

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I want to know how can I manage those custom fields (from Yith) with Toolset.

You can't "manage" those 3rd-party fields with Toolset, but you can output them (in their raw format) using the wpv-post-field shortcode (https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-field), and you can save them from a front-end form if you create a generic field with the same slug and you add a "persist" : 1 option to the generic field so that its value is saved rather than discarded. (https://toolset.com/documentation/user-guides/inserting-generic-fields-into-forms/)

But what you are describing sounds like more than saving and outputting custom fields.

I'm not familiar with the YITH extensions you are using, but they appear to customise the normal WC cart functionality so that you can add custom fields to orders as they are placed.

The integration between Toolset and WooCommerce doesn't allow for customising the cart process or for modifying the fields of the resulting order, and typically when someone requests such functionality we would direct them to 3rd party extensions or to the WC documentation such as https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/ or other tutorials such as hidden link.

I can help you with the Toolset integration with WooCommerce, but can't really help with something that is not covered by that integration, such as modifying the cart process.

#1225815

My issue is resolved now. Thank you!