Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bypassing customer page

Status
Not open for further replies.

loveday

Programmer
Sep 19, 2004
106
US
Happy holidays to you and greetings to all.

When we developed our ecommerce site, we did so without the need for requiring that customers register before making purchases.

As a result, the process follows:

A customers comes to our site, browses through our catalog, see an item he or she likes, adds to item; repeats this until he or she is ready to checkout.
Once you click on "Proceed to Checkout" button, you are presented with a customer page which collects customer information, including shipping address and contact info.

After this info is completed by the customer, he or she is taking to checkout page where customer is asked to confirm customer info, credit card info is collected and order is submitted.

Now that customer is required to register, we now have register.asp page and login page.

Before customer adds an item to cart, he or she must either register if new customer or log in if existing customer.

After logging in or registering, customer is now taken directly to the page of his or her choice.

As a result of this, we don't feel like the customer.asp page is required.

All that page is now doing is prepulating customer information on that page as soon as the customer registers or logs in.

I have been to remove that page (customer.asppage) but somehow, it still keeps getting displayed.

Can someone, please assist with getting this to work?

This is the page that used to take a customer directly to customer.asp page from there, the customer goes to checkout.asp page.

Code:
If prodid <> "" Then 
    call addToCart() 
Else 
    Dim strAction 
    strAction = UCase(Left(Request.Form("action"),5)) 
    Select Case strAction 
    Case "CONTI"         'continue shopping 
        Response.Redirect "home.asp" 
    Case "RECAL"        'recalculate 
        call recalculateCart() 
    Case "PROCE"         'proceed to checkout 
        Response.Redirect "customer.asp" 
    End Select 
'end if for updating or inserting new item in Cart 
End If 

sub addToCart() 
If scartItem < maxCartItems Then 
        scartItem = scartItem + 1 
    End If 
    Session("cartItem") = scartItem 
    dim rsItem, sqlProductInfo 
    sqlProductInfo = "SELECT * FROM products WHERE (products.catalogID=" & prodid & ")" 

    'open connection - returns dbc as Active connection 
    call openConn() 
    Set rsItem = Server.CreateObject("ADODB.Recordset") 
    rsItem.Open sqlProductInfo, dbc, adOpenForwardOnly,adLockReadOnly,adCmdText 
    If Not rsItem.EOF Then 
        arrCart(cProductid,scartItem) = rsItem("catalogID") 
        arrCart(cProductCode,scartItem) = rsItem("ccode") 
        arrCart(cProductname,scartItem) = rsItem("cname") 
        arrCart(cQuantity,scartItem) = CInt(quantity) 
        arrCart(cUnitPrice,scartItem) = rsItem("cprice") 
        arrCart(cAIPPrice,scartItem) = rsItem("caipprice") 
        arrCart(cBulkPrice,scartItem) = rsItem("cover10price") 
        Session("MyCart") = arrCart 
    End If 
    rsItem.Close 
    set rsItem = nothing 
    call closeConn() 
end sub 
End Select
Notice the line that says:

Code:
    Case "PROCE"         'proceed to checkout 
        Response.Redirect "customer.asp"
I have changed this line to Response.Redirect "checkout.asp"
but as I said, it still displays customer.asp page which displays the prepopulated customer info.

One other note, the customer.asp posts to addCustomer.asp which then takes you to checkout.asp.

If you need me to display certain aspects of both customer.asp and/or addCustomer.asp, please advise.

Thanks in advance
 
it might be that some other page is redirecting to customer.asp...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top