Okay
  Public Ticket #3442066
Email for quote
Closed

Comments

  •  1
    Dan Greenberg started the conversation

    Hi

    I would like to change in the email we get after a B2B client asking for a Quote

    Would like to have his NAME instead of the USERNAME

    Which template do i need to change and where do i find it in files please?

    Thank you

  •  2,623
    WebWizards replied

    Hi Dan,

    For that, you would need to modify the new-message-email-template.php file

    This file is found in b2bking pro/includes/emails/templates/new-message-email-template.php


    I would advise to copy the template and paste it directly under your child theme, as we describe here: https://woocommerce-b2b-plugin.com/docs/how-to-customize-b2bking-emails/#1-toc-title - then you can edit the template under the child theme.

    This way you would not lose changes when you update the plugin.


    Kind regards,

    Stefan

  •  2,623
    WebWizards replied

    You would need to change line 63 here:

    7185648353.png

    The variable $user_login contains the username.

  •  1
    Dan Greenberg replied

    Hi

    But to which parameter do i need to change in order to show the Name instead of the Username:

    https://prnt.sc/B9Xh3ABp38lR

    https://prnt.sc/g6lgRzzZ_J_e

    Thank you

  •  2,623
    WebWizards replied

    You could replace line 63 there with the following:

    $user = get_user_by('login', $user_login);
    if ($user){
        echo $user->first_name.' '.$user->last_name; // another option is echo $user->display_name;
    }