DLGuard
fully integrated with the major payment systems
Paypal
Clickbank
2checkout
Authorize.Net
Click2Sell
1ShoppingCart
LinkPoint
AlertPay
eBay
PayDotCom
Mal's e-commerce
PagSeguro
CCBill
CommerceGate
DigiResults
FastSpring
JVZoo
MultiSafePay
WorldPay
Plimus
WSO Pro
Paypal Digital Goods
RevenueWire
SWReg
     

Customer Details in Membership

 
Post new topic   Reply to topic    DLGuard Forum Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
Thomas



Joined: 24 Jul 2008
Posts: 5
Location: Germany

PostPosted: Thu Mar 11, 2010 7:23 am    Post subject: Customer Details in Membership Reply with quote

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
View user's profile Send private message
admin
Site Admin


Joined: 31 Jul 2005
Posts: 9393
Location: Australia

PostPosted: Fri Mar 12, 2010 12:45 am    Post subject: Reply with quote

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 Smile

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
View user's profile Send private message Send e-mail Visit poster's website
Thomas



Joined: 24 Jul 2008
Posts: 5
Location: Germany

PostPosted: Sat Mar 13, 2010 7:35 am    Post subject: Reply with quote

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
View user's profile Send private message
admin
Site Admin


Joined: 31 Jul 2005
Posts: 9393
Location: Australia

PostPosted: Sat Mar 13, 2010 10:37 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Thomas



Joined: 24 Jul 2008
Posts: 5
Location: Germany

PostPosted: Sun Mar 14, 2010 9:36 pm    Post subject: Reply with quote

Great - that helped!

Thomas
_________________
Thomas
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 31 Jul 2005
Posts: 9393
Location: Australia

PostPosted: Mon Mar 15, 2010 1:42 am    Post subject: Reply with quote

No worries Thomas, happy to help!

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
View user's profile Send private message Send e-mail Visit poster's website
ruda.almeida



Joined: 24 Jun 2010
Posts: 18

PostPosted: Sat Jun 26, 2010 11:04 am    Post subject: Re: Customer Details in Membership Reply with quote

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
View user's profile Send private message
ruda.almeida



Joined: 24 Jun 2010
Posts: 18

PostPosted: Sat Jun 26, 2010 11:31 am    Post subject: Reply with quote

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
View user's profile Send private message
admin
Site Admin


Joined: 31 Jul 2005
Posts: 9393
Location: Australia

PostPosted: Sun Jun 27, 2010 2:12 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
ruda.almeida



Joined: 24 Jun 2010
Posts: 18

PostPosted: Sun Jun 27, 2010 2:27 am    Post subject: Reply with quote

OK Sam, thanks a lot for the info!
Back to top
View user's profile Send private message
ruda.almeida



Joined: 24 Jun 2010
Posts: 18

PostPosted: Sun Jun 27, 2010 3:27 pm    Post subject: Reply with quote

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
View user's profile Send private message
admin
Site Admin


Joined: 31 Jul 2005
Posts: 9393
Location: Australia

PostPosted: Sun Jun 27, 2010 11:30 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
ruda.almeida



Joined: 24 Jun 2010
Posts: 18

PostPosted: Tue Jun 29, 2010 3:03 pm    Post subject: Reply with quote

Thanks a lot Sam, that's all I needed to know! Very Happy
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 31 Jul 2005
Posts: 9393
Location: Australia

PostPosted: Wed Jun 30, 2010 3:18 am    Post subject: Reply with quote

Happy to help Smile

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    DLGuard Forum Forum Index -> General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group