views:

34

answers:

1
+1  Q: 

donation in Drupal

Hi all,

My site have a number of different persons each representing different diseases. I made a content type "person" to represent each person, and add some cck fields such as name, image, location etc...Now all I want to do is add the ability to donate to their cause. Each individual would have a donate button on her/his page. I'd also want to be able to track the donation and reflect the amount that had already been collected by each person (for example $25/$500). Now all the money will be going to one paypal account (not to each individual person's account), so I'm really not sure how to track the amount for each person. Any advice on this is highly appreciated! I'm using drupal 6

+1  A: 

If you have a Donate form tied into a Paypal account, you could easily create some hooks to capture the form submission, look at the donated Amount, and update the appropriate CCK field for that particular 'person'.

Kevin
Hi Kevin, you mean using hook_form_alter to hook into the donate form?
berto77
Yes that and a submit hook so you can look at the posted value, and add that to the node's donated total so you can keep a tally per donation to a Person (node).
Kevin
So "total_donated" would be a cck text field. I guess I'd also need another cck field to represent the "aim" amount for that person. Then I basically update the total_donated field as you say, during the form submit process. Thanks a lot! I'll test this out.
berto77
Yeah thats probably how I would approach it
Kevin

related questions