PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Reset Download Count for Level 0

s2Member Plugin. A Membership plugin for WordPress®.

Reset Download Count for Level 0

Postby colinp386 » December 14th, 2011, 10:48 pm

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.
Colin Prior


UnixPackages - Open Source Packages for Solaris
User avatar
colinp386
Registered User
Registered User
 
Posts: 28
Joined: September 29, 2011

Re: Reset Download Count for Level 0

Postby colinp386 » December 16th, 2011, 12:22 pm

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
Colin Prior


UnixPackages - Open Source Packages for Solaris
User avatar
colinp386
Registered User
Registered User
 
Posts: 28
Joined: September 29, 2011

Re: Reset Download Count for Level 0

Postby Cristián Lávaque » December 17th, 2011, 12:52 am

Hi Collin. I'll check with Jason what would be the simplest approach for this. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Reset Download Count for Level 0

Postby colinp386 » December 17th, 2011, 11:43 am

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. :-)
Colin Prior


UnixPackages - Open Source Packages for Solaris
User avatar
colinp386
Registered User
Registered User
 
Posts: 28
Joined: September 29, 2011

Re: Reset Download Count for Level 0

Postby Jason Caldwell » December 18th, 2011, 11:06 am

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.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Reset Download Count for Level 0

Postby colinp386 » December 18th, 2011, 2:15 pm

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.
Colin Prior


UnixPackages - Open Source Packages for Solaris
User avatar
colinp386
Registered User
Registered User
 
Posts: 28
Joined: September 29, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 1 guest

cron