I have read the help on hooks but don't yet understand them. I am an intermediate php and mysql developer. Basically I want to customise the signup page so that as well as creating a new reocrd in the amember table for a new user it also does other things like add records to a different table. I am fine with writing the code to add records to my other tables etc, but I don't know how to fit it into the amember signup page. Any help gratefully received. Cheers Aleon
Aleon, you need to write a hook like described here: http://www.cgi-central.net/scripts/amember/docs/html/hooks_paymentsupdate.htm put it into file amember/site.inc.php (create it!) This hook will be called not when user makes signup. It will be called when user COMPLETES payment and I believe it is what you really need to catch. When user just filled-in aMember signup page, it doesn't mean anything, he can leave away without payment. You can try this by marking user payment record in aMember CP as paid. Hook will be called in this case.
where is this link now located? The link here http://www.cgi-central.net/scripts/amember/docs/html/hooks_paymentsupdate.htm - no longer works. Can you please duplicate the original document- or point to the current location. Thanks.
General: http://manual.amember.com/Using_site.inc.php_and_hooks For Integration hooks: http://manual.amember.com/Creating_New_Integration_Plugins
This section is missing from the referred URL Thanks, I already looked in the manual- the page appears missing. I found the information myself in an old copy of the CHM Windows manual. ###begin missing section### Hooks - payments update finish_waiting_payment($payment_id) This function called when payment(subscription) status changes to Paid ("Completed"). Then you can retreive info from database about payment and use it to execute some actions. Please note - if admin switches payment status Paid -> NotPaid -> Paid from control panel, this function can be executed twice for the same payment. Be careful. Example of this hook function: function fwp($payment_id){ global $db; $payment = $db->get_payment($payment_id); // $payment is now array $product = $db->get_product($payment['product_id']); $member = $db->get_user($payment['member_id']); print "For this period: $payment[begin_date] - $payment[expire_date]<br>"; print "$product[title] ordered by $member[name_f] $member[name_l]<br>"; } update_payments($payment_id) This function called when payment $payment_id has been updated somehow - changed, marked as paid, added, deleted. You can use the same code as for finish_waiting_payment function. ###end### Hopefully this may be useful to others. Thanks for your reply.