Subscriber information

4 replies [Last post]
robives
Offline
Joined: 10/30/2009
Status: 
Answered

Do I have access to the date that a user first subscribed? I'd like to be able to write a bit of code so that users can download products produced during their subscription perdiod but not those produced before that time.

Thanks!

PS - I'm really pleased with PayPal Subscription - Very nicely done!

Leighton Whiting
Offline
Joined: 06/02/2009
Robives, Hmmm, the start date

Robives,
Hmmm, the start date IS stored in the database, but not in the User object yet. So if you wanted to access it directly, you would have to pull it from the database. I can put it in the user object in the next release so it would be easier to access.

-Leighton

robives
Offline
Joined: 10/30/2009
That would be great! Thanks

That would be great! Thanks Leighton, Now that's what I call quality service!

Leighton Whiting
Offline
Joined: 06/02/2009
Robives, This info can now be

Robives,
This info can now be found in the $user->ps_subs object. It is an array of all of the subscriptions that a user has. Here is what it contains:

'sid' => The Subscription ID (integer)
'status' => The Status of the subscription, values below:
0: 'Inactive'
1: 'Active'
2: 'Cancelled'
3: 'Completed'
'pid' => The last payment ID for this subscription
'expiration' => The subscription expiration timestamp
'start_date' => The subscription start timestamp

Hopefully this will help someone when making custom templates and modules.

This is in version 4.13 and on.

Cheers!
-Leighton

robives
Offline
Joined: 10/30/2009
Wow! Thanks Leighton, that is

Wow! Thanks Leighton, that is fantastic service!

Twitter Feed