Okay
  Public Ticket #2751625
how to read the the MetaData and Description: in woocommerce report
Closed

Comments

  •  4
    Roshan Sujeebun started the conversation

    Hi,

    We are using woocommerce service to handle the payment on our website and we have configured the section "Set MetaData and Description" in Payment settings as per the following settings:

    • Employee: %employee_full_name% 
      Appt: %appointment_date_time% 
      Customer: %customer_full_name% 
      patient: %custom_field_1%
      Service: %service_name% 
      Price: %service_price%


    We need to export weekly report of sales and include the details of services sold using Amelia.

    When we try to generate a report on woocommerce, we are getting the following result for raw details for the Amelia medatada.

    Item NameAmeliaA Treatment – Distant Pranic Healing (distant healing)
    a:19:{s:4:"type";s:11:"appointment";s:9:"serviceId";i:2;s:10:"providerId";i:8;s:10:"locationId";i:1;s:4:"name";s:40:"Pranic Healing session (Distant healing)";s:8:"couponId";s:0:"";s:10:"couponCode";s:0:"";s:12:"bookingStart";s:16:"2021-04-17 09:00";s:10:"bookingEnd";s:16:"2021-04-17 11:00";s:6:"status";s:8:"approved";s:14:"dateTimeValues";a:1:{i:0;a:2:{s:5:"start";s:16:"2021-04-17 09:00";s:3:"end";s:16:"2021-04-17 11:00";}}s:18:"notifyParticipants";i:1;s:8:"bookings";a:1:{i:0;a:7:{s:10:"customerId";i:354;s:8:"customer";a:6:{s:5:"email";s:20:"[email protected]";s:10:"externalId";i:417;s:9:"firstName";s:10:"Julia L";s:2:"id";i:354;s:8:"lastName";s:12:"Sin";s:5:"phone";s:12:"+23057073788";}s:7:"persons";i:1;s:6:"extras";a:0:{}s:6:"status";s:8:"approved";s:9:"utcOffset";i:240;s:12:"customFields";a:1:{i:1;a:3:{s:5:"label";s:22:"Patient Name & Surname";s:5:"value";s:9:"Julia L";s:4:"type";s:4:"text";}}}}s:7:"payment";a:4:{s:7:"gateway";s:2:"wc";s:12:"gatewayTitle";s:11:"Credit Card";s:6:"amount";i:0;s:6:"status";s:4:"paid";}s:9:"recurring";a:0:{}s:7:"package";a:0:{}s:28:"uploadedCustomFieldFilesInfo";a:0:{}s:6:"labels";s:147:" Appointment Info Neermal Goorye | Sat, April 17, 2021 9:00 am | %booked_customer% | Pranic Healing session (Distant healing) | MURs0.00 | ";s:9:"processed";b:1;}
    Please guide us how to use the metadata of amelia please guide us how we 


    Please guide us how to use the metadata of Amelia and generate a proper neat report with the following fields:

    • Employee: %employee_full_name% 
      Appt: %appointment_date_time% 
      Customer: %customer_full_name% 
      patient: %custom_field_1%
      Service: %service_name% 
      Price: %service_price%

    Thank you & kind regards

    Roshan


  • [deleted] replied

    Hi Roshan,

    thank you for letting me know.

    I apologize for the later reply - we have found a possible cause.

    This is where our MetaData is read from 

    $data = wc_get_order_item_meta($item_id, 'ameliabooking');

    It's a PHP line, and it requires finding $data['labels'] in order to get that HTML from the order.

    You can use it to "capture" the MetaData for a particular order; just place that line into PHP where you need it.