Using simple donations, possible to collect name and address?

Right now it seems the simple donations really only gives their paypal email address as far as identifying information (please correct me if I am wrong).

I am wanting to use this plugin as a post-kickstarter preorder sort of system where we still offer stretch rewards and funding tracking but where orders are taken immediately and not as pledges/preauths.

Basically the plugin does what I need it to minus the ability to collect just a little more info when they donate. We just need to get shipping info from them so we can send their rewards out when the time comes. Is there a simple way to get that somewhere in the mix?

  • aecnu

    Greetings gunn4r,

    Thank you for the great question!

    This can be accomplished a couple ways though custom they would certainly be.

    One would be using Gravity Forms and another possibility would be the Custom Press plugin.

    I will also see if I can get the lead developer of Fundraising in here to possibly comment on if I missed anything and the possibility of making the input of "Shipping Information" as a feature request.

    Though this may take a bit longer then a normal ticket, I will try to get him in here asap.

    Thank you for being a WPMU Dev Member!

    Cheers, Joe

  • digitsoft

    I haven't tested this, but it should work since it's just adding more info that's already being passed back by Paypal.

    This will put information into the database, but it won't be displayed - you'd have to use phpmyadmin or write other code to display it. Your alternative would be to create another table, insert information into it, and then display it somewhere.

    1. Edit /fundraising/lib/gateways/paypal.php
    2. Insert this at line 318 - above the "if" statement:

    $transaction['address_country'] = $_POST['address_country'];
    $transaction['address_city'] = $_POST['address_city'];
    $transaction['address_state'] = $_POST['address_state'];
    $transaction['address_street'] = $_POST['address_street'];
    $transaction['address_zip'] = $_POST['address_zip'];
    $transaction['contact_phone'] = $_POST['contact_phone'];

    For testing - backup your database & test with the sandbox - not live.

  • gunn4r

    Okay I tried out that code... it doesn't seem to display any new fields.

    What table would this information be written to in the database?

    Also when testing in sandbox mode, I can complete a pledge properly but when I am redirected back to the site and the thank you page I get an error "Oh No, we can't find your Pledge. Sometimes it take a few moments for your Pledge to be logged. You can try refreshing this page " and the backer count and total $$ count is not updated. Is that how it's supposed to be?

    Simple donations doesn't collect First/Last Name either... is that possible to include also? Actually we could just send out a survey afterwards asking for shipping info but getting this basic info as a minimum would be great:

    Username (on the website), First/Last Name, Email Address, Donation Amount. And if a Shipping address can be thrown in there too then thats great, but now that I think about it, not 100% necessary.

    I guess what ideally I would need/want is a shopping cart for 3-4 items that will display # of transactions (kickstarter style) and total amount of $ earned (kickstarter style), and I am basically trying to adapt this plugin to that purpose. Maybe there's a different plugin that fits my needs better? Maybe what I need is easily accomplished another way? Any suggestions would be most appreciated.

    Apologies, I am a designer with only basic php/sql knowledge, but am having to do a lot of this sort of setup for this particular project.

  • digitsoft

    Correct - I mentioned that it wouldn't display any new fields, but would (should) go in the database. It will get stored in the wp_postmeta table along with the other transaction info.

    Use phpmyadmin to view all fundraising items like this:

    SELECT *
    FROM wp_postmeta
    WHERE meta_key LIKE '%wdf%'

    You can also search the values for transaction info (replace city with the city used in the transaction):

    SELECT *
    FROM wp_postmeta
    WHERE meta_value LIKE '%city%'

    Based on what you're looking to do you'll want to hire someone to put it together:
    https://premium.wpmudev.org/wpmu-jobs/

  • Cole

    Hey guys,

    A quick note about how the transaction details work. Anything in the $trasnaction array passed to the update_pledge() function will be saved as post meta data.

    For displaying this information on the back end you will want to look at /fundraising/lib/form.meta_boxes.php around line 73.

    After the paragraph tags that hold the $trans['payer_email'] line. You could add something like this.

    <?php if( isset($trans['address_country']) ) : ?><p><label><strong><?php echo __('Country:','wdf'); ?> </strong></label><?php echo $trans['address_country']; ?></p><?php endif; ?>
    				<?php if( isset($trans['address_city']) ) : ?><p><label><strong><?php echo __('City:','wdf'); ?> </strong></label><?php echo $trans['address_city']; ?></p><?php endif; ?>
    				<?php if( isset($trans['address_state']) ) : ?><p><label><strong><?php echo __('State:','wdf'); ?> </strong></label><?php echo $trans['address_state']; ?></p><?php endif; ?>

    That was just a quick example I had time to whip up. But whatever you decide to display there you need to properly pass through the update_pledge function during paypal IPN response in the paypal.php gateway file.

    Hopefully thats not too cryptic and can start to point you in the right direction. I'm working on an easier system to modify the information that can be captured during the pledge process. But will take a little magic to make sure it works across paypal and some of the other gateways in the future.

    Cole

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.