• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Email script...

Email script... 4 years 2 months ago #39760

Hi support,

I'm trying to add data via a PHP script and add it to the userEmail.
Trying this via this code:

if(!isset($_POST)){

list($replace, $with) = RSFormProHelper::getReplacements($SubmissionId);

$payMethod = str_replace($replace, $with, '{payMethod:value}');
$payTerm = str_replace($replace, $with, '{chooseTerm:value}');
$totalAmount = str_replace($replace, $with, '{totalAmount:value}');

if ($payTerm == 'Volledig bedrag in een keer') {
$payTerm = 1;
} else if ($payTerm == 'Halfjaarlijks') {
$payTerm = 2;
} else if ($payTerm == '4 Kwartalen') {
$payTerm = 4;
} else if ($payTerm == '12 Maanden') {
$payTerm = 12;
}
if ($payMethod == 'Bankoverschrijving') {
$termAmount = $totalAmount / $payTerm;
}
}
$modUserEmailText = $form->UserEmailText;

$modUserEmailText = str_replace('{payTerm:value}',$payTerm,$modUserEmailText);
$modUserEmailText = str_replace('{termAmount:value}',$termAmount,$modUserEmailText);

$userEmail = $modUserEmailText;
$userEmail = str_replace($placeholders, $values, $userEmail);

But this is not working and cannot figure out where I go wrong.
The payTerm should be 1, 2, 4 or 12 and the termAmount should be totalAmount divided by payTerm.

Hope anyone can help.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!