By mr_abboud on
We have a website for donations to children who needs heart surgerys, I want to move the website to Drupal. In the current website the database is connected to the payment page so whenever a donation is made the amount needed for each child is reduced. Is there a module that I can use to manage the children's data and link it to a payment gateway? Or is there something close to what I need?
this is the website: http://www.shevet.org
Rahif Abboud
http://www.perfect-cv.com
Comments
RE:
Hey,
I don't know a module that can help you specific, I would do it like this:
First you must install cck module to your new drupal site, create a new content type - lets say - 'child', with fields like money_needed, etc.
Copy all child information you have on your DB to your drupal DB - by running once a huge query or running once code like this:
pseudo code:
childs = sql query on all childs in your DB
for every child in childs
#create a new child node in drupal:
$child = new StdClass();
$child->type = 'child';
$child->title = child->field_name;
$child->status = 1;
$child->uid = 1;
$child->field_money_needed = child->money_needed;
#all other field u need
node_save($child);
now u can build a function that receives child node nid, and amount to reduce:
function reduce_amount($nid,$amount){
$child = node_load($nid);
$child->money_needed = $child->money_needed - $amount;
# other actions..
node_save($child);
}
u call this function each time u receive payment.
if you have questions i'll be happy to answer.
Ram Segal
Sergata ltd
Depending on your other
Depending on your other requirements it may be over-kill, but you might want to take a look at CiviCRM( http://civicrm.org/ ) especially their upcoming Personal Contribution Pages ( http://civicrm.org/node/482 ) Their basic donation page function can do what you describe, but PCP can take it much further.
-------------------
http://www.PrivacyDigest.com/ News from the Privacy Front (Drupal)
http://www.SunflowerChildren.org/ Helping children around the world ( Drupal)