Re: Re: Can I use Ubercart to send an e-mail to all persons who

Posts: 1376
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

Yeah, sounds like you'd want to hook into hook_cron, write a custom module that (when Cron is run) executes the query in Shawn's post above. You might make an "intermediary" Database Table, to keep track of users that have been notified; just in case you run Cron a bunch of times, you don't want the same people to get duplicate emails.

With the help of a uc_roles product and feature combination, you could sell the role of "subscriber" and then your custom module could send out the emails when Cron is run, only to users belonging to the "Subscriber" role. (Cron will need to be setup on your server - it's easy if you have phpMyAdmin and a Linux / Plesk server).

For more info on Cron with Linux click here: http://www.google.com/url?sa=t&ct=res&cd=2&url=http%3A%2F%2Fwww.linuxhel...

On my Plesk box I have it setup like this:

/usr/bin/wget -O - -q http://www.example.com/cron.php 5 * * * *
(That runs it on the 5th minute of every hour).

Hope this helps.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Can I use Ubercart to send an e-mail to all persons who purchased a certain product? By: f2stop (2 replies) Mon, 01/21/2008 - 12:21