TechnicalLoser
Technical User
I have built a shopping cart with UltraDev Shopping Cart from Powerclimb. It works great but when I click on the link to add an item to the cart it reloads the page back to the top. Is there any to add an item but still stay at that items place on the product page. This is important because I will have several hundred items and I don't want the shopper to have to scroll down and find where they were, nor do I want them redirected to the cart page. I thought of redirecting them back to the product page but to the product's named anchor but the page would still reload then and the user would have to wait for all the items to load again (too long). The following is the link that is next to each item.
<A HREF="<%=(UC_AddLink + CStr(UC_rs.Fields.Item(UC_uniqueCol).Value)) %>">Add
to cart</A>
And this is the function the link calls to. I have set the redirect page = "" for now.
Any help you can give me would be greatly appreciated.
TL
UC_AddId = CStr(Request("UC_AddId"
)
If (UC_AddId <> ""
Then
UC_redirectPage = ""
If (NOT (UC_rs is Nothing)) Then
' Position recordset to correct location
If (UC_rs.Fields.Item(UC_uniqueCol).Value <> UC_AddId) Then
' reset the cursor to the beginning
If (UC_rs.CursorType > 0) Then
If (Not UC_rs.BOF) Then UC_rs.MoveFirst
Else
UC_rs.Close
UC_rs.Open
End If
Do While (Not UC_rs.EOF)
If (Cstr(UC_rs.Fields.Item(UC_uniqueCol).Value) = UC_AddId) Then
Exit Do
End If
UC_rs.MoveNext
Loop
End If
End If
<A HREF="<%=(UC_AddLink + CStr(UC_rs.Fields.Item(UC_uniqueCol).Value)) %>">Add
to cart</A>
And this is the function the link calls to. I have set the redirect page = "" for now.
Any help you can give me would be greatly appreciated.
TL
UC_AddId = CStr(Request("UC_AddId"
If (UC_AddId <> ""
UC_redirectPage = ""
If (NOT (UC_rs is Nothing)) Then
' Position recordset to correct location
If (UC_rs.Fields.Item(UC_uniqueCol).Value <> UC_AddId) Then
' reset the cursor to the beginning
If (UC_rs.CursorType > 0) Then
If (Not UC_rs.BOF) Then UC_rs.MoveFirst
Else
UC_rs.Close
UC_rs.Open
End If
Do While (Not UC_rs.EOF)
If (Cstr(UC_rs.Fields.Item(UC_uniqueCol).Value) = UC_AddId) Then
Exit Do
End If
UC_rs.MoveNext
Loop
End If
End If