Email notifications, add extra field

Phoca Download - download manager
89854
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 04 Jan 2012, 14:15

Email notifications, add extra field

Post by 89854 »

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?
SonRiab
Phoca Professional
Phoca Professional
Posts: 258
Joined: 02 Jun 2011, 09:29
Contact:

Re: Email notifications, add extra field

Post by SonRiab »

You have to customize /JOOMLAROOT/administrator/components/com_phocadownload/helpers/phocadownload.php. The function "sendPhocaDownloadMail" is located at line 942.
89854
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 04 Jan 2012, 14:15

Re: Email notifications, add extra field

Post by 89854 »

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 :)
SonRiab
Phoca Professional
Phoca Professional
Posts: 258
Joined: 02 Jun 2011, 09:29
Contact:

Re: Email notifications, add extra field

Post by SonRiab »

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;
Post Reply