Zen Cart Logo
Forums / General Questions / Send Email Function - add another group to send to

Send Email Function - add another group to send to

Locked

Views: 4,605

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
27 Mar 2007, 4:20 PM
#1
sysfix avatar

sysfix

Zen Follower

Join Date:
Jul 2005
Posts:
124
Plugin Contributions:
0

Send Email Function - add another group to send to

Hi - I want to amend the send email function. Im not sure im on the right track (i think i am...) but there are that many functions im struggling to work it all out.

I want to send an email - or add the option to selct customers where group pricing = 1 for example. I will do the same for 2 and 3

I have opened up mail.php from admin folder and have found this code....

if ( ($action == 'send_email_to_user') && isset($_POST['customers_email_address']) && !isset($_POST['back_x']) ) {
$audience_select = get_audience_sql_query(zen_db_input($_POST['customers_email_address']), 'email');
$mail = $db->Execute($audience_select['query_string']);
$mail_sent_to = $audience_select['query_name'];
if ($_POST['email_to']) {
$mail_sent_to = zen_db_prepare_input($_POST['email_to']);

there is also similar code referred to as preview

If this is correct, can someone point me in the right direction on how to add a query to select customers_email_address where customers_group_pricing=1

and have this as an option to select in the send to function on the email in admin......

27 Mar 2007, 7:03 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Send Email Function - add another group to send to

Use phpMyAdmin to peek at the queries in the "query_builder" table.
Those queries are used to build the options in the pulldown menu in all the admin email pages.
Just add another query to accomplish the task you're after.

No need to touch any PHP.

28 Mar 2007, 8:38 AM
#3
sysfix avatar

sysfix

Zen Follower

Join Date:
Jul 2005
Posts:
124
Plugin Contributions:
0

Re: Send Email Function - add another group to send to

wow - you really have coded this well - how easy was that!
Wish I knew how to do stuff like this..oh well
thanks :)

28 Mar 2007, 3:01 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Send Email Function - add another group to send to

Pretty cool huh :D
It was just one of those things that came up ... hey, wish it could do this ... and ... well ... look what resulted ! :blush: