Cleaning up ticket emails.
-
Hello, I would like to not only clean up the newly added “include support ticket message in email feature”, but would also like the email to include ALL ticket information.
Currently, I am using this plugin as a work ordering system, so I simply edited the plugin to say “Work Order” instead of “Support Ticket”. This is how current emails look like coming in:
Subject: New Work Order: “12345 Property Blvd”
Message: There is new a work order: (link to ticket)
The content of the work order is: “Repair this.   Repair that.  ?Okay to invoice for $400.   TEST”
This is how I would like the email to look like:
Subject: New Work Order: “12345 Property Blvd”
Message: There is new a work order: (link to ticket)
[TICKET TITLE] (This is the property address on my site)
[USER FIELD 1] Client Information (header)
[USER FIELD 2] Full Name:
[USER FIELD 3] Company:
[USER FIELD 4] Phone Number:
[USER FIELD 5] Email:
[USER FIELD 6] Billing Address:
[USER FIELD 7] Additional Property Information (header)
[USER FIELD 8] Vacancy Information
[USER FIELD 9] Occupied InformationThe content of the work order is: “Repair this. Repair that. Okay to invoice for $400. TEST”
So basically I want the emails to show the ticket title in the body, as well as all the user fields, and for the contents to not print “ ” between everything. I know I have to edit /php/submit_ticket.php to do this.
$to = $devOptions['email']; // Send this to the admin $subject = __("New Work Order:", 'wpsc-support-tickets').' "'. strip_tags($_POST['wpscst_title']).'"'; $message = __('There is new a work order: ','wpsc-support-tickets').get_admin_url().'admin.php?page=wpscSupportTickets-edit&primkey='.$lastID; if($devOptions['use_ticket_in_email']=='true') { $message .= "\r\n"; $message .= "\r\n"; $cleaned_message = __("The content of the work order is: ", 'wpsc-support-tickets'). '"'. strip_tags($_POST['wpscst_initial_message']) .'"'; $message .= $cleaned_message;
This is the original code. I know I need to add the fields to the $cleaned_message value, but I’m not sure how to call the title and user fields to add them to the email messages, or how to omit printing “ ”
How do I do this?
- The topic ‘Cleaning up ticket emails.’ is closed to new replies.