an ASP.NET Open Source CMS & eCommerce platform
Search:
Skip Navigation LinksHome > DotShoppingCart Forums > Support > Using DotShoppingCart > How to disable user from placing an order unles...
Last Post 5/1/2009 8:49:32 AM By bansal_db. 2 replies.
4/30/2009 3:29:41 PM
bansal_db
Posts: 181
Joined: 4/13/2009
How to disable user from placing an order unless he is approved?
I want the user to signup but put him on hold until he is approved and assigned the specific role. Then only he should be able to buy anything. Is it possible to do that?
 
Thanks
 
4/30/2009 3:57:48 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: How to disable user from placing an order unless he is approved?
Yes, there are two steps.
  
1) disable guest checkout. Go to checkout page and enable page editor.
  
2) put code to store\checkout.ascx to display "warning message" if the user is not in the role that you define.
 
if (!Roles.IsUserInRole())
   //
Display warning and disable checkout view.
 
Let me know if you need help on the sample code to do 2).
DotShoppingCart Staff
5/1/2009 8:49:32 AM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: How to disable user from placing an order unless he is approved?
That would be very helpful if you can help me out with the sample code.
 
Thanks