No 'payment received' email for free products

Discussion in 'Templates customization' started by Dave_Word, Jul 8, 2005.

  1. Dave_Word

    Dave_Word aMember Pro Customer

    Joined:
    Jun 21, 2005
    Messages:
    8
    Hi

    Sorry if this is an obvious one. For free products, the member still gets a 'thank you -- your payment has been received' email showing a payment of '0.00'.

    Is there a way to stop this email being sent just for free products?

    Thanks

    Dave
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    You can do this.
    Edit file
    amember/common.inc.php
    find lines
    $p = $db->get_payment($payment_id);
    if ($p['data'][0]['ORIG_ID'] > 0) return; // don't sent for child payments
    replace to
    $p = $db->get_payment($payment_id);
    if ($p['amount'] == 0.0) return ;
    if ($p['data'][0]['ORIG_ID'] > 0) return; // don't sent for child payments
  3. Dave_Word

    Dave_Word aMember Pro Customer

    Joined:
    Jun 21, 2005
    Messages:
    8
    Thanks Alex!

    That's great -- works perfectly.

    Dave :)

Share This Page