Hello, good morning, I would need to add the event data in a hidden field of the checkout and reading your documentation I found that it could be done with the "amelia_checkout_data" hook but I would not know how to apply it and that is why I need an example to add name, date, time and number of people at the checkout so that they are in the woocommerce order (not like the meta description).
I can create these fields with Checkout Field Editor in a hidden way.
function event_data($data, $container, $wc_key) { // wc_key - key of the Amelia cart item name_event date time number_of_persons
Thanks for reaching out to us. Please, let me double check with the developers, but before that, can you please provide the WP admin credentials? I've tried using the credentials from previous tickets, but apparently, they are not working anymore.
I did the implementation by adjusting the name of the hidden fields and eliminating the TIME one, since I understand that datetime gives me the date and time of the event. Then I made a test purchase but the function data does not appear in the order.
Apologies again for the delayed answer, try this one
function datos_orden($data, $container, $wc_key) { $event = WC()->cart->get_cart_contents()[$wc_key]['ameliabooking']; WC()->cart->get_cart_contents()[$wc_key]['ameliabooking']; // add items you need to a data object $data['event_name'] = $event['name']; $data['number_of_persons'] = $event['bookings'][0]['persons']; $data['date'] = $event['dateTimeValues'][0]['start'];
Hello, good morning, I would need to add the event data in a hidden field of the checkout and reading your documentation I found that it could be done with the "amelia_checkout_data" hook but I would not know how to apply it and that is why I need an example to add name, date, time and number of people at the checkout so that they are in the woocommerce order (not like the meta description).
I can create these fields with Checkout Field Editor in a hidden way.
function event_data($data, $container, $wc_key)
{
// wc_key - key of the Amelia cart item
name_event
date
time
number_of_persons
return $data;
}
add_filter('amelia_checkout_data', 'example', 10, 3);
Hi Javier,
Thanks for reaching out to us. Please, let me double check with the developers, but before that, can you please provide the WP admin credentials? I've tried using the credentials from previous tickets, but apparently, they are not working anymore.
Kind Regards,
Stefan Petrov
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi Javier,
Thanks for the credentials. Allow me to double-check with the developers and I will get back to you with the information.
Kind Regards,
Stefan Petrov
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi Javier,
Apologies for the long wait.
Here is the example of the hook. You can get it like here
Please, let us know if it works.
Kind Regards,
Stefan Petrov
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
I did the implementation by adjusting the name of the hidden fields and eliminating the TIME one, since I understand that datetime gives me the date and time of the event.
Then I made a test purchase but the function data does not appear in the order.
I attach the function as I have it activated
Hi Javier,
Still checking with the devs. Will get back to you as soon as possible with the information.
Kind Regards,
Stefan Petrov
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi Javier,
Apologies again for the delayed answer, try this one
Kind Regards,
Stefan Petrov
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Thanks Stefan! It works perfect!!!
You are welcome, Javier.
I'm glad it works!
If you have any other questions, please open a new ticket and we will gladly help you there.
Have a nice day!
Kind Regards,
Stefan Petrov
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables