I would like to also export unpaid donations

More
11 years 2 months ago #25506 by viv
Hi Tuan,

For our donations at the moment we want two payment methods - Paypal and Offline (Cash payments). The offline payments show up as unpaid in the Donor listing which is fine. I would like all of the donations - even the unpaid ones to show up on the exported csv file.
I though that setting "Show pending donation records" to "Yes" on the configuration page would make them appear but it doesn't.

How can I make these donations export?

NB. The Event Booking module had an option where you could make them appear.


Thanks.

Viv

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #25712 by viv
Hi
Is there any update or information on this feature?

thanks
Viv

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #25796 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: I would like to also export unpaid donations
The extension doesn't have this feature. So you will have to edit the code to have edit code to have this feature in your site. The instructions are :

1. Open the file administrator/components/com_jdonation/controller.php

2. Find the function csv_export

3. Find the code below within that function and remove it :
Code:
$where[] = 'a.published = 1';

After that, it will work as expected.

Tuan

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #26021 by viv
Thanks but I removed the line you indicated and tried an export and nothing happened. No export was generated at all. I definitely had both paid and unpaid entries in the donor list.

Any other suggestions?

Thanks
Viv

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #26029 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: I would like to also export unpaid donations
Sorry. You will need to edit the code alitle more :

1. Look at the line of code below :
Code:
$sql = 'SELECT a.* , b.title FROM #__jd_donors AS a LEFT JOIN #__jd_campaigns AS b ON a.campaign_id=b.id WHERE ' . implode(' AND ', $where) . ' ORDER BY created_date ';

2. Change it to :
Code:
$sql = 'SELECT a.* , b.title FROM #__jd_donors AS a LEFT JOIN #__jd_campaigns AS b ON a.campaign_id=b.id ORDER BY created_date ';

That should solve the issue you are having.

Tuan

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #26037 by viv
Sorry to be a pain but these two lines of code appear the same...
unless the last part of the line is where the change is and it has been truncated?

Thanks

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #26149 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: I would like to also export unpaid donations
Hi

Please try the mentioned code.

Tuan

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #26558 by viv
OK then. I have deleted the first of code and changed the second line of code indicated and still nothing is exporting . The list is empty.

Viv

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #26625 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: I would like to also export unpaid donations
I am sure that it is something wrong. That code should work. In this case, please submit a support ticket sending me administrator and FTP account of your site so that I can help you to change the code to make it works directly on your site.

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Mr. DamDũng Nguyễn Việt