YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

Updating multiple items in a cart. Options
nathaned
#1 Posted : Saturday, November 16, 2002 10:18:56 PM
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.
Sponsor  
 
nathaned
#2 Posted : Saturday, November 16, 2002 10:21:53 PM
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.
paypal_pb
#3 Posted : Monday, November 25, 2002 4:56:59 PM
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
nathaned
#4 Posted : Tuesday, November 26, 2002 3:30:39 AM
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.com


Thanks,

Nathan E.
paypal_pb
#5 Posted : Tuesday, November 26, 2002 4:41:09 AM
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
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFVision Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF | YAF © 2003-2009, Yet Another Forum.NET
This page was generated in 0.161 seconds.