Skip Navigation

[Gelöst] Sending user email with custom fields data

This support ticket is created vor 6 Jahre, 6 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 4 Antworten, has 2 Stimmen.

Last updated by Beda vor 6 Jahre, 6 Monate.

Assisted by: Beda.

Author
Artikel
#569350

HI, I'd need general advice on how to build following:

Situation: i have a product (WC, but could have been custom post type as well, that doesn't matter much to me) and in the description of that product, i have 3 tabs.
Each tab refers to another price level of that product, according to 3 possible parameters choices. Those prices are created via post fields. Then there are still product criteria choise and quantity choises. They also all work via post field (the native WC fields aren't almost used at all, i used it mostly for easier/nicer image galleries)

So, the user ( who is always logged in) needs to make 3 actions: choose the correct tab with its own prices, the quantity and the color (hence 'product variations'). When he made those, he'll click the button 'make me an offer' that will be nothing more than a 'send' button that sends the info to the admin by email.

I wouldnt go so far to to use CRED cause we're not creating or editing anything, we dont need to have list of received mails or so, we only need to receive the email, and keep it all light and fast.
So how best to do this? Use something like CF7 and add the custom fields in there, if that's even possible? Or is there another way without an external contact form? Most difficult will be to identify from what tab the info was requested/send.

I was even thinking to replace the tabs with a custom post field where they choose one the 3 price level option, with conditional showing of the other fields and info, but i'm not sure here how to get that sent to email and also how to get that choise of 3 price levels in a nice tab-like layout.

Too many ideas and possibilities running around my head; that's why i better ask for the expert's opinion ????

#569430

It's not possible with Toolset alone because, the plugin in question here (CRED), is not ready to handle variable products at all.

Unfortunately, you need either a completely different setup using Types CPTs or need to find a compatible Plugin that does that, of which I can not really find something, in the Repository.

With Toolset only, you would need to create a CPT, which is then edited with a CRED form and when the user submits the request, you apply some custom code that creates a new Post (Requests) and aborts the edit of the Product itself.

This is possible with Custom code.
I can help limitedly with this, if you want to change your setup, we can work on this together.

Please let me know if you would be able to change the current setup and not use WooCommerce variable products

#569648

hi Beda,
i have no problem not using WC. I didn't intend to use variable product at all. The 'variable' aspect on my products are nothing more than a choice pullout window with colors. Those are created per product with CPT and not with WC variable products.

The only real question is: how to send the choices the user made, by mail to the admin? I also didnt think that Toolset alone could do that, but i wasnt sure (or by CRED but that would be overkill in this situation). Perhaps you know from previous experience about some form plugin that is compatible with toolset and that could do the trick?

Thanks!

#569961

i'll probably will do with CRED after all, as described here: https://toolset.com/forums/topic/create-a-contact-form/

#570058

The only way to send notifications with Toolset is CRED.

And to trigger this, you need to add or edit Post types with CRED.

With other plugins, or custom code, it might be possible to get field data from the $_POST and send them to the wp_mail() function as example:
https://developer.wordpress.org/reference/functions/wp_mail/

With wp_mail() you can send emails (CRED uses the same)

The thread you found is more or less exactly what I meant.

You need probably some custom Code thou, to avoid that the user actually EDITS your post!
Or, you would just use a Child post to the Parent Product, for example, and use the same fields on parent and child, so the user can choose on submit.

That should be quite straight forward to set up.
I think, in the video, this is covered, but we also have some DOC for that:
https://toolset.com/documentation/user-guides/cred-forms-for-child-content/

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