Change Confirmed opt In text

Hello,

i have a question.

in which file I can change the confirmed Opt In text which i get when i click the link in the email?

Now it says something like : Email confirmed:"email@email.com"

I want to change this text.

I also looked in the file: EntryPointConfirmOptInHandler.php

and change following part:

        if ($confirmedOptInEmailsSent > 0) {
            $msg .= sprintf($app_strings['RESPONSE_SEND_CONFIRM_OPT_IN_EMAIL'], $confirmedOptInEmailsSent);
        }

but when i change this nothing happens…

can somebody help me please?

Note that there are more places in that file using similar strings… Maybe you changed only one, and not the correct one :slight_smile:

But the nice way to do this is to do a proper string customization as instructed here:

https://docs.suitecrm.com/developer/language-strings/#_application_strings

See also these other strings you might want to change:



 $ grep CONFIRM_OPT_IN /var/www/html/include/language/en_us.lang.php

    'LBL_CONFIRM_OPT_IN_TITLE' => 'Confirmed Opt In',
    'LBL_CONFIRM_OPT_IN_DATE' => 'Confirmed Opt In Date',
    'LBL_CONFIRM_OPT_IN_SENT_DATE' => 'Confirmed Opt In Sent Date',
    'LBL_CONFIRM_OPT_IN_FAIL_DATE' => 'Confirmed Opt In Fail Date',
    'LBL_CONFIRM_OPT_IN_TOKEN' => 'Confirm Opt In Token',
    'LBL_SEND_CONFIRM_OPT_IN_EMAIL' => 'Send Confirm Opt In Email',
    'LBL_CONFIRM_OPT_IN_ONLY_FOR_PERSON' => 'Confirm Opt In Email sending only for Accounts/Contacts/Leads/Prospects',
    'LBL_CONFIRM_OPT_IN_IS_DISABLED' => 'Confirm Opt In Email sending is disabled, enable Confirm Opt In option in Email Settings or contact your Administrator.',
$app_strings['RESPONSE_SEND_CONFIRM_OPT_IN_EMAIL'] = 'The confirm opt in email has been added to the email queue for %s email address(es). ';
$app_strings['RESPONSE_SEND_CONFIRM_OPT_IN_EMAIL_NOT_OPT_IN'] = 'Unable to send email to %s email address(es), because they are not opted in. ';
$app_strings['RESPONSE_SEND_CONFIRM_OPT_IN_EMAIL_MISSING_EMAIL_ADDRESS_ID'] = '%s email address do not have a valid id. ';

thank you that is a good hint.

but my intention is that i change this if cause that the programm redirects to an other page

and when i change this cuase nothing happens

foreach ($uids as $uid) {
            $emailMan = new EmailMan();
            if (!$emailMan->addOptInEmailToEmailQueue($module, $uid)) {
                $errors++;
            } elseif ($emailMan->getLastOptInWarn()) {
                $warnings++;
            } else {
                $confirmedOptInEmailsSent++;
            }
        }

        if ($confirmedOptInEmailsSent > 0) {
            $msg .= sprintf($app_strings['RESPONSE_SEND_CONFIRM_OPT_IN_EMAIL'], "test"/*$confirmedOptInEmailsSent*/);
        }

        if ($warnings > 0) {
            $msg .=  sprintf($app_strings['RESPONSE_SEND_CONFIRM_OPT_IN_EMAIL_NOT_OPT_IN'], $warnings);
        }

        if ($errors > 0) {
            $msg .=  sprintf($app_strings['RESPONSE_SEND_CONFIRM_OPT_IN_EMAIL_MISSING_EMAIL_ADDRESS_ID'], $errors);
        }


        return $msg;

Sorry, I didn’t understand that part about the redirect. I thought we were talking about simply changing the text of a label… :huh:

When I have the opt in of the email it show me only a blank white page which I dont like and so i want to redirect to another page but when I change this page then nothing happens…

You need to try and change the output of the redirected page (to make it look like you want), not redirect to a different page altogether. If you do that then SuiteCRM will have no way to register the action.

And start by making sure that this white page is really an output, and not a FATAL error. Check both your logs at that time. I am sure there should be some message there on the screen, not simply a white screen…

yes i have a white page with one sentence but I want to show my page and not an ip adress of the suitecrm

:confused:

It would be easier and faster to help you if were more precise. if your screen has a sentence on it, don’t say it is empty. And if you tell me exactly which sentence is written there, I can search the code and find it quickly…

so the text is in german because the german language so it says:

Auswahl ihrer Emailadresse bestätigt: "mk@email.de"

Sorry, I don’t have the German language installed, can you switch to English and get the exact string?

Or you can search your own code for that string in German, and find the name of that label (LBL_something) and tell me.