|
|
|
Rank: Starting Member
Groups: Registered
Joined: 11/16/2002 Posts: 15 Location: ,
|
I have set up a field in my db that I called "SoldFlag" and upon confirmation from PayPal I update the multiple items in my cart to SoldFlag = True.
'update the item to sold after a confirmation from paypal
For i = 1 to NumCartItems
Item_ID = Request.Form("item_number" & i)
If Item_ID <> "" Then
set Cm = Server.CreateObject("ADODB.Command")
Cm.ActiveConnection = MM_connStore_STRING
Cm.CommandText = "UPDATE tblProducts SET SoldFlag = true WHERE Item_ID = '" & Item_ID & "'"
Cm.Execute
Else
Exit For
End If
Next
'We end the update into our database table
Then when I am populating my products page I use this code:
<% If rsProducts("SoldFlag") = True Then %>
<font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="Red"><b>SOLD</b></font>
<% Else %>
<%=formatcurrency(rsProducts.Fields.Item("Item_Price").Value,2)%>
<% End If %>
<% If rsProducts("SoldFlag") = False Then %>
You display your "Add to Cart" button. That way your button won't be displayed if it is sold (this is if you popolate your buttons with your database as well.) I do it this way because I sell unique items, but you still have the capabilities of a cart.
|
|
|
|
|
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 11/16/2002 Posts: 15 Location: ,
|
Almost forgot I am using this in a page that sells unique items so you may want to use this with a 'qty' field. If qty = 0 then display sold sign else display price... yada yada.
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 9/16/2002 Posts: 2,960 Location: ,
|
You might consider selling unique items on eBay. It is generally the best venue for such items. Patrick Breitenbach PayPal, Inc. Dev Net: https://www.paypal.com/pdn
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 11/16/2002 Posts: 15 Location: ,
|
I understand although I think it works well for something like this. http://www.rrrtifax.comThanks, Nathan E.
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 9/16/2002 Posts: 2,960 Location: ,
|
I agree that "it works well" but Im not sure that's what you meant. You might want to check it out as Railroading Collectibles is a very large eBay category: http://listings.ebay.com.../list/all/category1444/
Patrick Breitenbach PayPal, Inc. Dev Net: https://www.paypal.com/pdn
|
|
|
|
Guest
|
YAFVision Theme by Jaben Cargman (Tiny Gecko)Powered by YAF |
YAF © 2003-2009, Yet Another Forum.NETThis page was generated in 0.161 seconds.