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
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
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
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
Hi Cornelio,
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
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi Max,
I'm using a query in a custom code
Best Regards
Hi Cornelio,
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
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
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
Hi Cornelio,
Why do you use custom code? just use a "db read" and use the code I provided earlier ?
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi Max,
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:
$form->data["user_email"] = $user_email;
Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Hi Max,
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
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.