Some sites will want to prevent customers who are not registered and signed in from seeing prices or adding products to the cart. The easiest way to do this is with the 'Wholesale only site' feature.
To enable this, set the WholesaleOnlySite AppConfig to true. Once this is done, customers who are not logged in and a member of a customer level will not be able to see prices or add items to the cart/registry/wishlist. Store admins will have to manually assign newly-registered customers to the desired customer levels, or use tools like WSI or Event Handlers to get it done.
NOTE: If configuring the store this way, it may be best to remove all links to login/registration pages from the skin and .aspx pages, or to put an easily-noticeable warning on the login page, to avoid confusing customers.
- To further restrict access to the site, you can force all site visitors to log in before they can view anything.
Automating Customer Level Assignment
Some sites may want to have newly-registered customers automatically assigned to a customer level so that they can immediately begin purchasing. This can be done several ways with custom code, or with a simple database trigger like the one shown below.
NOTE: This is a customization, support cannot assist with implementing or troubleshooting this type of modification. This should only be attempted by a developer familiar with this kind of work.
CREATE TRIGGER trg_CustomerLevelUpd
ON Customer
FOR UPDATE
AS
UPDATE Customer SET CustomerLevelID = 99 WHERE IsRegistered > 0 and CustomerLevelID = 0