Skip to content

Instantly share code, notes, and snippets.

@cgi-caesar
Created June 30, 2020 10:57
Show Gist options
  • Save cgi-caesar/92fefd248d17d9b397ee64a117e6e6c3 to your computer and use it in GitHub Desktop.
Save cgi-caesar/92fefd248d17d9b397ee64a117e6e6c3 to your computer and use it in GitHub Desktop.
aMember (site.php): Add column with PayPal Email to grid with affiliate payout details
<?php
Am_Di::getInstance()->hook->add('gridAffPayoutDetailInitGrid', function(Am_Event_Grid $e) {
$e->getGrid()->getDataSource()
->leftJoin('?_data', 'd', "d.`table`='user' AND d.`key` = 'aff_paypal_email' AND u.user_id = d.`id`")
->addField('d.value', 'aff_paypal_email');
$e->getGrid()->addFieldBefore('name_f', 'aff_paypal_email', 'PayPal Email');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment