| View previous topic :: View next topic |
| Author |
Message |
Thomas
Joined: 24 Jul 2008 Posts: 5 Location: Germany
|
Posted: Thu Mar 11, 2010 7:23 am Post subject: Customer Details in Membership |
|
|
Hi Sam,
I like to display the Customers Details in a membership.
I know how to pull Name, Email and Receipt as it is shown in your sample files with echo $user or $reciept etc.
What token do I have to use to show the purchase date and the product name?
What other user details can be pulled if any and what tokes to use?
Thank you
Thomas _________________ Thomas |
|
| Back to top |
|
 |
admin Site Admin
Joined: 31 Jul 2005 Posts: 9134 Location: Australia
|
Posted: Fri Mar 12, 2010 12:45 am Post subject: |
|
|
Hi Thomas,
Glad you're enjoying it, and also making use of the custom variables!
You can also use:
$fullname = Full name of customer
$username = Customers email / username
$password = Customers password
$receipt = Customers receipt
$group = Customers group number
$signupDate = Unix timestamp of the date when they signed up
$downloadProduct = An array of all the donwload links they have access to
Enjoy
cheers
Sam _________________ Sam Stephens
DLGuard: www.dlguard.com
GuardHQ: www.guardhq.com
-------
Keep up to date with DLGuard and other GuardHQ products: www.guardhq.com/newsletter.php
www.twitter.com/DLGuard |
|
| Back to top |
|
 |
Thomas
Joined: 24 Jul 2008 Posts: 5 Location: Germany
|
Posted: Sat Mar 13, 2010 7:35 am Post subject: |
|
|
Hi Sam,
thank you very much.
How about a variable fopr the actual date of the purchase?
Like 10-03-2010 istead of the timestamp?
Or the product name like "Ebook about Variables" instead of Group m2.
Thomas _________________ Thomas |
|
| Back to top |
|
 |
admin Site Admin
Joined: 31 Jul 2005 Posts: 9134 Location: Australia
|
Posted: Sat Mar 13, 2010 10:37 pm Post subject: |
|
|
Hi Thomas,
The date is in unix timestamp format because it's a "standard" and means people can display it anyway they like.
For example:
| Code: | | <?php echo date("d M Y", $signupDate); ?> |
That'll display: 01 Jan 2010
Here's for you format it: http://php.net/manual/en/function.date.php
Displaying product names isn't quite clear cut, as many products can offer the same access to a certain group.
If you want to find out exactly what product a customer has, a quick MySQL lookup using their receipt will find out.
Meanwhile I can make a note of creating a new variable for this in a new version, if you wish.
cheers
Sam _________________ Sam Stephens
DLGuard: www.dlguard.com
GuardHQ: www.guardhq.com
-------
Keep up to date with DLGuard and other GuardHQ products: www.guardhq.com/newsletter.php
www.twitter.com/DLGuard |
|
| Back to top |
|
 |
Thomas
Joined: 24 Jul 2008 Posts: 5 Location: Germany
|
Posted: Sun Mar 14, 2010 9:36 pm Post subject: |
|
|
Great - that helped!
Thomas _________________ Thomas |
|
| Back to top |
|
 |
admin Site Admin
Joined: 31 Jul 2005 Posts: 9134 Location: Australia
|
|
| Back to top |
|
 |
ruda.almeida
Joined: 24 Jun 2010 Posts: 18
|
Posted: Sat Jun 26, 2010 11:04 am Post subject: Re: Customer Details in Membership |
|
|
| Thomas wrote: | | I know how to pull Name, Email and Receipt as it is shown in your sample files with echo $user or $reciept etc. |
OK, this is going to sound very silly, but...
1) Where are the sample files located?
2) What is the difference between $password and $receipt? |
|
| Back to top |
|
 |
ruda.almeida
Joined: 24 Jun 2010 Posts: 18
|
Posted: Sat Jun 26, 2010 11:31 am Post subject: |
|
|
Specifically about my 2nd question, in my case the "receipt" column in the database shows an uppercase 8-letters-and-digit code, but sometimes it shows a lowercase single word.
The "member_password" column is empty for all but one user.
I'm able to login to a member-only page using the info from the "email" and "receipt" columns.
So besides from the difference between receipt and password, what is the pattern used to create the receipt, and can the password (and receipt) be changed by the user? |
|
| Back to top |
|
 |
admin Site Admin
Joined: 31 Jul 2005 Posts: 9134 Location: Australia
|
Posted: Sun Jun 27, 2010 2:12 am Post subject: |
|
|
Hi Ruda,
Sample membership files can be found in the folder:
dlg/members/example/
They're examples only, so you can't run them live (or they'll throw errors).
They're just designed so you can see how different aspects of a members area can be used.
The receipt column never changes - the receipt is set by the payment processor at the point of purchase (or by the admin if they Import a customer manually).
At first their receipt is used as the password, but if they decide to change their password later, instead of overwriting the receipt, it creates a new value for "password".
cheers
Sam _________________ Sam Stephens
DLGuard: www.dlguard.com
GuardHQ: www.guardhq.com
-------
Keep up to date with DLGuard and other GuardHQ products: www.guardhq.com/newsletter.php
www.twitter.com/DLGuard |
|
| Back to top |
|
 |
ruda.almeida
Joined: 24 Jun 2010 Posts: 18
|
Posted: Sun Jun 27, 2010 2:27 am Post subject: |
|
|
| OK Sam, thanks a lot for the info! |
|
| Back to top |
|
 |
ruda.almeida
Joined: 24 Jun 2010 Posts: 18
|
Posted: Sun Jun 27, 2010 3:27 pm Post subject: |
|
|
Sam, the sample files on the dlg/members/example/ folders helped me a lot,
thank you very much! I'm able to use the variables after including this line:
| Code: | | include ($pathToDLG."members/dlgmembers.php"); |
It also seems that when a user have no password defined, the $password variable will return the receipt, is that so?
More important yet, in the 1st post Thomas says there is a $user variable, but when I test it, it will return an empty value. Is there really a $user variable? It is important to know because I'll have to integrate a custom-made script that already have a $user variable of its own, and I want to avoid variable names to conflict. |
|
| Back to top |
|
 |
admin Site Admin
Joined: 31 Jul 2005 Posts: 9134 Location: Australia
|
Posted: Sun Jun 27, 2010 11:30 pm Post subject: |
|
|
Hi Ruda,
Glad I could help!
| Quote: | | It also seems that when a user have no password defined, the $password variable will return the receipt, is that so? |
Yes, that's exactly right - that way you can just use the password variable and know it'll be up to date. No need to cross check.
The username variable is actually: $username
(not just $user)
That'll get it for you!
cheers
Sam _________________ Sam Stephens
DLGuard: www.dlguard.com
GuardHQ: www.guardhq.com
-------
Keep up to date with DLGuard and other GuardHQ products: www.guardhq.com/newsletter.php
www.twitter.com/DLGuard |
|
| Back to top |
|
 |
ruda.almeida
Joined: 24 Jun 2010 Posts: 18
|
Posted: Tue Jun 29, 2010 3:03 pm Post subject: |
|
|
Thanks a lot Sam, that's all I needed to know!  |
|
| Back to top |
|
 |
admin Site Admin
Joined: 31 Jul 2005 Posts: 9134 Location: Australia
|
|
| Back to top |
|
 |
|