[SOLVED] Add the customer email in the landing page after new ticket creation

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
corsari
Posts: 12
Joined: Sun Dec 29, 2024 4:06 pm

[SOLVED] Add the customer email in the landing page after new ticket creation

Post by corsari »

Script URL:
Version of script: 3.5.1
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:

Hello
when a visitor creates a new ticket, right after having clicked the "Submit Ticket" button , he/she lands on a landing page that states "Your ticket is sent" and also it shows the ticket ID
also there is a message written in RED telling about the emails that goes in the SPAM folder
Here I want to write/use the email address that the customer entered in the form

Is there a variable for that purpose to be used in that landing page? This is fundamental for the user to check if he wrote correctly his/her mail address

Thank you
Last edited by corsari on Wed Jan 01, 2025 6:03 pm, edited 1 time in total.
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: Add the customer email in the landing page after new ticket creation

Post by Klemen »

There is no email variable passed directly.

You would either need to pass it to the template in /submit_ticket.php, or define global $ticket; in the theme file and use $ticket['email'] there.

Note that such customizations are out of the scope of support we provide here, so please consult a PHP developer if you cannot get it to work yourself.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
corsari
Posts: 12
Joined: Sun Dec 29, 2024 4:06 pm

Re: Add the customer email in the landing page after new ticket creation

Post by corsari »

Thank you
For the reply and for the hint
corsari
Posts: 12
Joined: Sun Dec 29, 2024 4:06 pm

[SOLUTION] Add the customer email in the landing page after new ticket creation

Post by corsari »

Hello

Allow me to kindly suggest this modification/implementation to HESK when the ticket is correctly created.

In fact, it happens that the user, absentmindedly or distracted, enters an email they no longer use or forgets that their email address included a number or digit in addition to their first and last name, or as well absentmindedly or distracted types twice the same typo

the following modifications will add a graceful and magnified (H2) phrase stating
Mail sent to: mail-address-typed-by@the.user
right below is fired the message $hesklang['spam_inbox'] found again in the text.php which should be modified accordingly, e.g. in my case
"No confirmation message? Double-check the email address above.
We have sent a confirmation message to that email address. If it is entered correctly but you do not receive anything within a few minutes, please check your "Spam," "Junk," or "Unwanted" mail folders.
To manage this case, you will need to receive notifications from this system, so we recommend marking the message as NOT SPAM if necessary.
If you have mistyped some character, please create a new ticket.
"

Applied changes:

added a string in the file text.php in /languages. Added

Code: Select all

$hesklang['email_check_conf']='<span><h2>Mail sent to: ';
as suggested, added a variable to ./submit_ticket.php around line 660

Code: Select all

$hesk_settings['render_template'](TEMPLATE_PATH . 'customer/create-ticket/create-ticket-confirmation.php', array(
    'trackingId' => $ticket['trackid'],
    'emailProvided' => $email_available,
    'messages' => $messages,
    'serviceMessages' => hesk_get_service_messages('t-ok'),
	'customerLoggedIn' => $user_context !== null,
	'customerUserContext' => $user_context,
	'userEmailInput' => $_POST['email']
));
and finally updated the template view customer/create-ticket/create-ticket-confirmation.php around line 102

Code: Select all

if ($emailProvided && $hesk_settings['notify_new'] && $hesk_settings['spam_notice']) {
    echo $hesklang['email_check_conf'].$userEmailInput.'</h2></span>';
    echo $hesklang['spam_inbox'];
}
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: [SOLVED] Add the customer email in the landing page after new ticket creation

Post by Klemen »

Thanks for sharing your solution!
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply