Email notifications, add extra field
-
- Phoca Newbie
- Posts: 8
- Joined: 04 Jan 2012, 14:15
Email notifications, add extra field
When a file is downloaded I receive an email telling me which user has downloaded it. When a new user registers they are required to provide their phone number, how would I get phocadownload to send that phone number in the notification email along with their name?
-
- Phoca Professional
- Posts: 258
- Joined: 02 Jun 2011, 09:29
- Contact:
Re: Email notifications, add extra field
You have to customize /JOOMLAROOT/administrator/components/com_phocadownload/helpers/phocadownload.php. The function "sendPhocaDownloadMail" is located at line 942.
-
- Phoca Newbie
- Posts: 8
- Joined: 04 Jan 2012, 14:15
Re: Email notifications, add extra field
I have little experience with php, do you know what I would have to add or could you point me in the right direction?
Many thanks
Many thanks

-
- Phoca Professional
- Posts: 258
- Joined: 02 Jun 2011, 09:29
- Contact:
Re: Email notifications, add extra field
You have to know where the numbers are saved (database table, field), then you have to add a database query to get the right number (using the user id in most cases) and after this you can add it to the output. You can find out where it is saved by using phpmyadmin for example. To learn how to query the database in Joomla I would recommend to see how PD does it (search for "select") and how PD uses the result. The query should be similar to this:
SELECT fieldnamehere FROM tablenamehere WHERE useridfieldhere=userid;
SELECT fieldnamehere FROM tablenamehere WHERE useridfieldhere=userid;