I've got multiple products. Some are paid products, and one isn't (there for free forum registration). How can I disable amember from sending me emails when a user signs up for the free product/forum registration, and only allow emails from the paid products? I only see a global setting for enabling emails for every product, free or not.
Amember sends me an email saying, 'new payment completed' every time someone signs up for a free membership. I've got vbulletin integrated with amember. I have a few products - paid, and one that is simply a forum registration. Every time someone signs up for any product, free or not, amember sends the 'new payment completed' email. I'd like for amember to ONLY send me an email saying 'new payment completed' if it's a paid product, and not the free option.
Edit /amember/common.inc.php and change this : Code: function mail_payment_admin($payment_id, $member_id){ global $db, $config; $t = &new_smarty(); $p = $db->get_payment($payment_id); $u = $db->get_user($p['member_id']); $pr = $db->get_product($p['product_id']); /////////////////////////////////// $t->assign('user', $u); $t->assign('payment', $p); $t->assign('product', $pr); /////////////////////////////////// $et = & new aMemberEmailTemplate(); $et->name = "send_payment_admin"; mail_template_admin($t, $et); } to Code: function mail_payment_admin($payment_id, $member_id){ global $db, $config; $t = &new_smarty(); $p = $db->get_payment($payment_id); if($p['paysys_id'] == 'free') return; $u = $db->get_user($p['member_id']); $pr = $db->get_product($p['product_id']); /////////////////////////////////// $t->assign('user', $u); $t->assign('payment', $p); $t->assign('product', $pr); /////////////////////////////////// $et = & new aMemberEmailTemplate(); $et->name = "send_payment_admin"; mail_template_admin($t, $et); }
How would I disable automatically added products? I have a product that automatically adds several products, so I get lots of emails with $0. How would I disable these? Looking at the admin, they are "manual" pay system. Is there a way to code it so only the automatically added products can be excluded?
Change this line in above code: if($p['paysys_id'] == 'free') return; to if($p['paysys_id'] == 'manual') return;