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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need to Add to cart but not get redirected.

Status
Not open for further replies.

TechnicalLoser

Technical User
Nov 19, 2001
26
CA
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=&quot;<%=(UC_AddLink + CStr(UC_rs.Fields.Item(UC_uniqueCol).Value)) %>&quot;>Add
to cart</A>

And this is the function the link calls to. I have set the redirect page = &quot;&quot; for now.
Any help you can give me would be greatly appreciated.
TL

UC_AddId = CStr(Request(&quot;UC_AddId&quot;))
If (UC_AddId <> &quot;&quot;) Then
UC_redirectPage = &quot;&quot;
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top