Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

b2b authentication
 
macker999
Jr. Member
 
Total Posts:  26
Joined:  2009-05-06
 

Hi

I am using Magento for a b2b web site. The entire e-commerce site has to be password protected using 3 fields
custac, username and password.

I have added a new field to the customer account using this article.
http://www.magentocommerce.com/wiki/custom_account/registration_fields

My new value, custac is added to the database table customer_entity_varchar.
What I need to do now is modify the login to use this value. So i have added the custac field to the login. So I now have custac, username and password.

I have create an a user and the custac details are stored in the database.

I not sure of what to do next as I need to authtenticate a user using the 3 values. I have looked at the AccountController.php and there is a function called loginPostAction.

I made the following modfication
$session->login($login[’username’], $login[’password’], $login[’custac’]); but it ignores the custac value and authenticarte the users usinG the username and password.

Can anybody help me to implement the authentication using the 3 field values, custac,username and password?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Discovery
Enthusiast
 
Total Posts:  767
Joined:  2007-12-29
 

There are extensions for only showing products and categories to logged in users. In the layout files there are options to only show stuff if someone is logged in. You need to have a homepage login box that loads on this and also hide/show the cart/compare/wishlist.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Incognito
Guru
 
Total Posts:  322
Joined:  2008-08-07
Michigan
 

You could combine username and custac as one field before you add it to the db and again before you check the login.

 
Magento Community Magento Community
Magento Community
Magento Community
 
macker999
Jr. Member
 
Total Posts:  26
Joined:  2009-05-06
 

Thanks Discovery / Incognito for the replies

I would add the custac and username combined together as one string?

For example
and when logging in combine both strings (from input text boxes) to form the user name for authentication?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Incognito
Guru
 
Total Posts:  322
Joined:  2008-08-07
Michigan
 

Yes, make sure that you combine them the same way before you add them into the db.  So in the end as far as magento is concerned there username will be .  They will just be entering it into two boxes and then concatenate them and put them into the first parameter of the log in function.  $session->login($login[’custac’]."~".$login[’username’], $login[’password’]);

 
Magento Community Magento Community
Magento Community
Magento Community
 
macker999
Jr. Member
 
Total Posts:  26
Joined:  2009-05-06
 

Thanks Incognito

 
Magento Community Magento Community
Magento Community
Magento Community
 
macker999
Jr. Member
 
Total Posts:  26
Joined:  2009-05-06
 

I have installed am extension to stop people viewing the catalog when they are not logged in but how could I hide the cart and other similar pages?

The layout files were mentioned. I think the checkout.xml file is used for the cart. How would i modify this file to hide the cart page unless logged in?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
matteotopuntoli
Jr. Member
 
Total Posts:  18
Joined:  2009-02-19
 
macker999 - 21 May 2009 06:08 AM

I have installed am extension to stop people viewing the catalog when they are not logged in but how could I hide the cart and other similar pages?

The layout files were mentioned. I think the checkout.xml file is used for the cart. How would i modify this file to hide the cart page unless logged in?

Thanks

Where can I find this am extension ?
Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top