Hi,
I have this in my listener email configuration:
Dynamic To: variable paypal 'payer_emal'
To: name_form_field
everything works ok
This configuration IPN sends two e-mails correctly.
therefore it presupposes that the one who pays is the one who receives the email
now I need to send the same mail also to unregistered user of Paypal, taken from a form field.
It is the case of the son who uses the PayPal account of his father, but he wants to receive email and attachments.
how I can do this?
Thanks in advance
I have this in my listener email configuration:
Dynamic To: variable paypal 'payer_emal'
To: name_form_field
everything works ok
This configuration IPN sends two e-mails correctly.
therefore it presupposes that the one who pays is the one who receives the email
now I need to send the same mail also to unregistered user of Paypal, taken from a form field.
It is the case of the son who uses the PayPal account of his father, but he wants to receive email and attachments.
how I can do this?
Thanks in advance
Hi Cornelio,
You will need to save the data before the user goes to PayPal then load it back later in the "listener", this is straight forward but requires some configuration, please check this tutorial:
http://www.chronoengine.com/faqs/57-cfv4/cfv4-actions/2583-how-to-use-the-paypal-redirect-action.html
Best regards,
Max
You will need to save the data before the user goes to PayPal then load it back later in the "listener", this is straight forward but requires some configuration, please check this tutorial:
http://www.chronoengine.com/faqs/57-cfv4/cfv4-actions/2583-how-to-use-the-paypal-redirect-action.html
Best regards,
Max
Hi Max,
Ok.
I have selected the email value from db, eg $user_emal, so I should enter this value in the 'Dynamic To', but how?
Thanks in advance
Best Regards
Ok.
I have selected the email value from db, eg $user_emal, so I should enter this value in the 'Dynamic To', but how?
Thanks in advance
Best Regards
Hi Cornelio,
If the "db read" has "load data under model id" enabled then you can use this in the "To" box:
Best regards,
Max
If the "db read" has "load data under model id" enabled then you can use this in the "To" box:
{Data.user_email}
Best regards,
Max
Hi Cornelio,
So how do you get the data ? please try this:
Then in the "To" box: {user_email}
Best regards,
Max
So how do you get the data ? please try this:
<?php
$form->data["user_email"] = $user_email,
Then in the "To" box: {user_email}
Best regards,
Max
Hi Max,
my query:
Best Regards
my query:
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('o_email');
$query->from($db->quoteName('#__cf_orders'));
$query->order('created_on DESC');
$query->setLimit('1');
$db->setQuery($query);
$user_mail = $db->loadResult();
Best Regards
Hi cornelio,
If I read this correctly it assumes that the email that you want is in the last record saved. This is not a reliable way of of doing this. I suggest that you add an identifier to the record when the form is first submitted, add this to the data sent to PayPal as e.g. the invoice number. Then you can use that identifier in the PayPal Listener to load the matching record to get the email (or any other info).
Bob
If I read this correctly it assumes that the email that you want is in the last record saved. This is not a reliable way of of doing this. I suggest that you add an identifier to the record when the form is first submitted, add this to the data sent to PayPal as e.g. the invoice number. Then you can use that identifier in the PayPal Listener to load the matching record to get the email (or any other info).
Bob
HI Bob,
I agree with you.
I must add here 'To Dynamic' email value that coming from a query in which I previously saved as ID?
Best Regards
I agree with you.
...This is not a reliable way of of doing this
I must add here 'To Dynamic' email value that coming from a query in which I previously saved as ID?
Best Regards
Hi Cornelio,
Why do you use custom code? just use a "db read" and use the code I provided earlier ?
Best regards,
Max
Why do you use custom code? just use a "db read" and use the code I provided earlier ?
Best regards,
Max
Hi Max,
certainly, I would just understand how traslate this for DBRead: $query->setlimit('1');
thank you
certainly, I would just understand how traslate this for DBRead: $query->setlimit('1');
thank you
Hi Cornelio,
You can't control this in v5, but v6 has the option to select the first matching record only.
If you want to use v5 then you can use your custom code, you can add this line to your code:
Best regards,
Max
You can't control this in v5, but v6 has the option to select the first matching record only.
If you want to use v5 then you can use your custom code, you can add this line to your code:
$form->data["user_email"] = $user_email;
Best regards,
Max
Hi Max,
Your suggestion does not seem to work
to remember that we are on ipn listener.
thanks and Best Regards
Your suggestion does not seem to work
to remember that we are on ipn listener.
thanks and Best Regards
Hi Cornelio,
In the "Dynamic to" you should not use "{}", just use "user_email".
Best regards,
Max
In the "Dynamic to" you should not use "{}", just use "user_email".
Best regards,
Max
This topic is locked and no more replies can be posted.