Page 1 of 1

Log in User

Posted: Thu May 22, 2008 1:59 am
by shoaib
Plz tell me how to login user using Able Commerce API in C#. How to create object of token and use it. How to create object of basket and use it.

Re: Log in User

Posted: Tue May 27, 2008 11:42 am
by m_plugables
How to create object of token and use it.
There is no need to create the Token object. A token object is by default created by the AbleCommerce. You just need to use this created object on any AbleCommerce page you want.
For example if you want to see the Email Address of current user

Code: Select all

SomeLabel.Text = Token.Instance.User.Email;
How to create object of basket and use it.
There is no need to create the Basket object. It will be already created when some user comes to the AbleCommerce cart. You can reference the user basket through Token object at any page. For example if you want to see the basket item count for current user

Code: Select all

SomeLabel.Text = Token.Instance.User.Basket.Items.Count.ToString();
Plz tell me how to login user using Able Commerce API in C#.
See the ConLib/LoginDialog.ascx control.