Expiration Emails not being sent

More
9 years 7 months ago #49072 by webgeeze
Replied by webgeeze on topic Expiration Emails not being sent
I would say no actually tuan. I only installed your code on one of my three sites and since doing so, reminders are not being sent and also, this morning i have a sql error relating to the OSM

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') OR email="user@hidden.com")' at line 1 SQL=SELECT COUNT(*) FROM ntkd_osmembership_subscribers WHERE plan_id=3 AND published=1 AND DATEDIFF(from_date, NOW()) >=0 AND ((user_id > 0 AND user_id = ) OR email="user@hidden.com")

the site was fine last night but this seems related to the changes in the code. It is working ok on the other two sites which are running the code my developer did. The reminders on those sites are working.

any ideas why and how to fix the issue above?

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

More
9 years 7 months ago #49074 by webgeeze
Replied by webgeeze on topic Expiration Emails not being sent
Update: That code completely broke my site Tuan... PLEASE check your own code before you put it out.

The system did not send a reminder on the one test site I used for your code. The reminder function broke somehow and to fix this, i had to manually go into phpmyadmin, locate the user concerned in the database 'subscribers' and manually adjust 0 to 1 in the first reminder. By doing this, the site returned to normal function.

something is not updating the flag in the database.

I am going to continue using my custom code for this, as it's working perfectly on the other two sites.

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

More
9 years 7 months ago #49077 by Jurček Tomažič
Replied by Jurček Tomažič on topic Expiration Emails not being sent
Same thing on my site. Broken frontpage. Had to change in helper:

$row = $rows[$i];
//print_r($row);
//Need to check to see if this user has renewed or not. If they have renewed, don't send reminder email
//$sql = 'SELECT COUNT(*) FROM #__osmembership_subscribers WHERE plan_id='.$row->plan_id.' AND published=1 AND DATEDIFF(from_date, NOW()) >=0 AND ((user_id > 0 AND user_id = '.$row->user_id.') OR email="'.$row->email.'")';
$sql = 'SELECT COUNT(*) FROM #__osmembership_subscribers WHERE plan_id='.$row->plan_id.' AND published=1 AND DATEDIFF(from_date, NOW()) >=0 AND ((user_id > 0 ) OR email="'.$row->email.'")';

Because $row doesnt have user_id

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

More
9 years 7 months ago #49085 by webgeeze
Replied by webgeeze on topic Expiration Emails not being sent
Guys, this code my developer wrote works perfectly. remove the helper.php file which is in place now and replace with this one attached. It works perfectly..

if you have a broken site, go into phpmyadmin, locate the user(s) and set the status from 0 to 1 in first reminder. This will bring your site back. Then, upload the helper.php file attached here and reminders will work. Once Tuan writes his code (and tests it properly!!!!) we can all use his code.

come on Tuan... I am a big fan of Joom Donation and your software but you are messing about with people here and I have over 1500 users across three sites. I have been moaning about this for months now and it needs to get sorted!
Attachments:
The following user(s) said Thank You: Jurček Tomažič

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

More
9 years 7 months ago #49090 by Jurček Tomažič
Replied by Jurček Tomažič on topic Expiration Emails not being sent
I have used your helper.php now webgeeze. And currently it is working.

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

More
9 years 7 months ago #49091 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Expiration Emails not being sent
@webgeeze: Thanks for sharing the code. I can confirm that It will work. However, there is still one defect in that code. If for some reasons, you renewed your membership before this reminder is sent, the system will still send reminder to you (of course it should not because you renewed already).

So in general, your code is good and can be used and It works in most case. But we still need to correct it.

I know the reason why my code doesn't work. We will need to update the reminder system plugin as well.

I will update download package with my code and my reminder system plugin as well so that It will work 100%. For other customers, you can use this patch or contact me to get the updated version of the extension which will work 100%.

Regards,

Tuan

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

More
9 years 7 months ago #49098 by webgeeze
Replied by webgeeze on topic Expiration Emails not being sent
OK, can you advise once you have tested and released an updated version of this please tuan. For the moment, i will keep my adjusted file in place as the reminders are working. I can't afford to be a beta tester on live sites as my clients are getting frustrated.

thankyou

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

More
9 years 7 months ago #49099 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Expiration Emails not being sent
Yes. Want to make some other small improvements before making it public release. Will update you when it is public release (will be in 1.6.6)

Tuan

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

More
9 years 7 months ago #49111 by Ian Dalkin
Replied by Ian Dalkin on topic Expiration Emails not being sent
Just confirming that the patch has worked for the single test record.

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

More
9 years 7 months ago #49117 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Expiration Emails not being sent
Hi Ian

What patch you are talking about ? The patch from @webgeeze ? I installed the latest code to your site yesterday, could you please help me to test the version which I installed on your server (about 12 hours ago) ?

Regards,

Tuan

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