Change User Address

  • Corey Kopp
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 years 8 months ago #34304 by Corey Kopp
Change User Address was created by Corey Kopp
Hello,

I use the Joomla login integration, and it seems to work so that my users don't have to keep re-entering their information (address, etc.) when they come back to donate and log in. That has been working great, but now I have a user that has had an address change. They are able to change the address fields when making a donation, but the new address is not being saved. So, when they return and login again for a new donation, Joomdonation is pre-filling the old address.

How can the saved user address be changed? I don't see any way to do this, either as the administrator from the backend or as the user from the frontend. Preferably, it would be possible from both places....

Thanks!

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

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
10 years 8 months ago #34399 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Change User Address
By default, the extension looks for the data from first donation record to fill-in donation form automatically and that's the reason causes the error.

You can edit the code alitle to get the issue sorted :

1. Open the file components/com_jdonation/views/donation/view.html.php

2. Find the code below :
Code:
$sql = 'SELECT * FROM #__jd_donors WHERE user_id = '.$userId .' ORDER BY id LIMIT 1';

3. Change it to :
Code:
$sql = 'SELECT * FROM #__jd_donors WHERE user_id = '.$userId .' ORDER BY id DESC LIMIT 1';

After that, it will work as expected !

Regards,

Tuan

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

  • Corey Kopp
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 years 8 months ago #35137 by Corey Kopp
Replied by Corey Kopp on topic Re: Change User Address
Thanks Tuan,

I'll give that a try.

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

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