• Resolved p4ntoufle

    (@p4ntoufle)


    Hi everyone,

    I encouter difficulties customizing the .php files of the SJB plugin.
    I want the email notification (received by applicants) to say “Hi [Firstname]”.

    For now, it says “Hi Applicant” which is barely ok. Is there any way to replace default* -Applicant- value by the applicant’s firstname since it’s collected in the admin email notification (Applicant Details).

    *Looking further in the .php file, this says that Applicant is -else- value.

    ” // Applicant Email Template.
    $message = esc_html__(‘Hi’, ‘simple-job-board’);

    if (NULL != $applicant_name):
    $message .= ‘ ‘ . $applicant_name . ‘,’;
    else:
    $message .= ‘ ‘ . esc_html__(‘Applicant’, ‘simple-job-board’) . ‘,’;
    endif;

    In other words, how can i link my firstname field (second blank box applicant fills) to this $applicant_name, because right now that doesn’t seem to work on its own 🙂

    Best regards,

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author PressTigers

    (@presstigers)

    Hello @p4ntoufle,

    Thanks for using our plugin. $applicant_name is collected through “Application Form Fields”. If you have a field named “Name” or at least having “Name” in its name It will use that.

    Please let us know if you need further assistance.

    Regards,

    Hi,

    you need to go to the applicant_notification() function then add those lines:

    $applicant_first_name = self::applicant_details('firstname', $post_id); this will return the applicant first name from database.
    Important: the ‘firstname’ string param has to be exactly the one you gave to the First Name text field when you created the application form, not case sensitive. Or you can check it up in the database in the postmeta table under meta_key field.

    Then replace ‘applicant’ string with $applicant_first_name variable in : $message = self::job_notification_templates($post_id, 'applicant'); statement

    • This reply was modified 8 years, 3 months ago by gadibou. Reason: highlight code
    Thread Starter p4ntoufle

    (@p4ntoufle)

    Hello again,

    Thanks both for your quick answer.

    @presstigers: I did some testing, you’re right 🙂 Whenever I replace any of the job application field by the value “name” or “Name” or even “XBATXksfnameJDH”, it worked.

    @gadibou: I tried your solution but surely failed as I can’t manage to solve the issue.

    Here is the catch i forgot to mention earlier, my website is in french. For the EN version, the plugin works 100%. But I can’t no longer use “name” as a field for my french job application.

    There is no simple way to replace the ‘name’ value by ‘prenom’ (french translation) in one spot for the whole thing?

    Anyway, Thank you !

    @p4ntoufle

    Sorry, I misunderstood your issue.

    Inside applicant_email_template($post_id, $notification_receiver ) method you would replace ‘name’ in this statement $applicant_name = self::applicant_details( 'name', $post_id ); by ‘prenom’ if ‘prenom’ is the field name you gave in the Application Form(case insensitive). I think the best way is to check up how it is stored in the database in the postmeta table, so there you can be sure that the meta_key value is ‘jobapp_prenom’

    Regards

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Customized applicant email notification template’ is closed to new replies.