Jump to content


Photo

Adjusting Inventory from a shopping cart purchase


  • This topic is locked This topic is locked
4 replies to this topic

#1 qmayer

qmayer

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 25 February 2003 - 03:18 PM

Is this possible using IPN? If so, how would I write the loop? Thanks.

#2 paypal_pb

paypal_pb

    Advanced Member

  • Members
  • 2,960 posts

Posted 25 February 2003 - 04:14 PM

It is possible. I believe I've seen some code on these boards that show what to do.

Patrick Breitenbach
PayPal, Inc.
Dev Net: https://www.paypal.com/pdn

#3 qmayer

qmayer

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 25 February 2003 - 09:55 PM

I've read that, but it looks like it only works with single item purchases. How would it work if the user bought 3 things?

#4 qmayer

qmayer

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 27 February 2003 - 10:29 AM

"item_number_1, item_number_2, etc..."

What exactly will be in those variables? An item number like "UPRO9PAGE" or something like that?

#5 nathaned

nathaned

    Member

  • Members
  • PipPip
  • 15 posts

Posted 01 March 2003 - 12:49 PM

Looks like this.
'this pulls how many items are in the cart
NumCartItems = Request.Form("num_cart_items")

'creates an array
For i = 1 to NumCartItems

If Request.Form("item_number" & i) <> "" Then
set Cm = Server.CreateObject("ADODB.Command")
Cm.ActiveConnection = "yourconnection string"
Cm.CommandText = "your SQL statement to update the inventory"
Cm.CommandType = 1
Cm.Execute
Else
Exit For
End If
Next



Hope this helps,

Nathan E.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users