• Resolved cybershot

    (@cybershot)


    It looks like all the data for this plugin is stored in the options table. Is there a specific name I could look for that has all the information I need? For example, lets say that I want to make a custom query to get all the donations and add them up so that I can make a widget showing the total donations. Where is the best place to find that information? I was looking at these two fields

    dgx_donate_log
    dgx_donate_designated_funds

    One had the custom charities that I set up and the other one had the amount donated. I was wondering if there was a better place. One field that contained the needed data?

    https://www.ads-software.com/plugins/seamless-donations/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi cybershot!

    There are plugin options in the options table, but the best place to retrieve the donations data is from the dgx-donation custom post type – each donation is saved in a post of that type.

    Hope this helps!

    Cheers…

    …Allen

    Thread Starter cybershot

    (@cybershot)

    that would help. But where is that custom post type in the database? I am looking for it. I found the options and I was able to get some but it doesn’t print out what I would like. I get this

    Last amount contributed was 2014-02-22 02:34:24 Amount: 5.00

    I was hoping to find information about the charity it was donated to and just the amount. I created a widget to get this information from the database

    Thread Starter cybershot

    (@cybershot)

    I can’t find that post type anywhere in the database

    Hi cybershot!

    If your post table is wrd_posts, you should see donations using something like

    SELECT * FROMwrd_postsWHERE post_type = "dgx-donation" LIMIT 0 , 30

    and then details, e.g. like the amount, should be in your post meta table, e.g.

    SELECT * FROMwrd_postmeta` WHERE meta_key = “_dgx_donate_amount”

    Thread Starter cybershot

    (@cybershot)

    I was able to get a value for my widget. This is for a sidebar widget I made to get the last amount donated. There might be a better way but this seems to work.

    $rValue = "";
            $query = ("SELECT * FROM wp_sav_postmeta WHERE meta_key = '_dgx_donate_amount';");
            $result = mysql_query($query);
            if ($row = mysql_fetch_array($result)){
                $rValue = $row[3];
    			echo "Last amount donated: $" . $rValue;
    		} else {
    			echo "No donations as of yet.";
    		}
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘table data?’ is closed to new replies.