Page 1 of 1

Reset Download Count for Level 0

PostPosted: December 14th, 2011, 10:48 pm
by colinp386
I am looking to reset the Download count for ALL my Users on Level 0 (Free)

Here's why, I had Level 0 set for 100 downloads for 30 days while in Beta Test.
Now I am ready to roll the system out for prime time, and I want to change the download restriction to 10 downloads over 365 days.

So as not to upset those that have already gone over the new 10 free limit I want to reset all my Level 0 users, change the download limit to 10 then they will all be happy.

I have over 3,000 beta testers so its quite a number to reset.
I have full access to the db so its its easier to do via a SQL query that's fine.
Seems like the data is in s2member_file_download_access_log ?? but I can't seem to find it.

I guess I can kludge it by making a new level say 5 move them to that, which I think resets the count, then move them back to level 0 again.

Any suggestions welcome.

Re: Reset Download Count for Level 0

PostPosted: December 16th, 2011, 12:22 pm
by colinp386
Having dug into the db a bit more it seems like I would need to move the data from the array wp_usermeta.meta_value WHERE the meta_key = wp_s2member_file_download_access_log and append it to the array where the meta_key is wp_s2member_file_download_access_arc

Also the count at the beginning of the array needs to be updated.

However others must have had to do this, or want to. So there has to be a function to do this.
Also my SQL abilities are a limited so it would take me some time to figure this out.

Anyone any suggestions??

Thanks

Re: Reset Download Count for Level 0

PostPosted: December 17th, 2011, 12:52 am
by Cristián Lávaque
Hi Collin. I'll check with Jason what would be the simplest approach for this. :)

Re: Reset Download Count for Level 0

PostPosted: December 17th, 2011, 11:43 am
by colinp386
Cristián, that would be great, as we can't effectively launch our site until this is resolved. So it's very important to me.
I'm open to any method of doing this. :-)

Re: Reset Download Count for Level 0

PostPosted: December 18th, 2011, 11:06 am
by Jason Caldwell
Thanks for the heads up.
You can delete the meta keys in your DB:
Code: Select all
wp_s2member_file_download_access_log
wp_s2member_file_download_access_arc
for each Level #0 Subscriber. That resets the counters.

Re: Reset Download Count for Level 0

PostPosted: December 18th, 2011, 2:15 pm
by colinp386
Sure I can do that, I was hoping there was a quick way to move the current download files from _log to _arc :-)

But its not a huge issue I guess I don't have to loose all the download file data during my rollout phase.