Stop notification email going out on manual payment

Discussion in 'Customization & add-ons' started by piratepete, Nov 4, 2010.

  1. piratepete

    piratepete New Member

    Joined:
    Apr 14, 2009
    Messages:
    23
    Our organisation accepts memberships offline (via cheque) and online via our website. When someone renews offline I have to manually add their subscription using the aMember admin function. However, this causes an email to be sent out both to the user and the admin. This is causing confusion - is there any way to stop these emails going out for manual submissions without having to first go to the control panel and switch off email notifications, then having to remember to switch them back on afterwards, while hoping that no-one signs up online while the notifications are switched off?

    Additionally, is there any way to have sign-up emails go to a different email address than the administrator address? That way it will be easier for me to set up filtering rules as the emails need to be re-directed to two other people as well. Ideally I need signup emails to go to one address and renewal emails to go to another address, while keeping all admin notifications going to the website admin address. I'm assuming I'd need to do some hacks for this as I can't see anywhere in the control panel allowing this - would be a useful feature!
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    Yes this will require aMember code customizations:
    1. Edit /amember/common.inc.php and change two functions:
    PHP:
    function mail_payment_admin($payment_id$member_id){
        global 
    $db$config;

        
    $t = &new_smarty();
        
    $p $db->get_payment($payment_id);
    add one line :
    PHP:
    function mail_payment_admin($payment_id$member_id){
        global 
    $db$config;

        
    $t = &new_smarty();
        
    $p $db->get_payment($payment_id);
        if(
    $p[paysys_id] =='manual') return; 
    Then change:
    PHP:
    function mail_payment_user($payment_id$member_id){
        global 
    $db$config$_AMEMBER_TEMPLATE;
        
    $t new_smarty();
        
    $p $db->get_payment($payment_id);
    to
    PHP:
    function mail_payment_user($payment_id$member_id){
        global 
    $db$config$_AMEMBER_TEMPLATE;
        
    $t new_smarty();
        
    $p $db->get_payment($payment_id);
        if(
    $p['paysys_id'] == 'manual') return;
    Emails will not be sent for manual payments.


    2. Not sure I understand, do you mean admin payment notifications?
  3. deafdavid

    deafdavid Member

    Joined:
    Aug 28, 2006
    Messages:
    153
    Alex, we have large number of members that we updated by manual; I do hope you'll find a way to add a feature in a4 version -- set to default to no for sending email and when we update our membership, we have an option to hit a send button to send an customize email.
  4. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    Ok will add this to our todo list.
  5. piratepete

    piratepete New Member

    Joined:
    Apr 14, 2009
    Messages:
    23
    Hi Alexander - sorry, I only just saw your reply - many thanks for this. Another related question - I am trialling aMember v4 on new hosting for the same site...did you manage to sort this out on your to-do list for v4? If not, how do I customise v4 for the manual updates?

    Regarding the second part of my question in my original post, is this possible yet, or do I need to do a hack such as I did for V3?

  6. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    aMember 4 will not send payment receipt messages formanual payments.
  7. piratepete

    piratepete New Member

    Joined:
    Apr 14, 2009
    Messages:
    23
    Great news...thanks! But what about this:
  8. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    Currently aMember can't copy signup emails to admin address.So this require customization.
  9. piratepete

    piratepete New Member

    Joined:
    Apr 14, 2009
    Messages:
    23
    Sorry, I meant notification emails - aMember v3 sends notification emails to admin address when someone signs up - can these be sent to different addresses for signup and for renewals?
  10. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    Yes this can be done as customization. Contact us in helpdesk if you need this.

Share This Page