The customer login form
A login box is a simple form that gives existing customers a quick way to log into their account area. It typically contains a user name field, a password field, and a login link or button.
You can wrap a conditional statement around it so that it is only shown when a customer is not logged in.
A login box in a store running ProductCart should contain the following code:
Some customers have reported the following behavior:
- When you try to login, the attempt is rejected
- If you simply go back and try again with the same information, you can successfully log in
If this occurs, add the following code right before the login box code mentioned above:
<% if scSecurity=1 then Session("store_userlogin")="1" session("store_adminre")="1" end if %>
Showing and hiding the form
As mentioned above, you can use a conditional statement (an if statement) to show the login box/links or the account menu links. The conditional statement looks to see if a customer is logged in, as described here.
If a customer is not logged in, a link to register or log in is shown. If a customer is logged in, a few links to frequently used account management pages are shown instead.
Placing the form outside of ProductCart
Of course, this code could also be used on a page that is outside of ProductCart. There is no issue at all with doing so, since the form contains simple HTML and no dynamic content. The page can be anything: it does not have to be an ASP page. However, make sure to change the “action” so that it uses a correct path or URL to the checkout.asp page.